Question bankPricingSign in

Design a Multi-Region Distributed Rate Limiter

API InfrastructureMedium1:30

Design a distributed rate limiter that enforces global rate limits across 5 geographic regions (US-East, US-West, EU, Asia, Australia). A customer's API quota (e.g., 10,000 requests per minute) must be enforced globally -- they cannot exceed the limit by spreading requests across regions. Each region has its own API gateway cluster. The system handles 500,000 requests per second across all regions.

In your 90-second answer, cover: - How you enforce a global rate limit when requests arrive at different regional gateways - Consistency vs. latency tradeoffs: cross-region synchronization adds 50-200ms latency - Your strategy for handling region failures or network partitions between regions - How you prevent a customer from gaming the system by targeting multiple regions

Constraints: rate limit checks must add less than 5ms latency to the request path. The system should be accurate within 5% of the configured limit (slight over-counting is acceptable, under-counting is not).

How to approach it

  • Hint 1

    The fundamental tension is that checking a global counter requires cross-region communication (slow), but you need sub-5ms latency. Consider pre-allocating quota to each region so most checks are local.

  • Hint 2

    Think of it like a bank: the central bank allocates currency reserves to regional banks. Each regional bank can approve transactions up to its local reserve without calling headquarters.

  • Hint 3

    For failure handling, consider what happens when a region cannot reach the global coordinator. Should it allow all traffic (risk over-limit) or deny all traffic (risk false rejections)?

Ready to answer it out loud?

Record your answer in 1:30 and Preptile scores it 1–10 with specifics — what landed, what you skipped, and what to say next time.

Practising needs an invite code. Join the waitlist and we’ll send you one.