Skip to content

Docs: need to clarify that Akka.Cluster.Sharding will automatically return a ShardRegionProxy when not on the right role #6013

@Aaronontheweb

Description

@Aaronontheweb

Please describe what you are trying to understand

Comment from a user in Discord:

I'm using ClusterSharding StartAsync(), and have broken the shard region onto their own nodes. Following the documentation here https://getakka.net/articles/clustering/cluster-sharding.html#starting-the-sharding-coordinator-actors, I was going down the path of creating a proxy if the shard host didn't match the node role. However, I found that a proxy was automatically created if StartAsync was called and the role didn't match the cluster node roles. I don't see this in the documentation, but looking the code for StartAsync() is see this comment:

/// This method will start a <see cref="ShardRegion"/> in proxy mode in case if there is no match between the roles of
/// the current cluster node and the role specified in <see cref="ClusterShardingSettings"/> passed to this method.

This could be useful to add to the documentation since wiring up a proxy isn't always needed.

Which pages have you looked at?

https://getakka.net/articles/clustering/cluster-sharding.html#starting-the-sharding-coordinator-actors

How can we do it better?

We should mention upfront in this section when ShardRegionProxy will be created automatically when trying to create a ShardRegion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions