thanks. I would like to ensure that when new Nodes are added they do not take their share of objects from all the other cache machines. I guess I would need to implement my own caching algo for this to work.
Am Dienstag, 21. April 2015 12:09:37 UTC+2 schrieb drewhk: > > Hi John, > > On Tue, Apr 21, 2015 at 11:14 AM, <[email protected] <javascript:>> > wrote: > >> akka.actor.deployment { >> /myRouter { >> router = consistent-hashing-group >> nr-of-instances = 10000 >> >> routees.paths = ["/user/worker"] >> cluster { >> max-nr-of-instances-per-node = 1 >> enabled = on >> allow-local-routees = off >> use-role = recipient >> } >> } >> } >> >> If I start with for example 3 worker nodes "A" "B" "C" the >> consistent-hashing-group algorithm works as expected: >> If a worker on node "B" recievies a message with a consistentHashKey = "123" >> this message is always send to "B" >> >> But if I add a Node D from now on the message consistentHashKey = "123" is >> send to D. >> >> Is this the expected behaviour? >> >> Yes it is, this is how consistent hashing works: > https://en.wikipedia.org/wiki/Consistent_hashing > > Quoting: > "Consistent hashing maps objects to the same cache machine, as far as > possible. It means when a cache machine is added, it takes its share of > objects from all the other cache machines and when it is removed, its > objects are shared between the remaining machines." > > The goal of consistent caching is to: > - not to store a global index of all key->node mappings (that would be > needed in your example not to remap "123" to another node) because it is > very expensive and fragile > - remap only part of the keyspace between nodes, most objects are mapped > to the node they were mapped before when a node is added or removed. > > -Endre > > >> >> -- >> >>>>>>>>>> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
