Skip to content

Conversation

@nesty92
Copy link
Contributor

@nesty92 nesty92 commented Dec 26, 2025

No description provided.

@jit-ci
Copy link

jit-ci bot commented Dec 26, 2025

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.

@nesty92
Copy link
Contributor Author

nesty92 commented Dec 26, 2025

@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.

@nesty92 nesty92 force-pushed the main branch 2 times, most recently from 53debc8 to 38af4db Compare December 26, 2025 02:37
@rueian
Copy link
Collaborator

rueian commented Dec 27, 2025

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.

@nesty92 nesty92 force-pushed the main branch 4 times, most recently from dc0bf28 to e703768 Compare January 5, 2026 00:08
Signed-off-by: Ernesto Alejandro Santana Hidalgo <[email protected]>
@nesty92
Copy link
Contributor Author

nesty92 commented Jan 5, 2026

Hi @rueian, here is the PR for the helpers #932

@rueian rueian merged commit 8fd75f0 into redis:main Jan 5, 2026
27 checks passed
Copy link
Collaborator

@rueian rueian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @nesty92

rueian pushed a commit that referenced this pull request Jan 7, 2026
- 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]>
rueian pushed a commit to valkey-io/valkey-go that referenced this pull request Jan 12, 2026
- 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants