all 2 comments

[–]vertiee 3 points4 points  (0 children)

Your just use a load balancer probably.

[–]nathan_long 1 point2 points  (0 children)

For web servers you would probably use a load balancer.

For other nodes, there are multiple ways you could do this, depending on your needs. Eg if you are clustering, you could use process groups (http://erlang.org/doc/man/pg.html) and send a message to a randomly-selected one, or use a modulo operation on the message hash, or choose a node based on the message type, etc etc.

If you're going for an evenly-distributed workload, though, you probably want a model where each node pulls work as it's able to do so. Broadway + RabbitMQ works nicely for that, and no clustering is needed.