1

I'd like to connect to multiple nodes in a CrateDB cluster from pgx and execute queries in a round robin fashion.

Ideally if a node fails queries would be retried on the other nodes.

There's a client in Python that supports clustering but only found PGX for Go from the supported clients page: https://crate.io/docs/crate/clients-tools/en/latest/

Rob
  • 11
  • 1
  • 1
  • I think PGX does support adding multiple hosts, however not to be used in a round robin fashion, but rather only for failover. You would need to write your own function on top of it, handling multiple connections or use a load balancer for the cluster. https://github.com/jackc/pgx/pull/545 – proddata Nov 14 '22 at 08:09

0 Answers0