Tagged articles
5 articles
Page 1 of 1
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Jun 15, 2021 · Backend Development

Understanding Rate Limiting: Counter, Sliding Window, Leaky Bucket, and Token Bucket Algorithms

The article introduces the concept of rate limiting, explains why it is needed both offline (e.g., crowded theme parks) and online (e.g., flash sales), and details four common algorithms—counter, sliding window, leaky bucket, and token bucket—along with their implementation considerations and trade‑offs.

Sliding WindowToken Bucketcounter algorithm
0 likes · 9 min read
Understanding Rate Limiting: Counter, Sliding Window, Leaky Bucket, and Token Bucket Algorithms
JD Retail Technology
JD Retail Technology
May 25, 2020 · Backend Development

Understanding Rate Limiting: Counter, Leaky Bucket, and Token Bucket Algorithms

This article explains the fundamentals of rate limiting for high‑concurrency systems, covering why it is needed, the conditions that trigger it, and detailed introductions to the three main algorithms—counter (fixed and sliding windows), leaky bucket, and token bucket—along with their advantages, drawbacks, and sample pseudo‑code implementations.

BackendToken Bucketcounter algorithm
0 likes · 13 min read
Understanding Rate Limiting: Counter, Leaky Bucket, and Token Bucket Algorithms
ITFLY8 Architecture Home
ITFLY8 Architecture Home
May 18, 2018 · Backend Development

Rate Limiting Demystified: Token Bucket, Leaky Bucket & Counter Algorithms in Java

During high‑traffic scenarios, services can become unavailable, so implementing rate‑limiting techniques like token bucket, leaky bucket, and counter algorithms—illustrated with Java code examples using Guava RateLimiter, AtomicInteger, and Semaphore—helps smooth bursts, control concurrency, and prevent system overload.

GuavaToken Bucketcounter algorithm
0 likes · 6 min read
Rate Limiting Demystified: Token Bucket, Leaky Bucket & Counter Algorithms in Java