Design an API Rate Limiter system.
Code Playground
JavaScript (V8)
Loading...
Console Output
// Output will appear here...
// For React: ReactDOM.createRoot(rootElement).render(<App />);
// For React: ReactDOM.createRoot(rootElement).render(<App />);
Recommended Answer
System Design Scenario:
1. Strategies: Token Bucket, Leaky Bucket, Fixed Window, Sliding Window Log, Sliding Window Counter.
2. Architecture:
* Middleware or API Gateway (Kong, Nginx).
* Storage: Redis (INCR, EXPIRE commands are atomic and fast).
3. Rule Management: Configuration service to define limits per user/tier.