// AKKA.CLUSTER

Scale Across Machines with Heterogeneous Clusters

Akka.Cluster lets you distribute actors horizontally across multiple instances for better fault tolerance and scalability. Form heterogeneous clusters of multiple services — each with their own domains, infrastructure, and actors — all cooperating seamlessly.

ref: topology

// HETEROGENEOUS_CLUSTERS

Multiple Services, One Cluster

Network distinct codebases into a single Akka.NET cluster. Each service has its own domain, its own actors, its own infrastructure — but they all communicate via actor messages as if they were local.

Heterogeneous Akka.NET cluster — three services communicating via actor messages Heterogeneous Akka.NET cluster — three services communicating via actor messages

Three codebases. One cluster. Feels like local development.

ref: code

// IN_CODE

Cluster Sharding in a Few Lines

Register a shard region with WithShardRegion<T>(). Akka.NET distributes actors across nodes automatically. Send a message and sharding routes it to the right node — you never think about which machine it's on.

Program.cs
builder.Services.AddAkka("OrderSystem", configurationBuilder =>
{
    configurationBuilder
        .WithRemoting("localhost", 8110)
        .WithClustering()                     // join cluster
        .WithShardRegion<OrderActor>(          // distribute actors
            typeName: "orders",
            entityPropsFactory: (_, _, resolver) =>
                id => resolver.Props<OrderActor>(id), // DI-aware
            messageExtractor: extractor,
            shardOptions: new ShardOptions());
});

// Send a message — sharding routes it to the right node automatically
var orders = registry.Get<OrderActor>();
orders.Tell(new PlaceOrder("order-4821", items));
ref: features

// KEY_CAPABILITIES

Core Clustering Features

Cluster Sharding

Automatically distribute actors across nodes by entity ID. Actors migrate seamlessly during scale-up, scale-down, and rebalancing. One actor per entity, guaranteed.

Heterogeneous Clusters

Network distinct codebases into one cluster. Front-end, back-end, and management services all communicate as if they were local. Akka.NET is by far the easiest platform in .NET to do this.

Distributed Pub/Sub

Publish messages to topics across the cluster. Subscribers receive messages regardless of which node they're on. No external message broker required.

Cluster Singleton

Guarantee exactly one instance of an actor across the entire cluster. Automatically migrates if the hosting node goes down.

Akka.NET Cluster Sharding entity taxonomy

Cluster Sharding distributes entities across nodes automatically

ref: example

// USE_CASE

Example: Financial Services Platform

Imagine a financial services platform with three distinct applications: a front-end for loan pre-qualification, a back-end for creditworthiness assessment and dynamic pricing, and an account management service handling balances and notifications. With Akka.Cluster, these three codebases — each with their own domains and actors — network together into one cluster. Cluster Sharding, Distributed PubSub, and Clustered Routers let them communicate seamlessly.

Because everything's an actor, it feels the same as developing locally. With our .NET Aspire integration, it's easy to spin up a heterogeneous cluster for local development too.

Actors processing a loan application — fan-out, gather, behavior switching Actors processing a loan application — fan-out, gather, behavior switching

Actors fan out work concurrently, gather results, and switch behavior — no locks, no shared state

ref: customers

// WHO_USES_THIS

Priva

Agriculture / IoT — Netherlands

Priva, a world market leader in greenhouse climate management, standardized on Akka.NET across their cloud platform and on-premise gateway systems after evaluating Orleans and Service Fabric. They manage thousands of connected IoT devices globally using Cluster Sharding, Akka.Persistence, and Akka.Discovery on Azure Container Apps with zero-downtime deployments and KEDA-based autoscaling.

PR Priva YouLend YouLend BN BNSF Bank of America Bank of America Tranzact Tranzact
ref: newsletter

// STAY_CONNECTED