This topic describes how to create and manage tenants in the OceanBase Cloud console.
Concepts
- Tenant: A tenant is a subset of cluster resources and is a logical concept equivalent to a MySQL or Oracle instance. Tenants form the basis for managing database objects and resources. They serve as containers for database objects and resources such as CPU, memory, and I/O. OceanBase Cloud isolates resources and data between tenants through a single-cluster, multi-tenant architecture. Each tenant has its own computing and storage resources and provides an independent database service. For more information, refer to Multi-tenant architecture.
- Resource unit: A resource unit represents the resources available to a tenant on a node, such as memory, CPU, and I/O. It is also the basic unit of load balancing in a cluster. When cluster nodes go online or offline or a cluster is scaled out or in, OceanBase Database dynamically adjusts the distribution of resource units across nodes to balance resource utilization. For more information, refer to Tenant resource management.
Prerequisites
You have created a cluster instance. For specific procedures, refer to Create an instance.
Limitations
You can calculate the maximum number of tenants that can be created under a single cluster instance using the following rule:
Maximum tenants = min(Cluster single-replica CPU count × Cluster node count, Maximum allowed tenants for the cluster), where:
For clusters deployed with the 3F (3 full-featured replicas) scheme, the default maximum number of allowed tenants is 50.
For clusters deployed with the 2F1A (2 full-featured replicas and 1 arbitration service) scheme, the default maximum number of allowed tenants is 32.
Note
- OceanBase clusters support multiple deployment specifications. For more information, refer to Specifications.
- To create more tenants, contact OceanBase Technical Support.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
In the instance list, find the target cluster instance, click the cluster name, and go to the cluster instance workspace.
In the upper-right corner of the page, click Create Tenant.
Configure the tenant settings as needed.
ParameterDescriptionTenant Name Set the tenant name. It must be 2 to 64 characters long and can contain Chinese characters, digits, English letters, underscores, and hyphens. It cannot be set to sys.Compatibility Mode Select HBase API Compatible or Table API Compatible. Number of Resource Units A resource unit is a collection of physical resources such as CPU, memory, storage space, and IOPS. OceanBase Database manages physical resources by resource unit. If each resource unit contains three nodes, adding one resource unit adds resources for three more nodes. Unit Specification Set the CPU and memory allocated to the tenant on each node. In Advanced Settings, you can also configure the log disk size. Note
- The total CPU and memory allocated to all tenants cannot exceed the cluster specifications.
- Total resources available to a tenant = Resources allocated per replica × Number of resource distribution nodes × Number of replicas
- Only tenants on instances running V4.0 or later support log disk configuration. To use a larger log disk, contact OceanBase Technical Support.
Character Set HBase API Compatible and Table API Compatible modes support only the utf8mb4character set.Time Zone Set the time zone information. Primary Zone Set the primary zones for the tenant. Multiple selections are supported. Remarks (Optional) The length of the remarks cannot exceed 30 characters. Click Create. You can view the tenant creation progress on the cluster list page.
