Hey, 
I am writing a POC for developing an large scale application. 
My application is constructed from agents which can run some checks on the 
node (a computer). The agents talk with the application using gRpc. 
Each check is getting back to my application, which decides by the response 
to run other checks - leading something resembling a graph in the end.  
I made partially successful POC with an real network of an 1000 nodes, but 
I have some questions. 
I created an actor for each mutable state (for each check). Each node can 
run thousands of different check requests - leading to millions of actors 
or more. In my POC, at the start of the application, all the actors are 
being created, and my server almost runs out of resources from the amount 
of actors and states being saved in the memory. 
I am trying to find way to throttle the "boot" resource usage to the amount 
my server can handle it even when I grow to 50,000 nodes or 500,000 nodes.
One of the ways I tried to do it is by limit the amount of active agents 
for each check for a certain amount as I dont mind the process taking 
longer or not being super responsive as it does not interacts with users.
I am trying to that by telling the router of each check to count its 
children and stash\unstash the messages when its getting to the limit. The 
children actors are stopping themself using setReceiveTimeout. 
The problem with that is that in Akka I can only unstashAll, causing all 
the actor queue to drain\fill every time the limit goes below the 
threshold, causing a lot of CPU being wasted.
Implementing my own stash\unstash using Queue is felling to me like I am 
doing something really wrong.
Also killing actors and creating them constantly from snapshots\events 
feels like abusing the Akka Persistence module. 
How would solve the the ability to run millions and ten of millions of 
requests, persisting their state, without exhausting the server resources, 
while using them as much as possible, without really worrying about being 
super responsive as those processes can take hours in some time?
Thanks!
 

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to