backburner icon indicating copy to clipboard operation
backburner copied to clipboard

Beanstalk failover

Open kke opened this issue 13 years ago • 5 comments

The beanstalk-client gem allows you to define multiple beanstalk servers, but I don't see how that works with backburner's configure block.

This way the workers could listen to the same queue on multiple beanstalkd servers and if job enqueuing fails, backburner should try another server in the pool.

kke avatar Aug 13 '12 11:08 kke

You can actually specify multiple beanstalk servers:

config.beanstalk_url = "beanstalk://127.0.0.1, beanstalk://xxx.x.x.x:3456, beanstalk://test.foo.com:6785"

Should work with the existing gem. Also I probably should patch it to allow an array passed in as well.

nesquena avatar Aug 13 '12 19:08 nesquena

This has been fixed now, so even this is supported:

config.beanstalk_url = ["beanstalk://127.0.0.1", "beanstalk://xxx.x.x.x:3456", "beanstalk://test.foo.com:6785"]

nesquena avatar Nov 07 '12 07:11 nesquena

I don't think it failovers properly.

config.beanstalk_url = ["beanstalk://queue1.vms", "beanstalk://queue2.vms"]

When both are responding, all is good:

>> Backburner.enqueue TestJob, 'hello'
 => true

Kill beanstalkd on queue2 and

>> Backburner.enqueue TestJob, 'hello'
Beaneater::NotConnected: Could not connect to 'queue2.vms:11300'

kke avatar Jul 04 '14 13:07 kke

Hey, shouldn't this be reopened? I am seeing the same behavior as @kke here.

marcusramberg avatar Feb 11 '15 12:02 marcusramberg

Re-opened

nesquena avatar Feb 15 '15 20:02 nesquena