drepster
10/02/2026, 2:44 PMNuutti Hölttä
10/06/2026, 1:49 PMShardingStrategies.CreateStaticService() for the ShardingStrategy (i'm ignoring dynamically-scaling node sets, player entities don't use them anyway).
To calculate the EntityId value of the cache where a given player's info is: take the player id value, modulo by clusterConfig.GetNodeCountForEntityKind(EntityKindGame.PlayerInfoCache) (from ClusteringOptions). This method has an obsoletion warning related to dynamic scaling, but it can be silenced since we know dynamic scaling isn't involved.
The rest is what you probably already have: messages for updating and getting a player's info.
And probably some pruning to keep memory usage bounded.
As you say, threading issues are avoided, as each entity works one message at a time, so the cache can use e.g. a plain Dictionary<,> without locking.
For a simple cache like this, i wouldn't bother with the complication of separate write/read replicas.
I expect the individual operations to be quite cheap.drepster
10/08/2026, 12:14 PM