What is the purpose of Cluster Sharding I have went through some guides but I didn’t get a clear picture on what it is.
What is the best usecase to use cluster sharding ?
I have a RunnerCluster
And I have a ClientCluster client which running on separate machine.
When I send start message from client to runnerCluster then anyone of the node in the RunnerCluster will receive the message.
After receiving this, my business logic is,
if (myCondition.equals(sleep)) create a SleepActor on 172.24.117.1:3001 else if ((myCondition.equals(weight)) create a WeightActor on 172.24.121.75:3001 else create a FuncActor on 172.24.123.240:3001
How will I achieve the above usecase ?
Here I want to send mesaage to a specific remote machine if particular condition met. So remote machine means we need to know the IP address and port of the app running.
Cluster sharding says that by using a logical keys (in form of ShardId/EntityId pairs) it’s able to route our messages to the right entity without need to explicitly determine on which node in the cluster it lives.
So my question here is,
How will they know whom to send a message without the knowledge of IP and port ?
How routing works in cluster sharding ?
What is the role of ShardId, and EntityId?
By using this how will we route the message to specific remote machine ?
I have red so many guides but did’t have clear knowledge on this So please advice me on this…