|
Answer» API Rate Limiters limit the API calls that a service receives in a given time PERIOD for avoiding request overload. This QUESTION can start with the coding algorithm on a single machine to the distributed network. - What are some of the Required Features?
- What is the required request count per hour or second? Let US assume that the requirement can be 10 requests per second.
- Should the limiter notify the user if the requests are blocked?
- The limiter should handle traffic suitable according to the scale.
- What are some of the common PROBLEMS encountered?
- How to measure the requests per given time?
- How to design the rate limiter for the distributed systems when compared to a local system?
- Possible tips for consideration:
- Evaluate the usage of sliding time windows for avoiding HOURLY resets.
- Try using a counter integer instead of a request for saving space.
|