Updated

A lot of questions are hanging in StackOverflow without a complete and definite answer

How to run Resque workers on different servers but polling jobs from one Redis server?

Ruby / Resque / Redis: How to set up workers on different machines?

I want my webapp to send jobs to redis server and have a cluster of multiple machines, where the workers run, to execute the jobs.

In this recipe we will configure a Rails application to handle background jobs with a cluster of Resque workers.

The configuration we are going to use is the following

Main server
server A (DNS name server_A) - Redis is running here
                             - Rails application is running here
                             - Some Resque workers are running here

Worker servers
server B (DNS name server_B) - Other Resque workers are running here
server C (DNS name server_C) - Other Resque workers are running here
...

Buy recipe