MediumScenarioClassic design problems
Design a rate limiter for an API gateway.
What a good answer covers
Use per-client counters with token bucket or sliding window stored in a fast shared store such as Redis, enforce at the gateway, return 429 with Retry-After, support rule configuration and handle store failure with an open or closed policy.
PreviousYour design must support ten times the traffic next year. How do you make it future proof without overbuilding?Next Design a news feed such as a social timeline.