You can perform scale-in and scale-out operations at the cluster and tenant levels.
Scale in and scale out a cluster
The distributed architecture of OceanBase Database allows you to scale in and scale out clusters with ease. If your business requirements for cluster disaster recovery change, you can adjust the number of zones in a cluster to scale in or scale out the cluster. If the external load of a cluster changes, you can adjust the number of OBServer nodes in the zones of the cluster to adjust the cluster processing capabilities.
Your business requirements for cluster disaster recovery change
The data in an OceanBase cluster has multiple replicas, which comprise a basic high availability unit based on the Paxos protocol. Generally, the system deploys only one replica in each zone. When the minority of zones fail, the replicas in the remaining available zones can still provide services by using the Paxos protocol while ensuring data integrity. You can add zones to increase the number of replicas, thereby improving the system availability.
The external load of the cluster changes
If the service capabilities of a cluster are insufficient for read and write requests, you need to scale out the cluster. For example, you can add an OBServer node to each zone of the cluster. After the scale-out, each zone has N+1 OBServer nodes. If the service capabilities of a cluster are excessive for the current loads, you can remove unnecessary OBServer nodes from the cluster to save costs.
Scale in and scale out a tenant
You can scale in or scale out a tenant in the following ways:
Adjust the value of
UNIT_NUMto increase or decrease the number of OBServer nodes that provide services to the tenant.For more information, see Modify UNIT_NUM.
Modify the resource unit configs of the tenant to adjust the service capabilities of OBServer nodes.
For more information, see Modify unit_config.