Cluster design considerations

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 actively used data (the working set) lives in 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 Sizing Guidelines 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 nodes can be deployed across racks or availability zones in a regional data center. However, a Couchbase Server cluster is not designed to have nodes across multiple data centers across multiple regions. Intra-cluster replication is tuned for the low-latency server to server communication. If you require the ability to be in multiple data centers across geographical regions, see Cross Datacenter Replication (XDCR) .

Shared storage
It is strongly recommended to avoid using centralized back-end 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.