Scale a Cluster

Through multi-dimensional scaling, clusters can be scaled by adding and removing service instances, increasing and decreasing the size of service instances, and adding and removing whole services

Overview

Couchbase clusters are made up of multiple independent services. This means that the capacity of a cluster is measured by the individual capacities of each of the services that run on the cluster. Therefore, scaling a cluster means scaling the individual capacities of each of the cluster’s constituent services.

Services are set up on a per-node basis, with each node running one instance of a service. This means that the capacity of an individual service is determined by multiplying the following factors:

  • The number of instances (nodes) that make up a service

  • The size of those instances

Each of these factors can be independently scaled. Adding additional instances to a service is known as scaling out. Increasing the size of a service’s instances is known as scaling up. Likewise, removing instances is known as scaling in, and reducing the size of instances is known as scaling down. These scaling techniques, when taken together with the ability to add and remove whole services within a cluster, enable multi-dimensional scaling.

The procedures on this page cover each dimension of multi-dimensional scaling:

  1. Adding and removing service instances

  2. Increasing and decreasing the size of service instances

  3. Adding and removing whole services

Rebalance

All of the procedures on this page result in either the addition or removal of nodes from a cluster. (Even changing the size of service instances results in new nodes being added to the cluster, since the underlying virtual machines are swapped out for new ones.) After performing any of these procedures, the cluster will rebalance to accommodate the new number of active member nodes.

Cluster rebalance is a process that is required for redistributing data and indexes among available nodes whenever nodes have been added or removed. During rebalance, the cluster continues to service requests for data while the cluster map is correspondingly updated and distributed to clients.

Couchbase Server is designed to maintain consistent availability and performance during rebalance. However, you should consult the rebalance documentation to familiarize yourself with how each service behaves during a rebalance, so you can asses the impacts of this process on your deployments accordingly.

Prerequisites

To scale a cluster:

  • You must have either Organization Edit privileges, or Project Edit privileges for the project that contains the cluster that you wish to scale.

Scale an Existing Service

Limitations

  • Clusters deployed with template sizing can only be scaled by adding or removing a node of the same instance type.

  • Clusters deployed with the Quick Start template cannot be scaled.

Procedure

  1. Go to the cluster’s Services tab.

    1. Go to the Projects tab in the left navigation.

    2. Find and click on the project that contains the cluster that you wish to scale.

      This opens the project’s slide-out menu:

      The project’s slide-out menu.
    3. Find and click on the cluster.

      This opens the cluster’s Overview tab:

      The cluster’s 'Overview' tab.
    4. Go to the Services tab.

      The cluster’s 'Services' tab showing Data, Index, and Query services deployed.
  2. Click on the service that you wish to scale.

    This opens the Edit Service slide-out menu:

    The 'Edit Data Service' slide-out menu.
  3. Edit the configuration.

    Use the Number of Nodes drop-down menu to select the desired number of nodes that you want to scale the service to.

  4. When you’re satisfied with the new service configuration, click Save.

    The 'Edit Data Service' slide-out menu with all fields completed.

    The cluster will begin to rebalance so that the service’s data gets re-distributed over the new superset of nodes. For example, if you added a new node to the Data service, then whatever active and replica vBuckets were previously distributed across the existing Data nodes will be redistributed across the new superset of Data nodes created by the addition.

    The amount of time it takes for the new nodes to rebalance into the cluster is dependent on both the service of the new node, as well as how much data needs to be redistributed. During the rebalance, cluster services will remain available.

Add a Service

  1. Go to the cluster’s Services tab.

    1. Go to the Projects tab in the left navigation.

    2. Find and click on the project that contains the cluster that you wish to add a service to.

      This opens the project’s slide-out menu:

      The project’s slide-out menu.
    3. Find and click on the cluster.

      This opens the cluster’s Overview tab:

      The cluster’s 'Overview' tab.
    4. Go to the Services tab.

      The cluster’s 'Services' tab showing Data, Index, and Query services deployed.
  2. Click Add Service.

    This opens the Add Service slide-out menu:

    The 'Add Service' slide-out menu.
  3. Configure the service.

    In the Add Service slide-out menu, configure the following fields:

    Service

    Select the desired Couchbase service that will run on the node.

    Capacity

    Select an available compute instance that the service will run on.

    Number of Nodes

    Select the number of nodes having the current configuration that you want to add to the cluster.

    Storage

    Enter the desired amount of storage for the service.

    For more information about the above fields, refer to Cluster Sizing.

  4. When you’re satisfied with the service configuration, click Add Service.

    The 'Add Service' slide-out menu with all fields completed.

    The cluster will begin to rebalance so that the service’s data gets re-distributed over the new superset of nodes. The amount of time it takes for the new nodes to rebalance into the cluster is dependent on both the service of the new node, as well as how much data needs to be redistributed. During the rebalance, cluster services will remain available.