Reputation: 526
I have an akka.net cluster with some singletons for administration and cron tasks. Currently the processing nodes are also the seeds ones.
I'd like to create a simple lighthouse that have only the role to be a connection spot for the cluster.
This way i can restart cluster processing nodes and be sure that the cluster will be recreate correctly.
My problem is that singleton mechanisme activate the actor on the oldest node and my lighthouse are considerate like all the other node in my cluster.
That imply it always try to setup the singleton actor instance in the lighthouse.
Is their a way to prevent the lighthouse node to be considered by the singleton host selection mechanisme ?
Upvotes: 1
Views: 247
Reputation: 421
Akka.Net has a 'roles' mechanism for this. You can give each node a number of roles, and for a particular type of actor to be created, you can indicate on which node 'roles' it may be created. A dedicated lighthouse (that's not supposed to do anything other than house light
has an empty roles list, your real worker nodes have a non-empty list.
Upvotes: 3