At a glance
- Did you know
- Most limiters use a token bucket: tokens refill at the rate, and the bucket size is the burst you allow.
- Rule of thumb
- Return 429 with a Retry-After header so well-behaved clients back off.
- Watch out
- A limit below your real peak rejects real users.
Problems that start with it
- A rate limit below real traffic A rate limiter in front of the API allows 1,000 req/s. Normal peak traffic is 1,300 req/s, so real users get 429s.
Full lesson coming soon
Lessons are being added one component at a time: how it works, its settings, a live exercise to break and fix it, interview questions and a short check. See the Circuit breaker lesson for what one looks like.