Meaning
Traffic management algorithms regulate the flow of data packets to ensure that network resources are distributed fairly among all users. The token bucket rate limiting technique is used for controlling the amount of data sent over a connection while allowing for occasional bursts of high speed traffic. It uses a metaphorical bucket that fills with tokens at a steady rate, where each token represents a specific amount of data that can be transmitted.
If the bucket is empty, the system must wait for new tokens to arrive before sending more information.
Burst Allowance
The depth of the bucket determines the maximum size of a data burst that the system can handle. This feature provides a more flexible approach than simpler methods that strictly cap the speed, which is why token bucket rate limiting is preferred. It allows for short periods of high activity, such as loading a web page, without violating the overall average rate limit.
Request Denial
When the incoming traffic exceeds the available tokens and the bucket capacity, the excess data is either delayed or dropped. This mechanism protects the core network from being overwhelmed by a single user or a sudden spike in demand. Service providers use token bucket rate limiting to enforce the bandwidth limits specified in customer contracts.
Capacity Management
Designing the parameters of the bucket requires a careful analysis of traffic patterns to determine the best settings for token bucket rate limiting. If the token refill rate is too low, users will experience slow performance even when the network is not busy. Correct tuning of the system is essential for maintaining the balance between individual performance and overall network health.
The algorithm is a standard component of software defined networking and cloud service infrastructure.