Help Center/ GaussDB/ User Guide/ Instance Modifications/ Scaling In and Out an Instance/ Overview of Scaling In and Out an Instance
Updated on 2025-08-11 GMT+08:00

Overview of Scaling In and Out an Instance

After you purchase a GaussDB instance, your resource needs might change due to workload changes. For such cases, GaussDB distributed instances that are independently deployed can be scaled in or out. You can adjust resources as required. Currently, instances can be scaled in or out in the following ways:

Adding CNs for an Instance

Instances can be scaled out by adding coordinator nodes (CNs). For example, if the original instance is configured with one CN, three replicas, and one shard, the instance will have three CNs, three replicas, and one shard after two CNs are added. For details, see Adding Coordinator Nodes for an Instance (Distributed).

Figure 1 Adding CNs for an instance

Adding Shards for an Instance

Instances can be scaled out by adding shards. For example, if the original instance is configured with three CNs, three replicas, and one shard, the instance will have three CNs, three replicas, and three shards after two shards are added. For details, see Adding Shards for an Instance (Distributed).

Figure 2 Adding shards for an instance

Deleting CNs for an Instance

Instances can be scaled in by deleting CNs. For example, if the original instance is configured with three CNs, three replicas, and three shards, the instance will have two CNs, three replicas, and three shards after one CN is deleted. For details, see Deleting Coordinator Nodes for an Instance (Distributed).

Figure 3 Deleting CNs for an instance

Main processes are running on the main CN (that is, the CN whose component ID is cn_5001), so this CN cannot be deleted for scale-in. You can call the Querying the Components of a DB Instance API to query cn_5001. To scale in the instance, another CN will be deleted. In the example shown in Figure 4, the CN whose component ID is cn_5003 is deleted instead.

Figure 4 Deleting CNs for an instance

Deleting Shards for an Instance

Instances can be scaled in by deleting shards. For example, if the original instance is configured with two CNs, three replicas, and three shards, the instance will have two CNs, three replicas, and two shards after one shard is deleted. For details, see Deleting Shards for an Instance (Distributed).

Figure 5 Deleting shards for an instance