Loadbalancing (HAProxy) connections to Couchbase cluster
we are using Couchbase PHP extension. I suppose this is Type 2 (vBucket-aware) client which gets cluster topology on connect and after that communicates directly to cluster nodes and handles potential topology changes.
I thought that cluster topology can be received from any cluster node. So instead of listing all cluster nodes in connect we tried to use HAProxy loadbalancer. HAProxy can monitor nodes (through GET /pools/heartbeat) and ensure that connection is always made to node which is alive (in case of some node failure).
Unfortunately we get many connection errors or read timeout errors when connecting through HAProxy. We tried many different HAProxy configurations (TCP/HTTP mode, long timeouts, ...) but without success.
Can you confirm that using loadbalancer for connecting to Couchbase cluster is possible? Or should we always provide list of all cluster nodes to PHP client on connect?