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

Support a case when the cluster could be behind a load-balancer #41

Open
wants to merge 1 commit into
base: 4.6.0-yb-x
Choose a base branch
from

Conversation

ashetkar
Copy link

The driver expects direct access to all the nodes in a YugabyteDB cluster.
We have seen some users use the cluster through an external load-balancer.
While it is not a recommended practice, the driver still functions but with less efficiency and a hampered retry policy.

This change aims to address a case which cannot be handled through a custom RetryPolicy.
If a request fails during a send to a node, AND the query-plan for the request does not have any other nodes AND if the node still has some connections, then retry send one more time.
This should not cause any perf impact since it is retry-once in a rare case, in a non-LB setup.

Changes in PartitionAwarePolicy are purely formatting related.

Testing
This was tested manually through an app connecting to a YB Managed cluster.
No unit test possible since it involves external load-balancer.

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.

1 participant