Ibrahim Arief
Ibrahim Arief

Reputation: 9116

Is the Pull Queue in GAE exhibit consistent FIFO behavior?

The push queue in App Engine is generally a FIFO queue, but as seen from the linked docs, in the case where the queue has a large backlog of tasks, the scheduler might jump new tasks to the head of the queue in an attempt to reduce latency.

This jumping-ahead-of-the-queue makes sense for heavily loaded apps, but it would meant that the FIFO behavior is not guaranteed to be consistent.

Now the question is, how about pull queues? The above behavior makes sense in a push queue, but less so in pull queues, since the responsibility to lease tasks from the pull queue and the responsibility to scale up the number of workers fell to the app itself. If the jumping-ahead-of-the-queue behavior does not exist in pull queues, would it mean that the pull queue is consistently exhibiting a FIFO behavior?

In addition, I cannot seem to find any docs about the ordering of tasks in the official pull queue docs.

Upvotes: 6

Views: 274

Answers (1)

Stuart Langley
Stuart Langley

Reputation: 7054

No there are no ordering guarantees in either pull queues.

While typically the tasks with the oldest ETA will be leased first, it is not assured to be the case. You're application should be able to deal with tasked being dequed from your queue in any order.

Upvotes: 1

Related Questions