Lesson 18 of 30
A server-side cap on how many requests a client can make in a window of time — the backend's version of the JavaScript track's throttle, protecting shared infrastructure instead of a single browser tab.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 2
A client receives a 429 response with `Retry-After: 30`. What should a well-behaved client do?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Rate limiting caps how many requests a single client (identified by API key, IP, or user id) can make in a given time window. Once the cap is hit, the server rejects further requests — typically with a 429 Too Many Requests status — until the window resets.
HTTP/1.1 429 Too Many Requests
Retry-After: 30
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1699999999
The response headers are the API telling you the rules directly: the total limit, how many requests you have left, and when the window resets — a well-designed API lets your client code respect the limit proactively instead of just reacting to 429s.
100 requests arrive from one client within a second — far more than the API can sustainably handle.
429 by backing off, not by retrying immediately. Respecting the Retry-After header (and often adding exponential backoff with jitter for repeated failures) is the correct response — retrying instantly just fails again and adds more load.useEffect re-fetching on every render, can hit a rate limit just as easily as a real attacker — from the server's perspective, both look identical."Your API client is getting 429s in production — what do you do?" is a real operational question, and the correct instinct (read the rate-limit headers, back off respectfully, don't just retry harder) shows practical experience integrating with real third-party or internal APIs.