Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine: bucket_size parameter on Task Queues

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?

like image 987
systempuntoout Avatar asked Jul 29 '10 15:07

systempuntoout


People also ask

Which configuration files describes the configuration for the task queues?

Applications using the App Engine SDK to manage task queues define these queues using a configuration file called queue. yaml .

Which option will allow you to review latency data from App Engine apps?

In general, when you want to see the latency of App Engine applications, go to App Engine > Dashboard and select the Latency graph.

What is Google task queue?

Task queue functions take advantage of Google Cloud Tasks to help your app run time-consuming, resource-intensive, or bandwidth-limited tasks asynchronously, outside your main application flow.

How does cloud task work?

Cloud Tasks lets you separate out pieces of work that can be performed independently, outside of your main application flow, and send them off to be processed, asynchronously, using handlers that you create. These independent pieces of work are called tasks.


1 Answers

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.

like image 174
Swizec Teller Avatar answered Sep 20 '22 07:09

Swizec Teller