System design interview question
Design a Distributed Rate Limiter
A distributed rate limiter protects services from abuse, accidental traffic spikes, and noisy-neighbor problems by capping the number of requests a caller can make in a given window. At scale, it must enforce limits consistently across hundreds of API gateway nodes spread across multiple data centers, decide in under a millisecond whether to admit or reject, and degrade gracefully when its own coordination layer is unhealthy. The design must support multiple keying strategies (per-user, per-IP, per-API-key), multiple algorithms (token bucket, sliding window), soft vs hard limits, and emit standard rate-limit headers so clients can self-regulate.
Practice this question step by step with an AI interviewer that reviews your requirements, your architecture and your trade-offs, and scores the design.