Using Postgres JDBC Drivers to connect to CockroachDB

We are using Java to connect to CockroachDB, the recommended Postgres JDBC drivers. Our JDBC connection string is not nice to deal with and hard to change. Do you recommend deploying with a load balancer in front of the cluster (e.g. ELB) or have any plans to develop “smart” client libraries that understand cluster topology better?

** Note: this is a copy of a community asked question on a different communication channel

The JDBC connection string is definitely hard to specify, and something we are aware of. We currently use HAProxy in testing / benchmarking so that you only have to specify the HAProxy load balancer in your JFDB string. We have documentation incoming on how to set that up soon. The load balancer would still need to be notified of cluster changes, but at least config reloads in HAProxy can be done live without taking the load balancer down. We are thinking of developing smarter client libraries at some point in the future. You could also consider using a DNS alias that includes all the hosts as a crude load balancer, but you would be at the mercy of whatever the DNS resolution algorithm is.