Deployment Guidelines

Before you install Couchbase Server, follow the recommended deployment guidelines for setting up your production environment.
Table 1. Couchbase Server Deployment Guidelines
Guideline Description

Sizing

Evaluate the overall performance and capacity requirements of your deployment, and determine the hardware and other resources.

Sizing Guidelines

Services

Time keeping

Keeping accurate time is essential to a properly-functioning database. Ensure that you follow the guidelines for synchronizing each Couchbase node using Network Time Protocol (NTP).

Clock Sync with NTP

Disable Transparent Huge Pages

You must disable the THP memory management system on each node that runs Couchbase Server.

Disabling Transparent Huge Pages (THP)

Set kernel swappiness

The kernel swappiness setting defines how aggressively the kernel will swap memory pages versus dropping pages from the page cache. You need to set the swappiness setting to 0, or at most 1, for optimal Couchbase Server operation.

Swap Space and Kernel Swappiness

Couchbase client deployment

When you deploy Couchbase Server, you need to plan how clients will access and interact with the cluster.

Couchbase Client Deployment Strategies

Security

Couchbase Server provides security features that allow administrators to implement various security controls to ensure secure deployment. You should take Couchbase security best practices into consideration before, during, and after deployment.

Security Best Practices

Virtualized and containerized deployments

Certain considerations must be made when you’re deploying Couchbase Server on a virtual machine or container.

Deployment Considerations for Virtual Machines and Containers

Clusters with less than three nodes

Couchbase Server clusters with less than three nodes are not recommended in production. However, you might find a need to have a smaller deployment for test and development purposes.

About Deploying Clusters With Less Than Three Nodes

General Guidelines

Use RAID 1+0 (or RAID 1) if Couchbase bucket replication is 1 or lower

If bucket replicas are set to 2 or higher, the administrator might rely on database-level replication for data durability.

Linux OS
  • When deploying Couchbase Server on production Linux, you should use either the XFS or ext4 file system. XFS is preferred because it provides better performance when multiple IO streams are accessing the file system, such as during Data Service compaction or when the working set exceeds the memory quota and the data is read from disk.

  • The Couchbase Linux installer requires the ability to create a normal local Unix user with the name couchbase, if such a user doesn’t already exist. This can be particularly important if you are using a directory service for user management, such as LDAP.

Windows OS

For Windows OS, use 64k allocation sizes on NTFS file systems.

Nodes Running the Data Service

Isolate the data and indexes

For the best performance, isolate the data and indexes (note that these are different from the Index Service) at the physical disk level.

Combine different workloads

Combining different workloads (workloads with very different I/O and latency characteristics) can have a negative effect on the overall performance. In case of combined workloads, it might be appropriate to have objects in different buckets and the files for each bucket on different mount points/paths.