A rate limiter is a request budget tied to an identity and replenished over time. A token bucket is a practical way to allow a defined burst while controlling the long-run request rate: capacity sets the burst allowance, refill rate restores budget, and each request consumes a chosen number of tokens. Before implementing one, decide who shares a budget, what traffic pattern to permit, and what clients should receive when the budget runs out.
What a rate limiter controls
A limiter decides whether a request may proceed based on a policy. The policy is more than a number of requests per second: it also defines which requests are counted together, how quickly the budget returns, whether requests have different costs, and how denial is communicated.
That identity choice is consequential. Requests with the same limiter key share one budget; requests with different keys are accounted separately. Depending on the application, the key could represent an authenticated principal, an API key, an account, or another identity. These are not interchangeable: for example, a shared network address may represent multiple callers, while an account-level key may intentionally make several credentials share a limit.
Why a fixed window can allow a boundary spike
A fixed-window counter counts requests during a clock-aligned interval and resets when the interval ends. If the limit is 100 requests per minute, a caller might use 100 just before the boundary and another 100 just after it. The caller can therefore send a burst of 200 requests in a short span even though neither individual minute exceeded its limit.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
This boundary behavior is the central lesson behind the token-bucket approach discussed in Timevolt’s “Building a Rate Limiter: Lessons from The Matrix”. A token bucket does not reset the entire budget at a clock boundary; it allows a bounded reserve and replenishes it continuously according to the configured policy.
How a token bucket works
Think of the bucket as stored permission to make requests. It can hold up to a maximum number of tokens. Refill adds tokens over time until the bucket reaches that capacity. Each incoming request consumes its configured token cost. If there are not enough tokens available, the request is denied.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- Capacity: the maximum tokens the bucket can store, and therefore the maximum accumulated burst allowance.
- Refill rate: how quickly tokens return over time, which sets the replenishment pace.
- Request cost: how many tokens an operation consumes. A cost of one treats each request equally; a higher cost can account for operations that use more resources.
- Key: the identity used to select a bucket. All traffic sharing that key draws from the same budget.
Capacity and refill rate are separate policy choices. Raising capacity permits a larger burst when tokens have accumulated; it does not make the bucket replenish faster. Raising the refill rate restores tokens more quickly. A bucket whose capacity exceeds its refill rate can permit a temporary burst, followed by a wait while the budget refills.
A token bucket replaces fixed-window reset spikes with bounded bursts and ongoing replenishment. It should not be described as enforcing one exact universal limit across every arbitrary time interval: the observed behavior depends on capacity, refill rate, request cost, identity key, implementation, and how multiple instances coordinate.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Define the policy before choosing implementation settings
- Choose the caller identity. Specify what shares a bucket—such as an authenticated principal or API credential—and consider whether multiple callers might unintentionally share a key.
- Set the sustained rate. Decide how quickly budget should return, based on the service’s capacity and the intended use of the API.
- Set burst tolerance. Choose the maximum accumulated capacity that can be served safely at once. Do not treat a high capacity as a higher sustained rate.
- Set request costs. If operations vary substantially in work, decide whether expensive operations should consume more than one token.
- Define denial behavior. Choose the client-facing response and any application-specific handling when the bucket lacks sufficient tokens.
Using Spring Cloud Gateway’s Redis limiter
Spring Cloud Gateway documents the RequestRateLimiter filter, which delegates decisions to a RateLimiter. Its Redis implementation uses token buckets and requires the reactive Redis starter. The Spring Cloud Reference Documentation’s current page, accessed October 5, 2026, says that when a request is denied, “a status of HTTP 429 - Too Many Requests (by default) is returned.” Because the reference is version-sensitive, check the documentation for the Spring Cloud release used by your application before copying configuration.
The Redis limiter’s documented settings map directly to the bucket model:
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
replenishRateis the number of requests replenished per second.burstCapacityis the bucket’s maximum request capacity.requestedTokensis the token cost of each request; its default is 1.
The gateway uses a KeyResolver to choose the key for per-identity accounting. The documented default resolves the authenticated principal name. The reference also shows an illustrative resolver using a user query parameter and explicitly warns that it is “not recommended for production.” A caller-controlled query parameter should not be mistaken for a trustworthy identity merely because it appears in an example.
Spring’s examples, including settings such as a rate of 10 and a burst capacity of 20, are configuration illustrations, not universal recommendations or measured performance results. Choose values for the service and traffic you actually need to govern. See the Spring Cloud Reference Documentation for the filter and Redis limiter details.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Questions to settle for a production design
- Can callers evade or unfairly share limits? Review how the key is authenticated and whether the chosen identity matches the policy’s intended scope.
- Are all requests equally costly? If not, consider whether the configured token cost should vary by operation.
- What should a client do after denial? Ensure the application’s response behavior is clear and consistent with its API contract.
- Will multiple gateway instances share accounting? A local in-process limiter and a shared limiter have different coordination and failure characteristics. The Spring documentation establishes a Redis-backed option, but the right coordination and failure behavior depend on system requirements; do not assume every implementation behaves identically.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

