Skip to content
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

Node type aware load balancing #11

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Node type aware load balancing #11

wants to merge 9 commits into from

Conversation

HarshDaryani896
Copy link

@HarshDaryani896 HarshDaryani896 commented Feb 20, 2025

IDEA: IDEA-1197

Implementation details: Doc

The connection property loadBalance currently allows only two values, viz. false (the default) and true.

It will now also allow below five new values to be specified:
only-rr - Create connections only on Read Replica nodes
only-primary- Create connections only on primary cluster nodes
prefer-rr - Create connections on Read Replica nodes. If none available, on any node in the cluster including primary cluster nodes
prefer-primary - Create connections on primary cluster nodes. If none available, on any node in the cluster including Read Replica nodes
any - Equivalent to value true. Create connections on any node in the primary or Read Replica cluster

default value is still false

Other Minor changes:

  • Added the following 2 new connection properties: fallbackToTopologyKeysOnly and failedHostReconnectDelaySecs

Testing:
Test cases identified and listed in this doc.
Test for all test cases listed in the doc added to driver-example repo: PR LINK.
Ran the existing and new tests in driver examples repo for node-postgres.

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