System design interview question
Design a Distributed Rate Limiting Service for API Gateway (like Stripe or Twilio platform)
Design a global rate limiting service that enforces per-customer API quotas across multiple data centers and geographic regions. The system must handle 1M concurrent API clients with highly skewed traffic patterns (80/20 rule), support multiple rate limiting algorithms (token bucket, sliding window, adaptive), and provide sub-millisecond latency for rate limit checks. Clients span 6 continents, and decisions must be made in real-time without synchronous global consensus. The service must handle thundering herd scenarios, quota resets at customer-specified times, and accurate accounting with eventual consistency guarantees across regions.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.