Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

max number of actors per host in akka

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?
like image 383
user93796 Avatar asked Sep 24 '13 18:09

user93796


People also ask

How do Akka actors interact with each other?

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

What are actors in Akka?

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.

What makes an actor valuable in Akka?

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.

What is a receptionist in Akka?

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.


1 Answers

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.

like image 59
Roland Kuhn Avatar answered Nov 08 '22 10:11

Roland Kuhn