How many max actors can we have on one box in akka?
public void MyActor extends AkkaActor{
receive(Objet obj){
// so something
}
}
1)Is there some limit on max number of actors instances?I am planning to created around 10K actors on one box. I will have 50 such boxes so that i can scale horizontally
2)IS there some performance problems with this?
Normally, Akka actors interact with other actors using references obtained in one of five ways: Retrieving an actor reference from the actorSelection function using the actor name Sending a message as a reply to another message using the sender reference
Actors were defined in the 1973 paper by Carl Hewitt but have been popularized by the Erlang language, and used for example at Ericsson with great success to build highly concurrent and reliable telecom systems. The API of Akka’s Actors has borrowed some of its syntax from Erlang.
These data are what make an actor valuable, and they must be protected from corruption by other actors. The good news is that Akka.NET actors conceptually each have their own light-weight thread, which is completely shielded from the rest of the system.
In Akka, we have a built-in actor called a Receptionist, which receives registration requests from actors and sends actor references to actors that requested an actor reference. It works as a lookup table mapping from a ServiceKey to an actor reference.
It is just a matter of having enough memory: the overhead of one actor is roughly 400 bytes (plus whatever state you keep within it). This means that on typical systems you can have millions of actors. The performance does not depend on the number of actors you create, it depends on how many messages you send between them. You should not worry if that number is up to a few million per second, beyond that you will have to benchmark your program against your chosen hardware to see if it works out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With