Cluster design considerations

Cluster design takes into account topics such as RAM, number of nodes and cores, client or server-side moxi, and so on.

RAM:
Memory is a key factor for smooth cluster performance. Couchbase Server is a best solution for applications that keep most of their active dataset in memory. It is very important that all ctively uised data (the working set) lives memory. When there is not enough memory left, some data is ejected from memory and will only exist on disk. Accessing data from disk is much slower than accessing data in memory. As a result, if ejected data is accessed frequently the cluster performance suffers. Use the formula provided in the next section to verify your configuration, optimize performance, and avoid this situation.
Number of nodes:
Once you know how much memory you need, you must decide whether to have a few large nodes or many small nodes.
  • Many small nodes: You are distributing I/O across several machines. However, there is also a higher chance of node failure (across the whole cluster).
  • Few large nodes: If a node fails, it greatly impacts the application.
  • Choosing between many small nodes and few large nodes presents a tradeoff between reliability and efficiency.
Client or server-side moxi:
Couchbase Server prefers a client-side moxi (or a smart client) over a server-side moxi. However, for development environments or for faster, easier deployments, you can use server-side moxis. A server-side moxi is not recommended because it produces an additional hop if a server receives a client request and doesn’t have the requested data.
Number of cores:
Couchbase Server is more memory- or I/O bound than it is CPU-bound. However, it is more efficient on machines that have at least two cores.
Storage type:
You can choose either SSDs (solid state drives) or spinning disks to store data. SSDs are faster than rotating media but are currently more expensive. Couchbase Server needs less memory if a cluster uses SSDs as their I/O queue buffer is smaller.
WAN Deployments:
Couchbase Server is not intended to have clusters or clients span data centers. Couchbase requires that the latency should be very low intra-cluster (server to server) and between a cluster and Couchbase clients. If you require the ability to be in one or more data centers, for example, see Cross Datacenter Replication (XDCR).
Shared storage:
It is strongly recommended to avoid using centralized backend storage system such as a SAN or NAS. While they can support good performance, they present a single bottleneck or point of failure that limits the distributed nature of Couchbase.