Design a Multi-Dimensional Rate Limiter
The prompt sounds small: cap how often a caller can hit an endpoint. The word "several" makes it a senior design conversation. You get a stack of ceilings, enforced together. A caller might be allowed 10 requests a second, 100 a minute and 5000 an hour, with a per-endpoint cap on top of all three. Every limit has to hold at once, on a service running on many machines, without latency a customer can feel. Get the combine rule and the shared state right, and the design is done. Wave at "just use a counter," and the interviewer has their answer.
Each limit is easy alone. The difficulty is composing them under concurrency. One counter with a threshold is a first-year exercise. A design looks like this: three counters keyed by different windows, checked as a group, and incremented only when all pass. They update atomically while dozens of nodes race on the same caller, inside a tight latency budget. Name the dimensions, state the AND rule, say where the counters live, and make the check-and-increment atomic. That reads as someone who has run a limiter in production. Reaching for a single in-memory map doesn't.
- 1 problem, worked step by step
- 1 diagram
- about 24 min
Premium lessonZscaler interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Zscaler interview guideKnow what Zscaler asks before you walk in.
12 coding · 2 system design · 23 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.