Skip to content

Conversation

@nesty92
Copy link
Contributor

@nesty92 nesty92 commented Jan 5, 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

@nesty92 nesty92 changed the title add Az awereness helpers add Az awareness helpers Jan 5, 2026
@nesty92 nesty92 force-pushed the feat/az-helpers branch 2 times, most recently from cd1da7f to 02c2637 Compare January 6, 2026 23:02
This commit introduces a suite of new node selectors to optimize read latency
and reduce cross-az costs

Changes:
- 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.

Signed-off-by: Ernesto Alejandro Santana Hidalgo <ernesto.alejandrosantana@gmail.com>
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.

Thanks @nesty92!

@rueian rueian merged commit ddb7619 into redis:main Jan 7, 2026
27 checks passed
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