Skip to content

ClusterSharding

Defined in: src/cluster/sharding/ClusterSharding.ts:75

User-facing entry point. Attaches to an ActorSystem + Cluster pair and lets you start a sharded region for each entity type. A ShardCoordinator is spawned lazily on every node; only the one hosted by the current cluster leader is active — the rest act as warm standbys.

readonly cluster: Cluster

Defined in: src/cluster/sharding/ClusterSharding.ts:81


readonly system: ActorSystem

Defined in: src/cluster/sharding/ClusterSharding.ts:80

start<TMsg>(settings): ActorRef<TMsg>

Defined in: src/cluster/sharding/ClusterSharding.ts:97

Start a sharded region for a type. Returns the local region ActorRef.

TMsg

StartSettings<TMsg>

ActorRef<TMsg>


startProxy<TMsg>(settings): ActorRef<TMsg>

Defined in: src/cluster/sharding/ClusterSharding.ts:118

Start a proxy region — routes to the cluster but never hosts entities.

TMsg

Omit<StartSettings<TMsg>, "proxy">

ActorRef<TMsg>


static get(system, cluster): ClusterSharding

Defined in: src/cluster/sharding/ClusterSharding.ts:88

ActorSystem

Cluster

ClusterSharding