System design interview question
Design a Distributed Rate Limiter for API Gateway serving 500M daily active users
Design a distributed rate limiting system that enforces per-user, per-IP, and per-endpoint quotas across a global API platform serving 500M daily active users with peak traffic of 2M requests per second. The system must support multiple rate limiting algorithms (token bucket, sliding window, leaky bucket), handle geographically distributed traffic across 6 regions, provide sub-millisecond response times for rate limit decisions, and maintain eventual consistency while avoiding cascading failures. Candidates should design for graceful degradation when the rate limiter itself becomes a bottleneck, support real-time quota analytics, and handle edge cases like clock skew, distributed clock synchronization, and thundering herd during cache invalidation.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.