![System Design Interview - Chapter 4 - Design a Rate Limiter](/en/2022/12/system-design-interview-04-design-a-rate-limiter/images/system-design-interview-title_hu986b831394ddc45d0b119ea15d2b6f2d_52419_400x0_resize_q90_h2_box.webp)
System Design Interview - Chapter 4 - Design a Rate Limiter
Every popular software should have a Rate Limiter. It prevents DDOS attack, reduces cost and prevents servers from being overloaded.
There are some tricky questions to be considered during implementation of Rate Limiter:
Where to put Rate Limiter: client-side, server-side, gateway? Algorithms for rate limiting. There are many algorithms with pros and cons: Token bucket, Leaking bucket, Fixed window counter, Sliding window log, Sliding window counter. Your business needs will define the right algorithm.