This topic describes how to create a tenant. A tenant in OceanBase Key-Value (OBKV) corresponds to a database management system and can be regarded as a database instance. You can use the sys tenant to create business tenants. A business tenant has all the features of an instance.
Prerequisites
You have created a cluster instance. For more information, see Create an instance.
Limitations
You can calculate the maximum number of tenants that can be created under a single cluster instance according to the following rules:
Maximum tenants = min(CPU count per cluster replica × Number of cluster nodes, Maximum number of tenants allowed by the cluster), where:
For clusters deployed with the 3F (3 full-featured replicas) scheme, the default maximum number of tenants allowed is 50.
For clusters deployed with the 2F1A (2 full-featured replicas and 1 arbitration service) scheme, the default maximum number of tenants allowed is 32.
Note
- For more information about cluster deployment specifications, see 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 and click its name to enter the cluster instance workspace.
In the upper-right corner of the page, click Create Tenant.
Configure the tenant parameters based on your actual situation.
ParameterDescriptionTenant Name The name of the tenant. It must be 2 to 64 characters in length and can contain Chinese characters, digits, English letters, underscores, and hyphens. It cannot be set to sys.Compatibility Mode OBKV supports HBase API Compatible and Table API Compatible modes. For more information, see OBKV-HBase overview and OBKV-Table data models. 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 Select the character set to be used by the database. - OBKV supports the utf8mb4 character set.
Time Zone Specify the time zone information. Primary Zone Set the primary zone for the tenant. Network Settings Select this option to create a public endpoint at the same time. 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.
