Reputation: 630
How do I run Resque workers on different servers but polling jobs from one Redis server?
As resque using redis to leep all jobs, i am looking for a way to pass parameter to worker class so a worker can connect to other redis server.
I need this because the one server do not have enough resource to run all workers.
Upvotes: 1
Views: 2670
Reputation: 39568
You'll just need to configure Resque to connect to a specific Redis instance. By default Resque tries to connect on localhost. Just create or modify a config/resque.yml
as described here. It will probably need to contain something like this:
production: my-one-and-only-redis-instance-address.com:6379
You'll probably want to make sure the redis server accepts connections only from the servers you have resque workers on using IP filtering at the OS level.
Upvotes: 5