GAE中的Pull队列是否表现出一致的FIFO行为? [英] Is the Pull Queue in GAE exhibit consistent FIFO behavior?

查看:110
本文介绍了GAE中的Pull队列是否表现出一致的FIFO行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

App Engine中的推送队列通常是 FIFO队列,但从链接的文档可以看出,在队列中有大量任务积压的情况下,调度程序可能会将新任务跳到队列头部,以尝试减少延迟。



这种先进先出的队列对于重载应用程序是有意义的,但这意味着FIFO行为不能保证一致。

现在的问题是,拉队列怎么样?上述行为在推送队列中是有意义的,但在拉队列中是不太合适的,因为从拉队列中租用任务的责任以及扩大工作者数量的责任归属于应用程序本身。如果队列中的跳跃行为在拉队列中不存在,是否意味着拉队列一直表现出FIFO行为?

另外, ,我似乎无法找到有关正式拉动中的任务排序的任何文档队列文档

解决方案

否在拉队列中没有排序保证。

虽然通常最老的ETA的任务将首先被租用,但不能保证是这种情况。你的应用程序应该能够处理任何顺序的任务从你的队列中取消。


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.

解决方案

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.

这篇关于GAE中的Pull队列是否表现出一致的FIFO行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆