Multiple host connection string

Hi Cockroach,

Does Cockroach support multiple host connection string? Something like…


or we have to create a load-balance in front of cockroach cluster?

Thank you

You can use haporxy,
refer to

@jawc The connection string is interpreted by the client library, not the Cockroach server. I’m not aware of which client libraries support multiple hosts in the connection string like that. If you’re using Go, I hacked up a small SQL driver that wraps around lib/pq and allows you to specify multiple URLs to round-robin amongst:

Or, as @Jasonsays, you can use a load-balancer like haproxy.