lib/aerospike/policy/replica.rb in aerospike-2.13.0 vs lib/aerospike/policy/replica.rb in aerospike-2.14.0
- old
+ new
@@ -26,9 +26,16 @@
# Always try node containing master partition first. If connection fails and
# Policy#retryOnTimeout is true, try nodes containing prole partition.
SEQUENCE = 2
+ # Try node on the same rack as the client first. If there are no nodes on the
+ # same rack, use SEQUENCE instead.
+ #
+ # ClientPolicy#rack_aware}, ClientPolicy#rack_id, and server rack
+ # configuration must also be set to enable this functionality.
+ PREFER_RACK = 3
+
# Distribute reads across all nodes in cluster in round-robin fashion.
# This option is useful when the replication factor equals the number
# of nodes in the cluster and the overhead of requesting proles is not desired.
RANDOM = 4