-2

I am processing 1 lakh urls using perl gearman client and worker .

I need your help to run single job in multiple worker . (ie if i have 5 workers and 1 client i want all these 5 workers to do the job of one client ),currently I am running 20 clients and 30 workers but only 20 workers are running the job balance 10 workers are idle.

Thanks in advance

3 Answers3

0

Gearman worker grabs one job, and takes it as an execution unit. If you would like to run one job on multiple workers, you should probably divide your job into several sub-jobs.

0

You can create a manager which manages jobs and coordinates other workers.

0

The approach you need is called fan-out, but gearman cant do this. you have to use rabbitmq like message queue. it can send a same message to different workers with fanout exchanges.

guy_fawkes
  • 947
  • 8
  • 31