Search Results for

Show / Hide Table of Contents

# Namespace Apache.Ignite.Core.Cache.Affinity.Rendezvous

### Classes

#### ClusterNodeAttributeAffinityBackupFilter

Attribute-based affinity backup filter, see Attributes, AffinityBackupFilter.

This filter can be used to ensure that, for a given partition, primary and backup nodes are selected from different racks in a datacenter, or from different availability zones in a cloud environment, so that a single hardware failure does not cause data loss.

This implementation will discard backups rather than place multiple on the same set of nodes. This avoids trying to cram more data onto remaining nodes when some have failed.

This class is constructed with a set of node attribute names, and a candidate node will be rejected if any of the previously selected nodes for a partition have identical values for all of those attributes on the candidate node. Another way to understand this is the set of attribute values defines the key of a group into which a node is placed, and the primaries and backups for a partition cannot share nodes in the same group. A null attribute is treated as a distinct value, so two nodes with a null attribute will be treated as having the same value.

For example, let's say Ignite cluster of 12 nodes is deployed into 3 racks - r1, r2, r3. Ignite nodes have "SITE" attributes set accordingly to "r1", "r2", "r3". For a cache with 1 backup (Backups set to `1`), every partition is assigned to 2 nodes. When the primary node has "SITE" attribute set to "r1", all other nodes with "SITE"="r1" are excluded by this filter when selecting the backup node.

#### RendezvousAffinityFunction

Affinity function for partitioned cache based on Highest Random Weight algorithm.