Question

According to the documentation:

App Engine refills the bucket with new tokens continuously based on the rate that you specified for the queue.

I am unclear by what is meant by the word continuously here. Does it mean that tokens are added one at a time at (rate_magnitude/rate_unit) or are all the tokens dumped in at one time once every rate_unit?

To be clear, if I have a queue.yaml as follows. Will I get a dump of 60 tokens (and therefore request filled) once an hour, or is it equivalent to having rate set to 1/m?

queue:
- name: default
  rate: 60/h
 ...

And if it is a dump every unit of time, what happens if my bucket_size is less than the magnitude of rate?

Was it helpful?

Solution

Tokens are added one at a time. Regardless of the bucket size, there is no difference between rates of 1 per minute and 60 per hour, or between 0.1 per minute and 6 per hour.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top