Prog_G
Prog_G

Reputation: 1615

how to do load balancing on remote Actors in Akka?

I am working in a distributed environment where I have to setup Actors in remote systems. I want to distribute the load among all the remote actors. Can anyone suggest me the best way to balance load in a cluster? My current scenario is in one remote system I have 10 actors which are running. so for example, let's say I have 3 system and systems have 10 actors and I want to balance the load among all the 30 actors.

Upvotes: 0

Views: 1540

Answers (1)

johanandren
johanandren

Reputation: 11479

A good way to distribute work is by pulling it from the worker instead of centralising the decision and pushing, which can potentially overload the worker nodes if you have a higher rate of work coming in than you can actually process.

There is a sample project and tutorial showing worker actors pulling work here: https://developer.lightbend.com/guides/akka-distributed-workers-scala/

Upvotes: 3

Related Questions