Hey everyone! I'm currently working on designing the system for my project and wanted to get some input on my approach. I'm considering routing incoming requests to either a normal pod or an abnormal pod, even though both pods run the same service. My idea is that if a user makes 10 requests to the `/add` endpoint, it would go to the normal pod, but if they hit the same endpoint 100 times, it would be routed to the abnormal pod. Does this strategy make sense? Is it regarded as a best practice in system design? One thing I'm uncertain about is how to actually implement the routing since by the time the request hits the service, it's already been processed, and I won't know the frequency of client requests at that point. Any thoughts?
2 Answers
It sounds like you're trying to tackle some sort of load management or resource allocation issue. However, this design might not be the best route. There are dedicated rate limiting tools out there that can handle this type of situation more effectively. Instead of manually routing requests based on frequency, it might be more efficient to implement a rate limiting component to handle this automatically.
I totally get what you're trying to do! But just to clarify, you mentioned you’d use rate limiting, right? That's a solid first step. It might not directly solve your routing issue, but it will help in controlling how many requests hit your service in the first place. You could then focus on scaling your pods based on usage rather than manually sorting requests after they're made.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures