Tenant capacity refers to the service capabilities of a tenant, including the computing and storage capabilities.
OceanBase Database allows you to dynamically adjust the capacity of a tenant. You can modify the service capabilities of a single node for vertical scaling or modify the number of service nodes for horizontal scaling. This is also one of the architectural benefits of OceanBase Database against conventional databases. The horizontal scalability can easily break the limit on the capacity of a single server.
As described earlier in the previous topic, the resource pool of a tenant consists of multiple resource units, and each resource unit occupies a specific part of physical resources on the corresponding node. You can adjust the capacity of a tenant by modifying the unit configs of resource units, the number of resource units, and the distribution of business traffic in the resource units.
Two scaling methods are supported.
Vertical scaling
You can adjust the unit configs of resource units in OceanBase Database, which is equivalent to vertical scaling in conventional databases.
A unit config defines the sizes of general physical resource items, such as the CPU, memory, disk space, and IOPS. By modifying the unit config, you can adjust the physical resources for a tenant on a single node, thereby adjusting the capacity of the tenant. Unit config modification is the most efficient and convenient emergency action for breaking the capacity bottleneck. No data migration is required and the modification takes effect in a few seconds. A specific amount of physical resources must be reserved on each node for emergency scale-up of tenants. If the reserved resources are insufficient, you can temporarily downgrade the unit configs of other tenants on the same node to release some physical resources. This scaling method is restricted by the capacity limit of a single server. However, the horizontal scaling capability of OceanBase Database can easily break this limit.
For more information about the scaling procedure, see Modify the unit config for a tenant.
Horizontal scaling
In OceanBase Database, you can adjust the number of resource units and the distribution of business traffic in the resource units for a tenant to implement horizontal scaling. Specifically, you can increase the number of resource units and the number of primary zones to increase the number of service nodes for a tenant, thereby improving the overall service capabilities of the tenant.
Increase the number of resource units: You can increase the number of resource units in each zone of a tenant to grant more storage and computing resources to this tenant.
For more information about the scaling procedure, see Modify the number of resource units for a tenant.
Increase the number of primary zones: You can increase the number of zones where the leaders of a tenant are distributed. Each leader provides strong-consistency reads and writes and can occupy more computing resources. In horizontal scale-out, the number of service nodes increases. You must carefully design the distribution of business data in the resource units to prevent distributed transactions from compromising the performance. If you estimate that the business volume will exceed the capacity limit of a single server, you must design data sharding in advance and avoid distributed transactions.
For more information about the scaling procedure, see Modify the number of primary zones for a tenant.