计划与齿轮人vs. cron? [英] Scheduling with gearman vs. cron?

查看:152
本文介绍了计划与齿轮人vs. cron?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到很多人讨论Gearman和它的调度功能,使它能够将工作分配到其他服务器。



cron和Gearman之间的区别是什么?



Gearman和cron之间的主要区别在于:如果你在做纯调度,


  1. cron作业只会根据时间触发,而Gearman功能则由其他应用程式的呼叫触发。

  2. 如前所述,Gearman用于协调多个系统之间的任务,而cron不提供同步。因此,异步任务对cron更好,反之亦然。

农场对其他服务器的重型同步处理,我建议你使用cron并保持简单。


I have noticed a lot of people discussing Gearman and it's scheduling features making it enable to distribute work onto other servers. However, I have not yet seen a comparison to native cronjobs.

What are the differences between cron and Gearman?

解决方案

If you're doing pure scheduling, using Gearman is unnecessary.

The main differences between Gearman and cron are that:

  1. cron jobs are only triggered only based on time, while Gearman functions are triggered by calls by other applications.
  2. Gearman is used for coordinating tasks between multiple systems, as you mentioned, while cron provides no synchronization. As a result, asynchronous tasks are better for cron, and vice versa.

Unless your application needs to farm out heavy-duty synchronous processing to other servers, I would recommend you to use cron and keep it simple.

这篇关于计划与齿轮人vs. cron?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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