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
