No limit
lost12 of 40
A partner’s runaway script knocks the server over, and Oakmoor’s requests fail with it.
Module 54 · Rate limits
An API can answer only so many requests a second. Here you stand a rain barrel of tokens at Larkspur’s stock API, flood it yourself, read the 429 it sends back, and set the limits for sale day.
The whole idea in one example
12 of 40
A partner’s runaway script knocks the server over, and Oakmoor’s requests fail with it.
40 of 40
The runaway script empties only its own barrel. Oakmoor never notices.
Counts come from a simulated stock API over hand-made traffic traces, with a hand-set server limit.
How it works
Past its capacity, the server fails everyone
Google’s Site Reliability Engineering book (Mike Ulrich, 2016) says overload is the most common cause of failures that spread: in its example, servers handling 1,000 requests a second that get 1,200 start crashing, and answer well below 1,000.
Source, checked 30 October 2026
Size sets the burst; the drip sets the pace
Amazon API Gateway’s guide says it limits requests with the token bucket method, a token per request: the rate is how fast tokens are added and the burst is the bucket’s size; past both, clients get 429 Too Many Requests.
Source, checked 30 October 2026
429 says no; Retry-After says when; jitter spreads the crowd
RFC 6585 (April 2012) says status 429 Too Many Requests means the user has sent too many requests in a given amount of time, and the reply may include a Retry-After header saying how long to wait.
Source, checked 30 October 2026
A runaway partner spends only its own tokens
GitHub’s REST API docs, checked 30 October 2026, give each signed-in user their own limit of 5,000 requests an hour, and 60 an hour per address for requests without a sign-in.
Source, checked 30 October 2026
The story
On sale day a partner’s runaway script floods Larkspur Supply Co.’s stock API; the team puts a rain barrel of tokens at the door, and learns to say 429 and when to come back. You run the API’s front door.
Your path





Chapter 5 · done
How should many refused clients come back without crashing in together?


Anyone whose product calls an API or offers one, and who has met a 429 or wondered why a partner’s script can slow everyone down. Read Web requests first if a request and its reply are new to you.