Resque vs Sidekiq? [英] Resque vs Sidekiq?

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

问题描述

我目前正在使用 Resque 作为我的后台进程,但最近我听到很多关于 sidekiq 的愤怒.有人可以比较/区分吗?

I am currently using Resque for my background process but recently I heard a lot of huff-buff about sidekiq. Could anybody compare/differentiate?

特别是我想知道有没有办法以编程方式监控 sidekiq

In particular I would like to know is there a way to monitor programmatically whether a job is completed in sidekiq

推荐答案

Resque:

优点:

缺点

  • 为每个 worker 运行一个进程(使用更多内存);
  • 不重试作业(无论如何都是开箱即用的).

优点

  • 为每个工作线程运行一个线程(使用更少的内存);
  • 更少的分叉(工作更快);
  • 开箱即用的更多选项.

缺点

  • [巨大] 要求您的代码和所有依赖项具有线程安全性.如果您使用线程运行线程不安全的代码,那么您就是在自找麻烦;
  • 在某些红宝石上比其他红宝石效果更好(推荐使用 jruby,由于 GVL(全局 VM 锁定),MRI 的效率会降低).
  • [huge] requires thread-safety of your code and all dependencies. If you run thread-unsafe code with threads, you're asking for trouble;
  • works on some rubies better than others (jruby is recommended, efficiency on MRI is decreased due to GVL (global VM lock)).

这篇关于Resque vs Sidekiq?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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