Google documentation on Bucket_size parameter gives just a brief definition, a Wikipedia link and an example:
bucket_size
Limits the burstiness of the queue’s processing,
i.e. a higher bucket size allows bigger spikes in
the queue’s execution rate. For
example, consider a queue with a rate
of 5/s and a bucket size of 10. If
that queue has been inactive for some
time (allowing its “token bucket” to
fill up), and 20 tasks are suddenly
enqueued, it will be allowed to
execute 10 tasks immediately. But in
the following second, only 5 more
tasks will be able to be executed
because the token bucket has been
depleted and is refilling at the
specified rate of 5/s.
Could you please provide an explanation of Bucket_size parameter and in which way this parameter could be useful?
The simplest way to describe is that it defines how high a peak in demand you allow a queue to serve.
For example if you define a queue for 5/s requests, with a bucket of 10. This means that it will mostly perform at the rate of five requests per second, but when it’s got to it will peak to ten per second.