Tenant capacity refers to a tenant's service capabilities, which include computing and storage capabilities.
OceanBase 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 OceanBase Database's architectural advantages over traditional databases, easily surpassing limitations imposed by a single server's capacity.
As described earlier in the previous topic, a tenant's resource pool consists of multiple resource units, with each resource unit utilizing specific physical resources on its corresponding node. Adjusting a tenant's capacity involves modifying the configurations of resource units and the number of resource units, and redistributing business traffic among these resource units.
Two scaling methods are supported.
Vertical scaling
This method involves adjusting the configurations of resource units, similar to vertical scaling in traditional databases.
Unit configuration defines the sizes of physical resources, such as CPU, memory, disk space, and IOPS. By modifying the unit configuration, you can adjust a tenant's physical resources on a single node, thereby adjusting the tenant's capacity. Vertical scaling is an efficient and convenient method, as it does not require data migration and takes effect within seconds. To support emergency scale-ups, specific physical resources must be reserved on each node. In cases of insufficient reserved resources, temporarily downgrading other tenants' unit configurations on the same node can release resources. Although this scaling method faces limitations imposed by a single server's capacity, OceanBase Database's horizontal scaling capability easily surpasses this constraint.
For detailed scaling procedures, see Modify the unit config for a tenant.
Horizontal scaling
Horizontal scaling in OceanBase Database allows you to adjust the number of resource units and the distribution of business traffic to enhance a tenant's service capabilities. Specifically, you can increase the number of resource units and primary zones to expand the number of service nodes, thereby improving the tenant's overall service capabilities.
Increasing the number of resource units: Involves adding more resource units in each zone, providing the tenant with additional storage and computing resources. For detailed instructions, see Modify the number of resource units for a tenant.
Increasing the number of primary zones: Means that the leaders for a tenant are distributed across more zones and each leader provides strong-consistency reads and writes, thereby utilizing more computing resources. As the number of service nodes increases during horizontal scaling, it is essential to carefully design the distribution of business data across resource units to prevent performance issues with distributed transactions. If you anticipate that the business volume will surpass the capacity limit of a single server, it is crucial to plan data sharding in advance. The planning of data sharding needs to avoid distributed transactions as much as possible.
For detailed instructions, see Modify the number of primary zones for a tenant.