I am new to queueing systems. I am using resque with my current app and I have three queues to monitor. I wonder what is the best way to run and manage resque jobs. The reason for the question is that I am slightly confused with so many options suggested by developers on the internet. More specifically my confusion is around these two strategies.
- resque pool
- resque pool with god
why do I need resque pool if I can run workers with god alone?
Running jobs are usually asynchronous tasks. It means you dont wait for them to finish to keep going with your request or whatever called the job.
Because jobs nature is asynchronous, it may mean that at some point you are requesting several jobs at one time. Due to CPU restrictions, these jobs will either find a busy cpu and wait or fail.
A resque pool is a way to keep them in line, performed one at a time. If they fail, they go to a retry mode sometimes, etc.
God is a daemon monitoring tool. It will monitor the jobs 'server' to allow accepting jobs, but not necessarily handle failures, or handle jobs in the order they came in, etc.
A good tool that tries to encapsulate all these into one is sidekiq. There is also a railscast about it that explains well how to work with it (even though it may be a bit old): http://railscasts.com/episodes/366-sidekiq