Advanced System Design
Q85 / 100

When designing a rate limiter for a distributed API gateway with multiple instances, why is a centralized store like Redis often used instead of in-memory counters on each instance?

Correct! Well done.

Incorrect.

The correct answer is A) In-memory counters on each instance would only track requests handled by that instance, allowing a client to exceed the global limit by spreading requests across instances; a shared store provides a consistent global count

A

Correct Answer

In-memory counters on each instance would only track requests handled by that instance, allowing a client to exceed the global limit by spreading requests across instances; a shared store provides a consistent global count

Explanation

A shared, fast data store (like Redis) lets all gateway instances check and increment a common counter, ensuring rate limits are enforced globally rather than per-instance, though it introduces a dependency and potential latency/contention point.

Progress
85/100