This topic describes how to scale out an OceanBase cluster and scale up an OceanBase Database tenant.
Scenarios
A benefit of the distributed architecture of OceanBase Database is that data is distributed to multiple hosts and you can scale out the architecture by adding more hosts.
This topic describes how to scale out an OceanBase cluster and scale up an OceanBase Database tenant. You can horizontally scale out a cluster by adding OBServer nodes. After that, you can scale up the specifications or the number of resource units of a tenant to increase the tenant capacity, so that the tenant can handle more data and higher business traffic.
Prerequisites
Make sure that you have the following permissions:
- To scale out a cluster, make sure that you have the following permissions:
-
Resource Permissions : Cluster Maintenance permission -
Menu Permissions : Permission on theOverview menu ofClusters
-
- To scale out a tenant, make sure that you have the following permissions:
-
Resource Permissions : Cluster maintenance or tenant maintenance permission -
Menu Permissions : Permission on theOverview menu ofTenants
-
- To scale out a cluster, make sure that you have the following permissions:
Prepare hosts based on the required number of OBServer nodes and add the hosts to OceanBase Cloud Platform (OCP). For more information, see Add a host.
Upload a software package whose version is the same as that of your OceanBase cluster to OCP. For more information, see Upload a software package.
When you add an OBServer node to a cluster, the cluster must be in the
Running state. When you scale up a tenant, the cluster and the tenant must be in theRunning state.
Considerations
When you scale up a tenant by increasing unit specifications, make sure that the number of CPU cores, memory size, and log disk size of the increased unit specifications do not exceed the available resources of the OBServer node. Otherwise, the modification fails. On the
Resource Management page of a cluster, you can view the resource allocation among OBServer nodes of the cluster and schedule the resources. For more information, see View unit distribution.The number of resource units in a zone cannot be larger than that of OBServer nodes in the same zone. To add more resource units, add more OBServer nodes first. For more information, see Add an OBServer.
If a tenant belongs to an OceanBase cluster of V4.0 or a later version, the number of resource units in each zone of the tenant must be the same.
Procedure
Scale out an OceanBase cluster
Go to the
Overview page of the cluster that you want to scale out.In the upper-right corner of the page, click
Add OBServer . In the dialog box that appears, set the parameters, such as Host and Host Type, of one or more OBServer nodes that you want to add.In general, you must add the same number of OBServer nodes to each zone to ensure that resources are equally distributed among zones. For example, you can add one OBServer node to each zone of a cluster in 1-1-1 mode to scale out the cluster to the 2-2-2 mode.
Click
OK to start the task.After the task is complete, you can view the deployment mode on the
Overview page of the cluster and check whether the number of OBServer nodes in the cluster has increased. If yes, tenant resources and data are automatically balanced among OBServer nodes. You can view the resource unit distribution on theResource Management page of the cluster. For more information, see View unit distribution.
Scale up a tenant
After you add OBServer nodes to a cluster, more resources are available in each zone to accommodate more tenant resource units. Therefore, you can scale up a tenant by adjusting the specifications and number of resource units in the tenant.
Adjust the unit specifications of a tenant.
Go to the
Overview page of the tenant that you want to scale up.In the
Replica Details section, clickEdit in the Actions column, and select unit specifications with larger values.If the unit specifications you need are not available in the
Unit drop-down list, click Create Specification to add a unit specification. Then, you can use the added unit specification.Note
We recommend that you use the same specifications for each resource unit in the tenant.
Adjust the number of resource units in a tenant.
Go to the
Overview page of the tenant that you want to scale up.In the
Replica Details section, clickEdit in the Actions column, and set the number of resource units to a larger value.Note
We recommend that you use the same number of resource units in each tenant.
FAQ
What can I do if a tenant scale-up task fails?
We recommend that you do not roll back the task. During the rollback, the tenant cannot automatically scale down to the original specifications. When a tenant scale-up task fails, we recommend that you perform troubleshooting to identify the cause or contact OCP Technical Support. After the issue is resolved, retry the task.