Set up
Front-end machine receives web requests and puts 3 different kinds of tasks into Gearman
server.
3 worker machines registered with that gearman server, each can perform any of those tasks.
Different tasks consume different resources.
Each task is different in terms of cpu/ram/io consumption.
The amount of tasks in queue is much greater then the number of workers, meaning each working machine registered multiple worker instances with gearman.
How to dynamically load balance it
The problem is that one worker machine can get all the cpu extensive tasks, another one would get the i/o extensive task, while ideally a worker can perform much better doing all this different kind of task in parallel.
Perhaps gearman isn't the right tool here?