> 3 apr 2015 kl. 17:34 skrev Akka Team <akka.offic...@gmail.com>:
> 
> Hello Olle,
> 
>> Are there any way of not having all cluster-singleton actors running on the 
>> same node ( the leader node of the cluster ) in case that a service needs to 
>> be migrated to another node because of other reasons than a node is down ( 
>> out of disk space or something like that ).
> It does not have to be running on the cluster leader - it can run on "oldest 
> node that has a given role", it's documented here:
> http://doc.akka.io/docs/akka/current/contrib/cluster-singleton.html 
> 
> So you can have roles like "backend" or "cpu-heavy" and then the singleton 
> would be running on the oldest cluster member that contains each its required 
> role.
> We do not support very dynamic moving of singletons around as you seem to be 
> asking for.
> Singletons are usually used for light "master" or "scheduler" Actors, and the 
> actual work would be performed by some sharded workers.
> 
> Do you feel you have a strong use-case for it or are just wondering if it's 
> possible?
> 
> 
>> I noticed that you can use roles for the cluster-singleton, what happens if 
>> a new leader is elected but without the roles needed for a particular 
>> cluster singleton would that service be spun up on a non-leader node ?
> The cluster "leader" is not what decides where the singleton is being run. 
> The singleton is running on "oldest node, that matches it's role 
> requirements".
> Yes, if you do not require any roles, this requirement matches with the node 
> that we call the cluster leader, but as you see the singleton may (and often 
> will) run on non-leader nodes.

Let me clarify the terminology. What we call cluster leader is actually the 
node with the lowest address (sorted by hostname:port). That is not the same as 
the oldest node. Singleton runs on the oldest node (with matching role 
requirements).

This is not the first time this comes up. Is the documentation wrong somewhere?

/Patrik

> 
> Hope this helps! 
> 
> 
> -- Konrad
> 
>> On Tue, Mar 31, 2015 at 8:38 AM, <olle.martens...@gmail.com> wrote:
>> Hi,
>> 
>> A couple of questions regarding the cluster-singleton functionality:
>> Are there any way of not having all cluster-singleton actors running on the 
>> same node ( the leader node of the cluster ) in case that a service needs to 
>> be migrated to another node because of other reasons than a node is down ( 
>> out of disk space or something like that ).
>> I noticed that you can use roles for the cluster-singleton, what happens if 
>> a new leader is elected but without the roles needed for a particular 
>> cluster singleton would that service be spun up on a non-leader node ?
>> Thanks, Olle 
>> 
>> 
>> 
>> -- 
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ: 
>> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Akka Team
> Typesafe - Reactive apps on the JVM
> Blog: letitcrash.com
> Twitter: @akkateam
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to