A bucket holds up to capacity tokens and refills at a steady rate. Each request removes one token; if the bucket is empty the request is rejected. Because tokens accumulate while traffic is idle, the bucket permits short bursts up to its capacity while still enforcing the long-run average refill rate.