Skip to main content

Rack Awareness

The Aerospike rack awareness feature stores replicas of records in different hardware failure groups. For example, if replication-factor is 2 (RF2), the master copy of a partition and its replica are stored in separate hardware failure groups. These groups are defined by their rack-id. The rack awareness configuration only affects the replica partitions, and does not affect master partitions distribution in the cluster.


Rack awareness is available only in Aerospike Database Enterprise Edition.

Rack awareness also provides a mechanism for database clients to read from the servers in the closest rack or zone on a preferential basis. This can result in lower latency, increased stability, and significantly reduced traffic charges by limiting cross-availability-zone traffic.

Master and replica distribution

By default, replica partitions are evenly distributed across all cluster nodes. Each node of a cluster containing n nodes owns approximately 1/nth of the data partitions as master. The replicas for these partitions are evenly distributed between the other n-1 nodes. In total, each node owns approximately rf/n where rf is the replication-factor. When a physical rack fails, or the Availability Zone in case of a cloud deployment, those nodes can contain both master and replica partitions for the same partition, resulting in possible data unavailability.

Replication factor and number of racks

  • If the replication-factor is less than or equal to the number of racks, replication factor number of racks are ensured to have one replica for a given partition.

  • If the replication factor is greater than the number of racks, all racks will have a copy of the partition's data, and some racks will have additional replicas for a given partition.

If a single node goes down, the cluster is temporarily unbalanced until the node is restored. This imbalance does not cause service interruptions. The cluster continues uninterrupted. Once the node restarts, the cluster automatically rebalances.

For more details on how to configure rack awareness, see Rack-aware section under Operations.