Tenant capacity refers to a tenant's service capabilities, which include computing and storage capabilities.
OceanBase AI Database provides the flexibility to dynamically adjust a tenant's capacity. This can be done through vertical scaling, which involves modifying the service capabilities of a single node, or horizontal scaling, which involves modifying the number of service nodes. This scalability stands out as one of the architectural advantages of OceanBase AI Database over traditional databases, easily surpassing limitations imposed by a single server's capacity.
As described in the previous topic, a tenant's resources consist of multiple Units, with each Unit occupying specific physical resources on its node. You can adjust tenant capacity by modifying the resource specifications and the number of Units, and by redistributing business traffic among the Units.
Two scaling methods are supported based on different implementation approaches.
Vertical scaling
This method involves adjusting the resource specifications of Units, similar to vertical scaling in traditional databases.
Resource specifications define the sizes of general physical resources, such as CPU, memory, disk space, and IOPS. By modifying the resource specifications, you can adjust a tenant's physical resources on a single node, thereby adjusting the tenant's capacity. Vertical scaling is the most efficient and convenient emergency measure for capacity bottlenecks. It does not require data migration and takes effect within seconds. Specific physical resources must be reserved on each node to support emergency scale-ups for tenants. In cases of insufficient reserved resources, you can temporarily downgrade the resource specifications of other tenants on the same node to release resources. Although this scaling method is limited by the capacity of a single server, the horizontal scaling capability of OceanBase AI Database allows you to easily surpass this limitation.
For more information about the procedure, see Scale tenants by adjusting resource specifications.
Horizontal scaling
Adjusting the number of Units for a tenant and the distribution of business traffic among the Units corresponds to the unique horizontal scaling method of OceanBase. Specifically, by increasing the number of Units (Unit Number) and primary zones (Primary Zone), you can increase the number of service nodes, thereby improving the overall service capabilities of the tenant.
Increasing the number of Units: This involves adding more Units in each zone where the tenant is distributed, providing the tenant with additional storage and computing resources.
For more information about the procedure, see Scale tenants by adjusting the unit number.
Increasing the number of primary zones: This means that the leaders of the tenant are distributed across more zones, and each leader handles strong-consistency read and write traffic, thereby utilizing more computing resources. Compared with vertical scaling, horizontal scaling increases the number of service nodes. You must carefully design the distribution of business data among Units to prevent performance degradation caused by distributed transactions. If you anticipate that the business volume will exceed the capacity limit of a single server, plan data sharding in advance. Data sharding must avoid distributed transactions as much as possible.
For more information about the procedure, see Scale tenants by adjusting the primary zone.