-
Notifications
You must be signed in to change notification settings - Fork 228
feat: add availability zone awareness for standalone client #930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
rueian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @nesty92
- 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 <[email protected]>
- 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 <[email protected]> Signed-off-by: Rueian <[email protected]>
No description provided.