A comprehensive comparison of rate limiting algorithms covering fixed window, sliding window log, sliding window counter, token bucket, and leaky bucket. Each algorithm encodes different tradeoffs around fairness, burst tolerance, and memory cost. Fixed window is computationally cheap but vulnerable to boundary amplification
Table of contents
Rate Limiting Algorithms at a GlanceWhat Is Rate Limiting?What Is the Fixed Window Algorithm?What Is the Sliding Window Algorithm?What Is the Token Bucket Algorithm?What Is the Leaky Bucket Algorithm?Distributed Rate Limiting and Global CoordinationRate Limiting in Microservices ArchitecturesWhat Is the Best Rate Limiting Algorithm for APIs?Sort: