Put this in the "Couchbase in the Cloud" section:
Alternate configuration for Moxi and Couchbase Clients: using a load balancer.
The typical way of configuring Moxi and the Couchbase clients is to direct them to the management interface (port 8019) on one or more IP addresses or hostnames of the nodes of a Couchbase Server cluster (provide links). This connection is used to get the initial topology map and maintaining a connection for when that topology changes. Only one connection at any given time is needed, multiple addresses are provided for HA in the event that one node in the list is down.
A challenge in this setup arises when deploying Couchbase in environments where the IP addresses of the Couchbase Server Cluster nodes are changing frequently or may not be known at the time of client instantiation. Most typically, this arises in cloud environments (Amazon EC2).
To workaround this challenge, the list of IP addresses or hostnames passed to Moxi or the Couchbase clients can be replaced with a single IP that directs to a load balancer or reverse proxy. That load balancer or reverse proxy is then responsible for maintaining a list of the current Couchbase servers and "proxying" the connection to port 8091 from Moxi or the clients to the Couchbase Server Cluster nodes.
Note that this is NOT affecting or being in any part responsible for the data or view querying connections to ports 11210 and 8092 respectively. Those connections and that traffic will still be sent directly to the Couchbase Server nodes. It is still important to ensure that all the clients are able to reach all of the Couchbase nodes on the various ports (provide link)
The configuration of Moxi and the Couchbase clients does not need to look any different, however there are some important considerations to take into account:
-First and foremost, ensure that the load balancer IP (or VIP) is always available. This may seem obvious, but it's important to realize that this becomes a single-point of connection for all your clients connecting to a Couchbase Server Cluster and therefore must be ensured to always exist.
-Ensure that the load balancer stays up-to-date with any Couchbase Server Cluster changes. You do not want "stale" nodes to be used for connection.
-Ensure that the load balancer has enough resources and available connections for all your clients to connect to it.
-Turn off any "idle connection reset" functionality. This differs from product to product, but the connection to port 8091 will seem "idle" for most of the time and having the load balancer/proxy reset it will only cause extra unnecessary traffic and possible disruption to your operations during steady-state