One of the most powerful ways to use Akka.NET in production is to create clustered applications that can scale on-demand. You can literally deploy code somewhere other than the immediate, local process making the call.
And the way this is accomplished is with the Akka.Cluster module. AkkaCluster is the module that adds clustering capabilities to our Akka.NET applications.
When do I need clustering?
Clustering is something you need to use in high availability scenarios, or when you need elastic scalability in your systems.
Here are some examples of high availability scenarios that come up often in the real-world, and these are projects that often use clustering!
- Analytics
- Marketing Automation
- Multiplayer Games
- Devices Tracking / Internet of Things
- Alerting & Monitoring Systems
- Recommendation Engines
- Dynamic Pricing
- …and many more!
As you can see, clustering has a wide-range of use cases, and it’s also the way to create a scalable microservices architecture in Akka.NET. To put it bluntly, you should use clustering in any scenario where you have:
- A sizable load of traffic;
- With non-trivial work that has to be performed;
- And an expectation of fast response times;
- And frequent mutation in state.
How Do I Form a Cluster of Services?
After you’ve enabled Akka.Cluster inside your Akka.NET application, it’s easy to make your locally developed application cluster over the network.