Grokking DevOps and SRE Interviews
0% completed
Exercise: Counting Requests a Rate Limiter Drops
A rate limiter caps how many requests one client may send in a period of time and rejects, or drops, every request above that cap. An API with a limit of 3 requests per 10 seconds answers a fourth request in that period with an error, usually HTTP 429 Too Many Requests.
The definition does not say which 10 seconds count. Two common answers produce different results on the same traffic, and a request that one limiter accepts can be dropped by the other.
This exercise implements both answers, counts the drops for each, and explains the difference with one timeline.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%