feat: add availability zone awareness for standalone client#930
feat: add availability zone awareness for standalone client#930rueian merged 1 commit intoredis:mainfrom
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
|
@rueian, would love to get your thoughts on this PR. Quick question: should we also be updating the nodes when the redirect is active? Not 100% sure on that part. |
53debc8 to
38af4db
Compare
|
Hi @nesty92, thanks for the PR. Would you mind splitting the helpers to another PR? And the index 0 of the node slice may not be the primary if the user uses ReplicaSelector instead of ReadNodeSelector. I am also wondering if the helpers can be optimized with bit operations to avoid the second round of zone string comparison. |
dc0bf28 to
e703768
Compare
Signed-off-by: Ernesto Alejandro Santana Hidalgo <ernesto.alejandrosantana@gmail.com>
- Add `AZAffinityNodeSelector` to prioritize replicas in the same Availability Zone. - Add `AZAffinityReplicasAndPrimaryNodeSelector` for granular control, prioritizing local replicas, then local primaries, before falling back to remote nodes. - Add `PreferReplicaNodeSelector` for explicit routing requirements. - Update `ClientOption` to use strict function types (`ReadNodeSelectorFunc`) for improved type safety. Depends on #930 Signed-off-by: Ernesto Alejandro Santana Hidalgo <ernesto.alejandrosantana@gmail.com>
- Add `AZAffinityNodeSelector` to prioritize replicas in the same Availability Zone. - Add `AZAffinityReplicasAndPrimaryNodeSelector` for granular control, prioritizing local replicas, then local primaries, before falling back to remote nodes. - Add `PreferReplicaNodeSelector` for explicit routing requirements. - Update `ClientOption` to use strict function types (`ReadNodeSelectorFunc`) for improved type safety. Depends on redis/rueidis#930 Signed-off-by: Ernesto Alejandro Santana Hidalgo <ernesto.alejandrosantana@gmail.com> Signed-off-by: Rueian <rueiancsie@gmail.com>
No description provided.