These are chat archives for akkadotnet/AkkaStreams

Jan 2019
Jan 25 09:28
Hello Guys, I'm beginner here. Would like to know your thoughts on this:
What is the maximum number of actors (which uses Akka streams API to consume data from an infinite source) that we can create inside a single Actor system? I'm in need of creating a huge number of actors for my use case that I'm working.
Bartosz Sypytkowski
Jan 25 10:39

@aravindanck in general this is a good question for ( - akka .NET version) or ( - akka JVM version):

The simple answer is: millions - the pure actor overhead is several hundred of bytes. This doesn't count any sort of logic and state you're keeping inside them. But if you want some more advanced features, like persistence, this will require additional memory per actor + time spend on recovery/store process, which is heavily dependent on the actual persistence provider you're using - usually this is the major limiting issue aside of the hardware requirements.

Jan 25 11:45
Thanks for the reply @Horusiath. Yes, I'm trying this out in JVM. I'm creating actors per subscription (the system is expected to have subscriptions in millions). Each actor would consume data from an infinite source (like Kafka) - I'm thinking of using a Rx implementation here. Each of the actor would perform some asynchronous push operation (like pushing to an URL) for each of the consumed data (this is based on subscription). What I'm not clear is how does it manage a huge number of actors with a bunch of threads?
As far as the system I'm building, I'm not looking at using any sort of persistence, but resilience is a must i.e., how effective would it be to create a huge number of actors in a single system vs options to distribute the actors across cluster nodes somehow?