-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Provide a way to stop cluster sync from moving an actor to another peer #627
Comments
@CristianoBarone Thanks for the feature request. Much appreciated. I will take a look at this use case and hopefully add it in the coming weeks. |
@CristianoBarone Can you please explain the usecase here?. |
Say I have a system which manages a series of node flows. In the event of a peer closing down, I absolutely need to move them to avoid service disruption. In this, GoAkt is pretty solid. The problem however, is when the system must rely on an actor to retrieve a configuration or expose an endpoint. In this case, it seems that there's no way to ensure that the one specific actor handling this won't get moved in rebalancing, meaning that if one peer overloads then it won't be able to function properly anymore as a whole. And there's also the second problem that stems from the whole situation, which is that one peer will have two nodes handling configuration while another has none, or when a peer is closed, there will be another peer with two actors that serve the same purpose. One of the actors would be sitting around doing nothing, while it should actually be doing things on the other peer or shouldn't be up at all. |
@CristianoBarone Thank you for the use case. I know what to add a feature to handle such use case. |
@CristianoBarone I have another type of actor called singleton actor. This type of actor has the following behaviors:
|
@CristianoBarone I am yet to cut a new release tag. You can try it with the latest pre-release https://github.com/Tochemey/goakt/tree/v3.1.0-alpha.1. There is a doc that explains the concept: https://tochemey.gitbook.io/goakt/features/cluster/cluster-singleton |
@CristianoBarone the latest release with your feature request is here https://github.com/Tochemey/goakt/releases/tag/v3.1.0. Happy hacking 🎉 |
Problem description
When using discovery, it can happen that the peer needs one specific actor running only on that peer. So if the peer terminates or needs to rebalance, that one actor must not be moved to another peer. As far as the documentation provides, it seems like there is no such feature yet.
Solution description
Implement a actor.SpawnOption that tells the rebalancer to never move the spawned actor to another peer. Something like
actor.WithOutRebalancing()
.Alternative solutions
Implement a actor.ClusterConfig function that ignores specific nodes. Something like
actor.IgnoreKinds()
.Additional context
.
The text was updated successfully, but these errors were encountered: