This topic describes how to scale out a cluster by adding OBServer nodes to zones in the cluster.
Procedure
You can use SQL statements to add OBServer nodes to zones. Assume that you have a cluster that has three zones, which are z1, z2, and z3, and each zone has two OBServer nodes. The cluster has a user tenant named tenant1. The following code shows the resource distribution of the tenant:
obclient> CREATE RESOURCE UNIT unit1 MAX_CPU 5,MIN_CPU 4, MEMORY_SIZE '36G', MAX_IOPS 1024, MIN_IOPS 1024, IOPS_WEIGHT=0, LOG_DISK_SIZE = '2G';
obclient> CREATE RESOURCE POOL pool1 UNIT 'unit1', UNIT_NUM 2, ZONE_LIST ('z1','z2','z3');
obclient>CREATE TENANT tenant1 resource_pool_list=('pool1');
Assume that you need to add one OBServer node to each zone. After the scale-out, each of the three zones has three OBServer nodes.
Perform the following steps:
Log on to the
systenant of the cluster as therootuser.Add an OBServer node to each of the
z1,z2, andz3zones.For more information about how to add an OBServer node to a zone, see Add a node.
Adjust the resource configurations of the tenant by increasing the value of the
UNIT_NUMparameter based on your business requirements.Notice
One resource unit can be allocated to only one OBServer node, and multiple resource units of the same tenant cannot be allocated to the same OBServer node. If you have adjusted the resource unit configs to the optimal settings during the tenant scale-out, you must increase the number of resource units in this step. When you increase the number of resource units, the value of the
UNIT_NUMparameter cannot be greater than the number of OBServer nodes in each zone.Example: Change the value of the
UNIT_NUMparameter to3.obclient> ALTER RESOURCE TENANT tenant1 UNIT_NUM 3;