Skip to content

Commit f8e8f8a

Browse files
authored
Apply suggestions from code review
1 parent 4f6602c commit f8e8f8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,11 @@ client, err = rueidis.NewClient(rueidis.MustParseURL("unix:///run/redis.conf?db=
521521

522522
Starting from Valkey 8.1, Valkey server provides the `availability-zone` information for clients to know where the server is located.
523523
For using this information to route requests to the replica located in the same availability zone,
524-
set the `EnableReplicaAZInfo` option and your `ReadNodeSelector` function. Rueidis provides the following helpers:
524+
set the `EnableReplicaAZInfo` option and your `ReadNodeSelector` function with helpers:
525+
525526
- **PreferReplicaNodeSelector**: Prioritizes reading from any replica. Fallback to primary if no replicas are available.
526527
- **AZAffinityNodeSelector**: Prioritizes reading from replicas in the same availability zone, then any replica. Fallback to primary.
527528
- **AZAffinityReplicasAndPrimaryNodeSelector**: Prioritizes reading from replicas in the same availability zone, then primary in the same availability zone, then any replica. Fallback to primary.
528-
- **AZAffinityReplicaSelector**: A helper specifically for `ClientOption.ReplicaSelector`. Prioritizes replicas in the same availability zone.
529529

530530
For example:
531531
```go

0 commit comments

Comments
 (0)