Register coordinator fail when I use proxy-only-mode for cluster sharding

Hello, I’m trying to use cluster sharding with proxy only mode.
I would like to run 2 node. One is only proxy mode without any entity and another for only entity.

I added below config

// for proxy only mode
akka.cluster {
    roles = ["frontend", "backend"]
    sharding = {
        role = "frontend"
    }
}
// for entity
akka.cluster {
    roles = ["frontend", "backend"]
    sharding = {
        role = "backend"
    }
}

I used ClusterSharding.get(actorSystem).startProxy in ‘frontend’ node,
and ClusterSharding.get(actorSystem).start in ‘backend’ node.

When ‘frontend’ node tell message to ‘backend’, below log is printed infinitely.

level=WARN  , logger=akka.cluster.sharding.ShardRegion, message=MyActor: Trying to register to coordinator at [ActorSelection[Anchor(akka://myapp@ip:port/), Path(/system/sharding/MyActorCoordinator/singleton/coordinator)]], but no acknowledgement. Total [1] buffered messages. [Coordinator [Member(address = akka://myapp@ip:port, status = Up)] is reachable.]

Do I need to add more config for using proxy only mode? Is there any detail reference about it?

akka.cluster.roles determines what roles the node has, so from your shared config, both of the nodes have roles frontend and backend.

The role you configure sharding with says what nodes should host actual shard regions, the other nodes will only be expected to run proxies. For the same shard type, it needs to be the same across all nodes of the cluster or they will have different expectations of what nodes host shard regions and sharding will not work.

When you start sharding, will look at the role and hand you a proxy or a region (ClusterSharding.init for typed or ClusterSharding.start for classic).

Thank you so much. I modified config and it works for me.

Here is what I modified.
I hope this will be helpful for others who faced same issue.

Config for entity holder node

akka.cluster {
    roles = ["MyActor"]
    sharding {
        role = "MyActor"
    }

Config for proxy node

akka.cluster {
    roles = ["MyProxy"]
    sharding {
        role = "MyActor"
    }