System design lab

Rate limiter

Run one stream of requests through fixed window, sliding log, sliding counter and token bucket limiters side by side.

InteractiveOne request stream, four limiters
Loading interactive…

On window-edge traffic the fixed window admits 10 requests within about two seconds against a limit of 5, while the sliding log never exceeds 5 in any 10-second span. On the burst, the token bucket admits a full bucket at once and then throttles to its refill rate.

Learn the concept

The lesson this lab comes from, with the explanation, a practice task and a quiz.

More labs

All labs