All Questions
Api Gateway medium

You have 10 API Gateway instances behind a Global Load Balancer. You want to enforce a strict limit of 1,000 requests per minute per user. Why is storing the request counters in the Gateway's local memory insufficient?

  1. A Local RAM is too slow for the high-concurrency requirement of rate limiting.
  2. B The Load Balancer usually strips the IP address, so the Gateway cannot identify the user.
  3. C State Fragmentation: A user's traffic is distributed across all 10 Gateways. Without a centralized store (like Redis), the user could potentially send 10,000 requests per minute by exploiting the isolated counters.
  4. D Gateway instances are purged from memory every 60 seconds by default to save costs.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions