Loading…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
Loading…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
Loading the question…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
System design interview question
Every public API needs one: “design a rate limiter” asks you to cap how often each client can call you, on every single request, across a whole fleet of servers, without the check itself becoming the bottleneck. It tests algorithms, shared state and how a guard should fail, all in a small space. Here is how to walk into it, and then how to practise it until the answer is yours.
Practise API Rate Limiter
Free with an account.
A public API is being abused: a few clients fire thousands of requests a second and starve everyone else. The team wants to cap each client to a fixed number of requests per time window and reject the rest immediately, before any real work is done. The check has to be cheap, because it runs on every single request, and it has to be consistent across a fleet of identical API servers behind a load balancer, so a client cannot slip past simply by being routed to a different server each time. The limits themselves change rarely.
Every phrase that matters in the brief is a requirement in disguise. Spot them before you draw a single box.
“cap each client to a fixed number of requests per time window and reject the rest immediately”
A component that counts each client's requests and refuses the ones over the limit, inline.
“consistent across a fleet of identical API servers”
One shared store for the counters, so every server sees the same count.
The same design always gets the same score, with the reason behind every requirement — then defend it against the trade-offs above.
The answers are not on this page on purpose. Build the design, and these are asked — and marked — once it is submitted.
© 2026 PlayCloudLabs. All rights reserved. Not affiliated with Amazon Web Services.