Fig 1Token bucket rate limiterHover sets the request rate10 of 10 tokens · 1.0 req/s · 0 rejected
Coins in the tube: the tokens the bucket holdsSlide and spring: one request takes one coinA token bucket as a coin dispenser. The metering wheel drops one coin into the tube per turn, 2 turns a second, and the tube holds 10. Every request pulls the slide, which carries the bottom coin into the tray; when requests come faster than 2 a second the stack runs down, and once the tube is empty each pull with no coin under it is a rejected request.