You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by ttthree <tt...@qq.com> on 2016/04/24 05:42:06 UTC

How to configure cache backup copies distributed into different fault domain

When using Ignite as a key value store (cache), is there a way to let Ignite
know a bit about the physical location of each node so that it can
distribute the cache copies in a more fault tolerant manner?

E.g. node 1 and 2 are in rack A while node 3 is in rack B so that if i
configure with 1 backup, the backup copy of a cache partition in node 1
should be put on node 3 instead of node 2.

I failed to find this information on the document site.
Any information would be appreciated!



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-configure-cache-backup-copies-distributed-into-different-fault-domain-tp4482.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to configure cache backup copies distributed into different fault domain

Posted by ttthree <tt...@qq.com>.
Thanks Alexy,
This is definitely helpful!



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-configure-cache-backup-copies-distributed-into-different-fault-domain-tp4482p4486.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to configure cache backup copies distributed into different fault domain

Posted by Alexey Goncharuk <al...@gmail.com>.
Hi,

You can achieve this behavior by setting a backup filter to
RendezvousAffinityFunction or FairAffinityFunction (e.g. see
org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction#setBackupFilter).
This filter is a predicate that accepts the assigned primary node and a
potential candidate for a backup node. You only need to add a rack ID to
your node attribute and check this attribute in the backup filter.

Hope this helps,
Alexey