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

YSQL not support cluster connections? #3156

Closed
sain801028 opened this issue Dec 16, 2019 · 4 comments
Closed

YSQL not support cluster connections? #3156

sain801028 opened this issue Dec 16, 2019 · 4 comments
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users

Comments

@sain801028
Copy link

Does YSQL not support cluster connections?
I can't find it in the official example
https://docs.yugabyte.com/latest/quick-start/build-apps/go/ysql-pq/#create-the-application

What if there is a problem with the connection?

Will YSQL give a new master?

I hope that when something goes wrong, YSQL can automatically return me new master

Please let me know if I have a wrong idea.

@yugabyte-ci yugabyte-ci added the community/request Issues created by external users label Dec 16, 2019
@ddorian ddorian added the area/ysql Yugabyte SQL (YSQL) label Dec 16, 2019
@ddorian
Copy link
Contributor

ddorian commented Dec 16, 2019

hi @sain801028

The YSQL driver is not cluster aware.

For now, there are several ways:

  1. haproxy http://cbonte.github.io/haproxy-dconv/2.2/configuration.html#option%20pgsql-check providing the list of servers and using pgsql-check to see if servers are up
  2. https://github.com/awslabs/pgbouncer-rr-patch
  3. by providing a list of ips to tservers and using a routing function (example: returning a random server)
  4. implementing on the client, keeping a connection pooler for each tserver and randomly using one on each session
  5. https://github.com/yandex/odyssey as connection pooler
  6. https://www.pgbouncer.org/

does that satisfy your question ?

@sain801028
Copy link
Author

I have a question
I don't know who will be "master"

does it matter?

@ddorian
Copy link
Contributor

ddorian commented Dec 16, 2019

I have a question
I don't know who will be "master"

does it matter?

All nodes will satisfy every query.

@rkarthik007
Copy link
Collaborator

Hi @sain801028 @ddorian -

We are working on a clustered driver here: https://github.com/yugabyte/jdbc-yugabytedb

Please let us know if this is of interest, we would love to work with you if you are up to testing it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users
Projects
None yet
Development

No branches or pull requests

4 participants