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 load balancing of connection on multiple clusters #26

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Sfurti-yb
Copy link

@Sfurti-yb Sfurti-yb commented Jan 16, 2025

Problem statement:

In a multi-cluster environment, the current implementation of the pgjdbc driver fails to handle connections correctly. The clusterinfomap does not distinguish between nodes belonging to different clusters. As a result:

  • All nodes of all clusters are stored together in the same map.
  • When a connection request comes in for a specific cluster, the driver may incorrectly route the connection to a node in a different cluster.

This lack of demarcation for nodes across clusters prevents reliable support for multi-cluster deployments and introduces ambiguity in connection routing.

Changes made:

A new column, universe_uuid, is to be introduced in the existing yb_servers function. This column will serve as a unique identifier for the universe (cluster) to which each server belongs.
Details of the implementation provided in this doc.

Testing

Test cases being added to the driver-examples repo. TODO: Add link here once done

@Sfurti-yb Sfurti-yb marked this pull request as draft January 16, 2025 07:28
@Sfurti-yb Sfurti-yb changed the title Multi cluster support Support load balancing of connection on multiple clusters Jan 16, 2025
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