Modify Services and Rebalance

      +
      Add or remove non-Data Services on existing nodes in a cluster and rebalance the cluster without adding or removing nodes.

      You can dynamically add or remove the following Multi-Dimensional Scaling (MDS) services on existing nodes in a cluster from the Couchbase UI, REST API, or CLI:

      • index (Index Service)

      • n1ql (Query Service)

      • fts (Search Service)

      • cbas (Analytics Service)

      • eventing (Eventing Service)

      • backup (Backup Service)

      Then a rebalance operation is automatically triggered to distribute the service workload across the nodes and complete the modification.

      You do not have to add or remove a node to add or remove a non-Data Service on a node in a cluster.

      You cannot add or remove the Data Service (kv) using this method. Adding or removing of the Data Service on an existing node is supported only through adding or removing nodes. For more information about adding or removing the Data Service on an existing node, see Adding or Removing the Data Service on Existing Nodes.

      Prerequisites

      Before modifying non-data services on nodes, make sure you have the following:

      • The Couchbase Server cluster must be running the 8.0 or a later version.

      • Full Administrator access. For more information, see Full Admin.

      • A clear understanding of the current service distribution across the nodes.

      • Service Memory Quota: When you add a service that was not earlier present in the cluster, the new service may use the service-specific default memory quota. This applies to the Index, Search, Eventing, and Analytics services.

        Verify that the memory quota for the new service meets your requirements using one of the following:

      • Node Disk Storage Paths: The node disk storage paths are set for all services that require disk storage paths (Data, Indexes, Eventing, Analytics) when a node is initialized. These storage paths cannot be changed after the node becomes a part of a cluster. This means that if you are adding a service (Index, Search, Analytics, Eventing) to an existing node, that service is using the disk storage path that was specified when the node was initialized. Ensure that you know the node disk storage path set for the service that you are adding. For information on how to view the node disk storage paths, see List Nodes with the REST API. Use the GET /pools/default REST API to find the otpNode value for the node and then use the GET /nodes/<otpNode> REST API to view the disk storage paths.

      Modify Services from the UI

      To manage non-Data services from the UI, follow these steps:

      1. Open the Couchbase Server Web Console.

      2. Click Servers.

      3. Click Modify Services.

        The Modify Cluster Services dialog appears, which lists all the nodes in all the clusters and their current services.

        Services that can be modified are:

        • index (Index Service)

        • n1ql (Query Service)

        • fts (Search Service)

        • cbas (Analytics Service)

        • eventing (Eventing Service)

        • backup (Backup Service).

        kv (Data Service) cannot be modified.

      4. Select the services you want to add for each node and deselect the services you want to remove from each node.

        Adding or removing any service triggers a rebalance operation.
      5. Click Rebalance and Change Services.

        If you’re only removing services, adding new instances of services that already exist on the cluster, or adding the backup service, then rebalancing is triggered immediately.

      6. If you are adding a service that is not already on the cluster, and if that service has a memory quota setting option, then the New Service Settings dialog appears. This dialog lists the services you selected to add, the existing active services, and their current memory quotas.

        1. Enter the memory quota for each service you’re adding. You can also edit the memory quota for existing services.

          For the Index Service, choose either Standard Global Secondary or Memory-Optimized. For more information about index storage, see Index Storage Settings.

          For more information about managing memory quotas for services from the UI, see Memory Quotas.

        2. Click Save Settings.

      The rebalancing operation is automatically triggered, which distributes the service workload across the nodes and completes the modification. Status progress is displayed on the UI.

      When the rebalance operation is successful, an acknowledgment message appears on the UI and you can download the rebalance report by clicking Download Report.

      Modify Services Using CLI

      To modify non-Data services on the existing nodes of a cluster using the CLI, use the following couchbase-cli rebalance command:

      couchbase-cli rebalance -c <network_address> \
      --username <username> \
      --password <password> \
      --update-services [--index-[add|remove] <list-of-nodes>] [--n1ql-[add|remove] <list-of-nodes>] [--fts-[add|remove] <list-of-nodes>] [--cbas-[add|remove] <list-of-nodes>] [--eventing-[add|remove] <list-of-nodes>] [--backup-[add|remove] <list-of-nodes>]

      These are the options for modifying non-data services:

      • --update-services: Indicates that the rebalance will make changes to the services on the cluster.

      • --<service>-add <node>: Adds the specified service to the specified node. <service> can be one of the following:

        • index for the Index Service.

        • n1ql for the Query Service.

        • fts for the Search Service.

        • cbas for the Analytics Service.

        • eventing for the Eventing Service.

        • backup for the Backup Service.

      • --<service>-remove <node>: Removes the specified service from the specified node.

      Examples

      • The –fts-add argument adds the full-text search service to the list of nodes.

      • The –index-remove argument removes the index service from the list of nodes.

      • To add the index service to node2, use the following command:

        couchbase-cli rebalance -c 127.0.0.1 -u Administrator -p password --update-services --index-add node2
      • To remove the index service from node3, use the following command:

        couchbase-cli rebalance -c 127.0.0.1 -u Administrator -p password --update-services --index-remove node3
      • Trying to remove a service that’s not present on the node results in an error. From the previous example, if node3 was not running the index service, the following error occurs:

        ERROR: Node ns_1@node3 does not provide the index service

      For more information about the couchbase-cli rebalance command, see rebalance.