Installing Multiple Instances
Multiple instances of Couchbase Server can be installed on one physical machine for the Linux operating system.
The number of Couchbase Server instances running on a single machine depends on its physical capacity.
RequirementsMake sure that a minimum of 4Gb RAM and 8 Core CPUs are available for each Couchbase Server instance. When installing multiple instances on a physical machine, install as one of these two users:
- sudo user
- non-root, non-sudo user
Setting up Multiple Instances
To set up multiple instances running on a physical machine:
- Install Couchbase Server as a sudo user or as a non-root, non-sudo user.
- Create user-defined ports in the file /opt/couchbase/etc/couchbase/static_config.
- In the /etc/security/limits.conf file, make sure that the hard and soft limits for the nofile parameter are set to a value greater than 10240.
- Change the short_name parameter that identifies the instance (default: ns_1), to a different short_name in the /opt/couchbase/etc/couchbase/static_config file.
- The short_name value must be different for each instance that resides on the same physical server.
- Change the two occurrences of short_name in the /opt/couchbase/bin/couchbase-server file. For example, use the sed utility.
sed -i ‘s/ns_1/ns_inst1/g’ bin/couchbase-server
- Start the Couchbase Server instance.
- Repeat the steps to install other instances.
not_all_nodes_are_ready_yetthere could be a mismatch of the short_name value in the following files:
Following are some of the limitations for running multiple instance of Couchbase Server on a single machine:
- Some of the Couchbase Server tools will be unavailable to run on the customized ports for multiple Couchbase instances:
- Offline upgrade for multiple instances is unavailable.
- If a bucket is created on a dedicated port, some of the operations can result in the error could not listen on port xxx, even though the operation still succeeds. This error is logged regardless of the port that is used.