System design interview question
Design a Distributed Rate Limiting and Quota Management System for a Global API Gateway
Design a rate limiting and quota management system that protects backend services for a global SaaS platform serving 50M API consumers across 6 continents. The system must enforce per-customer quotas (requests/second, daily limits, burst allowances), support sliding window algorithms, handle sub-millisecond decision latency (<5ms p99), and provide accurate quota accounting with strong consistency guarantees. The platform processes 2M requests/second during peak hours with geographically distributed edge nodes, and customers range from free tier (100 req/sec) to enterprise (100K req/sec). Design must address failure modes where quota services become unavailable, ensure quota state consistency across regions, and support real-time quota usage visibility and enforcement policies that can be updated without downtime.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.