All jobs / Backend developer / Performance
Backend developer interview question · 1–3 years
The interviewer asks: “The API returns 429. What should a client do?” Strongest answer?
The strongest answer
Back off. Honour Retry-After if present, then retry with jitter. Don't tight-loop, and don't silently switch to another user's credentials to “get more quota.”
Why it works
Exactly. 429 is a contract: you are too fast. Retry-After is the polite signal. Gateways and browsers already understand it.
What a good answer covers
- 429 means slow down.
- Honour Retry-After; add jitter.
- Cap retries; then tell the user.
- Don't loop forever.
Answers that fall short
- Close, but not the strongest: Ignore it and retry immediately — 429 is optional.
Immediate retry is how you DDoS yourself and your neighbours on the same key. - Weak: Treat 429 like 500 and fail the whole checkout.
Sometimes you must fail the user-facing action — but 429 is often transient. A bounded retry is the default; a hard fail is a product choice. - Red flag: Spin until it returns 200; the user is waiting.
Unbounded spin is a hang. Cap attempts and surface a “try again” after that.
Who gets asked this
More Performance questions
- The interviewer asks: “You add Cache-Control to a JSON API. What do you watch for?” Strongest answer?
- The interviewer asks: “Why is OFFSET 100000 slow even with a LIMIT 20?” Strongest answer?
- The interviewer asks: “Where do you enforce rate limits?” Strongest answer?
- The interviewer asks: “This query is slow in production but fine on your laptop. What do you do first?”…
- An endpoint takes 1.5 seconds at p95. The container’s CPU sits at 8% and the CPU profiler shows almost…
- The interviewer asks: “The cache expires and 2,000 requests hit the database at once. How do you prevent…
- Under load, someone raises the connection pool from 20 to 200 per instance. Throughput drops and p95 gets…
- The interviewer asks: “How do you know we can take 3× traffic on Monday?” Strongest answer?