Lesson 3.2
Rate limiting
Rate limiting protects you from clients and clients from themselves. Token bucket is the usual answer; the hard part is the key you limit on.
7mIntermediate9,422 students

Sign in to watch this lesson
Browsing is free. Create an account to play videos and track your progress.
Overview
Rate limiting protects you from clients and clients from themselves. Token bucket is the usual answer; the hard part is the key you limit on.
What this lesson covers
- Implement token bucket and sliding window limits
- Choose the right key: user, tenant, or IP
- Return limits and retry hints in the response
This lesson sits in API Design at Scale, part of System Design Foundations. It assumes what came before it and leads directly into the next lesson in the module.
In this lesson you will:
- Implement token bucket and sliding window limits
- Choose the right key: user, tenant, or IP
- Return limits and retry hints in the response