You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: glide-core/redis-rs/redis/src/cluster_client.rs
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -387,17 +387,16 @@ impl ClusterClientBuilder {
387
387
self
388
388
}
389
389
390
-
/// Sets the read strategy on all new connections, based on the specified policy.
390
+
/// Set the read strategy for this client.
391
391
///
392
-
/// Using the specified `read_strategy`, this function configures whether read queries will be
393
-
/// routed to replica nodes or primary nodes. If `ReadFromReplicaStrategy::AZAffinity` is set,
394
-
/// read requests will first attempt to access replicas in the same availability zone, falling
395
-
/// back to other replicas or the primary if needed. If `ReadFromReplicaStrategy::RoundRobin` is chosen, reads are distributed
396
-
/// across replicas for load balancing, while `ReadFromReplicaStrategy::AlwaysFromPrimary` ensures all read and write queries
397
-
/// are directed to the primary node.
392
+
/// The parameter `read_strategy` can be one of:
393
+
/// `ReadFromReplicaStrategy::AZAffinity(availability_zone)` - attempt to access replicas in the same availability zone.
394
+
/// If no suitable replica is found (i.e. no replica could be found in the requested availability zone), choose any replica. Falling back to primary if needed.
395
+
/// `ReadFromReplicaStrategy::RoundRobin` - reads are distributed across replicas for load balancing using round-robin algorithm. Falling back to primary if needed.
396
+
/// `ReadFromReplicaStrategy::AlwaysFromPrimary` ensures all read and write queries are directed to the primary node.
398
397
///
399
398
/// # Parameters
400
-
/// - `read_strategy`: Defines the replica routing strategy.
399
+
/// - `read_strategy`: defines the replica routing strategy.
0 commit comments