也几乎同步工作;基本上,我想将 Web 应用程序背后的数据访问和处理委托给大多数作业的任务队列。对于 celery 任务,我认为合理的最快延迟是多少?
更新(澄清)
我想为了清楚起见,我应该解释一下吞吐量——虽然不错——对我来说不是一个必要的问题。我暂时还不需要朝那个方向扩展。延迟是我目前要评估的唯一标准。如果这是唯一可行的方法,我task.apply
很乐意使用,但我想把工作做得更好。
也几乎同步工作;基本上,我想将 Web 应用程序背后的数据访问和处理委托给大多数作业的任务队列。对于 celery 任务,我认为合理的最快延迟是多少?
我想为了清楚起见,我应该解释一下吞吐量——虽然不错——对我来说不是一个必要的问题。我暂时还不需要朝那个方向扩展。延迟是我目前要评估的唯一标准。如果这是唯一可行的方法,我task.apply
很乐意使用,但我想把工作做得更好。
When I say throughput
I mean the average latency from sending a task until it's been executed. With roundtrip
I mean the average time it takes to send a task, executing it, sending the result back and retrieving the result.
As I said in the comments I currently don't have any official numbers to share, but with the right configuration Celery is low latency compared to many other solutions, but still it does come with more overhead than executing a function locally. This is something to take into account when designing the granularity of a task[1]
I'm currently writing a performance guide that may be of interest: http://ask.github.com/celery/userguide/optimizing.html
Feedback welcome, and would like to know about any other performance factors you are interested in.
[1] http://celeryq.org/docs/userguide/tasks.html#granularity