Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

If I have two workers listening on a single tube and a job comes through, will both workers attempt to handle the same job, or will it get claimed only by one?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Only one worker will claim your job. So it's one by one.

A job in beanstalk gets created by a client with the "put" command. During its life it can be in one of four states: "ready", "reserved", "delayed", or "buried". After the put command, a job typically starts out ready. It waits in the ready queue until a worker comes along and runs the "reserve" command. If this job is next in the queue, it will be reserved for the worker. The worker will execute the job; when it is finished the worker will send a "delete" command to delete the job.

A worker that wants to consume jobs from the queue uses "reserve", "delete", "release", and "bury".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.