The token bucket method is a technique used in traffic shaping to control the flow of data and whose algorithm reacts flexibly to traffic peaks.
The token bucket method works with tokens that are generated and added to the data packets at regular intervals. The method ensures that the queue consists of only a limited number of data packets, which does not exceed a certain value. Traffic peaks can be transmitted directly with up to a specified number of data packets.
Unlike the leaky bucket method, the token bucket method allows the transmission stream to have traffic peaks. While the leaky bucket method is used in ATM networks, the token bucket method is used in IP networks.