Tag

token bucket

0 views collected around this technical thread.

Tencent Cloud Developer
Tencent Cloud Developer
Jan 22, 2025 · Cloud Native

Rate Limiting: Concepts, Algorithms, and Distributed Solutions

Rate limiting protects micro‑service stability by rejecting excess traffic, using algorithms such as fixed‑window, sliding‑window, leaky‑bucket and token‑bucket, and can be deployed locally or distributed via Redis, load‑balancers, or coordination services, each offering different trade‑offs in precision, scalability, and complexity.

AlgorithmRate Limitingdistributed systems
0 likes · 31 min read
Rate Limiting: Concepts, Algorithms, and Distributed Solutions
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 28, 2024 · Backend Development

Master Rate Limiting in Spring Boot with Bucket4j: Token Bucket Guide

This tutorial explains how to implement API rate limiting in Spring Boot using the Bucket4j library, covering token‑bucket theory, Maven dependencies, Redis configuration, YAML rules, annotation‑based limits, custom responses, and conditional bypasses with complete code examples.

Bucket4jJavaRate Limiting
0 likes · 10 min read
Master Rate Limiting in Spring Boot with Bucket4j: Token Bucket Guide
FunTester
FunTester
Mar 4, 2024 · Backend Development

Implementing Custom Rate Limiting in Java with ReentrantLock and AtomicInteger

This article explains the purpose and benefits of rate limiting, reviews popular Java rate‑limiting libraries, and provides a step‑by‑step guide with complete source code for building a simple, thread‑safe custom rate limiter using maps, ReentrantLock, and AtomicInteger.

BackendJavaPerformance
0 likes · 9 min read
Implementing Custom Rate Limiting in Java with ReentrantLock and AtomicInteger
Tencent Cloud Developer
Tencent Cloud Developer
Feb 28, 2024 · Backend Development

Comprehensive Guide to Rate Limiting Algorithms and Distributed Rate Limiting Solutions

This guide explains why rate limiting is essential for micro‑service stability, outlines six design principles, details four classic algorithms—fixed window, sliding window, leaky bucket, and token bucket—and compares centralized Redis, load‑balancer cache, and coordination‑service distributed solutions.

AlgorithmRate Limitingdistributed systems
0 likes · 30 min read
Comprehensive Guide to Rate Limiting Algorithms and Distributed Rate Limiting Solutions
TAL Education Technology
TAL Education Technology
Nov 16, 2023 · Backend Development

An Analysis of Sentinel-Go Flow Control Principles

This article provides a comprehensive overview of Sentinel-Go's flow control mechanism, detailing core concepts such as resources, tokens, rules, slots, and slot chains, and explaining token calculation strategies, control behaviors, sliding window statistics, and implementation details with Go code examples.

GoRate LimitingSentinel
0 likes · 18 min read
An Analysis of Sentinel-Go Flow Control Principles
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 2, 2023 · Backend Development

Mastering Rate Limiting in Spring Boot: Token Bucket, Leaky Bucket, and Counter Techniques

An in‑depth guide explains three rate‑limiting algorithms—counter, leaky bucket, and token bucket—demonstrates their implementation in Spring Boot using Guava’s RateLimiter and Baidu’s ratelimiter‑spring‑boot‑starter, provides full Maven dependencies, configuration snippets, and Java code examples, and shows testing results.

Backend DevelopmentGuavaRate Limiting
0 likes · 8 min read
Mastering Rate Limiting in Spring Boot: Token Bucket, Leaky Bucket, and Counter Techniques
JD Retail Technology
JD Retail Technology
Aug 14, 2023 · Backend Development

In‑Depth Analysis of Guava RateLimiter: Token‑Bucket Algorithm, Code Structure, and Usage

This article explains why rate limiting is essential in high‑concurrency and transaction‑processing systems, introduces Google Guava's RateLimiter as a token‑bucket implementation, walks through its source code—including class hierarchy, core algorithms, and usage examples—and discusses practical considerations and extensibility.

GuavaJavaRate Limiting
0 likes · 19 min read
In‑Depth Analysis of Guava RateLimiter: Token‑Bucket Algorithm, Code Structure, and Usage
Selected Java Interview Questions
Selected Java Interview Questions
Jun 30, 2023 · Backend Development

Implementing Rate Limiting in Java with Guava, Custom Annotations, and Redis Lua Scripts

This article explains how to protect high‑concurrency Java applications using rate‑limiting techniques, covering basic algorithms such as counter, leaky‑bucket and token‑bucket, demonstrating a single‑node implementation with Guava’s RateLimiter and custom annotations, and showing a distributed solution based on Redis and Lua scripts.

GuavaJavaRate Limiting
0 likes · 15 min read
Implementing Rate Limiting in Java with Guava, Custom Annotations, and Redis Lua Scripts
Architecture Digest
Architecture Digest
Mar 27, 2023 · Backend Development

Rate Limiting: Concepts, Algorithms, and Implementation Strategies

This article explains the fundamental concepts of rate limiting, compares popular algorithms such as token bucket, leaky bucket, and sliding window, and reviews practical implementation methods including Nginx, middleware, Redis, Guava, and Tomcat configurations for both single‑machine and distributed environments.

BackendRate LimitingRedis
0 likes · 17 min read
Rate Limiting: Concepts, Algorithms, and Implementation Strategies
Top Architect
Top Architect
Mar 26, 2023 · Backend Development

Comprehensive Guide to Rate Limiting: Concepts, Algorithms, and Implementation Strategies

This article provides a thorough overview of rate limiting, covering its basic concepts, common algorithms such as token bucket, leaky bucket and sliding window, and practical implementation methods across Nginx, Tomcat, Guava, Redis, Sentinel and other middleware for both single‑machine and distributed systems.

BackendRate LimitingRedis
0 likes · 17 min read
Comprehensive Guide to Rate Limiting: Concepts, Algorithms, and Implementation Strategies
ByteDance SYS Tech
ByteDance SYS Tech
Mar 23, 2023 · Backend Development

From Token Buckets to Carousel: Solving Rate Limiter Challenges in High‑Performance Networks

This article reviews the fundamentals of token‑bucket rate limiters, identifies precision, cascading compensation, and TCP‑loss sensitivity issues, and details two major improvements—port‑loan backpressure and the Carousel algorithm—while outlining future directions for more reliable network traffic shaping.

DPDKRate Limitingbackpressure
0 likes · 14 min read
From Token Buckets to Carousel: Solving Rate Limiter Challenges in High‑Performance Networks
Architect's Guide
Architect's Guide
Mar 21, 2023 · Backend Development

Fundamentals and Common Practices of Rate Limiting in Distributed Systems

This article explains the basic concepts, dimensions, and typical algorithms of rate limiting, discusses various implementation strategies such as token bucket, leaky bucket, and sliding window, and reviews practical solutions using Nginx, Guava, Redis, Sentinel, and Tomcat for both single‑node and distributed environments.

BackendRate LimitingRedis
0 likes · 16 min read
Fundamentals and Common Practices of Rate Limiting in Distributed Systems
Top Architect
Top Architect
Mar 8, 2023 · Backend Development

Implementing Rate Limiting with Redis: setnx, ZSet Sliding Window, and Token‑Bucket Approaches

This article explains three Redis‑based rate‑limiting techniques—using setnx for simple counters, leveraging ZSet for a sliding‑window algorithm, and applying a token‑bucket pattern with List—provides Java code examples for each method, discusses their advantages and drawbacks, and shows how to integrate them into backend services.

Backend DevelopmentJavaRate Limiting
0 likes · 7 min read
Implementing Rate Limiting with Redis: setnx, ZSet Sliding Window, and Token‑Bucket Approaches
Top Architect
Top Architect
Mar 3, 2023 · Backend Development

Comprehensive Guide to Rate Limiting: Concepts, Algorithms, and Implementations

This article explains the principles and practical implementations of rate limiting in backend systems, covering real‑world scenarios, strategies such as circuit breaking, service degradation, delayed and privileged handling, common algorithms like counter, leaky‑bucket and token‑bucket, and code examples using Guava and Nginx + Lua.

BackendJavaRate Limiting
0 likes · 14 min read
Comprehensive Guide to Rate Limiting: Concepts, Algorithms, and Implementations
vivo Internet Technology
vivo Internet Technology
Feb 15, 2023 · Artificial Intelligence

Optimizing CDN Bandwidth Utilization and Cost Reduction with Predictive Control (Yugong Platform)

By leveraging the Yugong Platform’s predictive control—combining Prophet‑based threshold forecasts, custom real‑time bandwidth models, and a token‑bucket mechanism—to smooth peaks and fill valleys, enterprises can dramatically improve CDN bandwidth utilization, automate adjustments, and substantially lower peak‑based billing costs.

Cost Reductionbandwidth optimizationcdn
0 likes · 23 min read
Optimizing CDN Bandwidth Utilization and Cost Reduction with Predictive Control (Yugong Platform)
Architect
Architect
Dec 10, 2022 · Backend Development

Rate Limiting: Concepts, Common Algorithms, and Practical Implementation Strategies

This article explains the fundamentals of rate limiting, describes widely used algorithms such as token bucket, leaky bucket, and sliding window, and details practical implementation methods ranging from single‑machine tools like Guava and Tomcat to distributed solutions using Nginx, Redis, and Sentinel.

BackendRate LimitingSliding Window
0 likes · 17 min read
Rate Limiting: Concepts, Common Algorithms, and Practical Implementation Strategies
Selected Java Interview Questions
Selected Java Interview Questions
Nov 15, 2022 · Backend Development

Comprehensive Guide to Rate Limiting: Concepts, Algorithms, and Implementation Strategies

This article explains the fundamental concepts of rate limiting, compares common algorithms such as token bucket, leaky bucket and sliding window, and details practical implementations using Nginx, Tomcat, Redis, Guava, and Sentinel for both single‑node and distributed backend systems.

AlgorithmBackend DevelopmentRate Limiting
0 likes · 17 min read
Comprehensive Guide to Rate Limiting: Concepts, Algorithms, and Implementation Strategies
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 20, 2022 · Backend Development

Implementing Rate Limiting in Spring Cloud Gateway Using Redis

This article explains how to configure distributed rate limiting in Spring Cloud Gateway by adding the reactive Redis dependency, setting up Redis connection properties, defining a RequestRateLimiter filter with token‑bucket parameters, implementing a custom KeyResolver, and demonstrating the behavior with HTTP 429 and 403 responses.

JavaRate LimitingRedis
0 likes · 12 min read
Implementing Rate Limiting in Spring Cloud Gateway Using Redis
Tencent Cloud Developer
Tencent Cloud Developer
Sep 6, 2022 · Backend Development

Understanding Rate Limiting in Distributed Systems: Algorithms and Best Practices

Rate limiting safeguards distributed systems by controlling request rates through algorithms such as leaky bucket, token bucket, fixed and sliding windows, and back pressure, while client‑side tactics like exponential backoff, jitter, and careful retries, and requires atomic distributed storage solutions (e.g., Redis+Lua) to avoid race conditions.

AlgorithmRate Limitingback pressure
0 likes · 16 min read
Understanding Rate Limiting in Distributed Systems: Algorithms and Best Practices