This topic describes how to create and manage tenants in the OceanBase Cloud console.
Background
Tenant: A tenant is a subset of instance resources and is a logical concept equivalent to a MySQL or Oracle instance. Tenants are the basis for managing database objects and resources. They are containers for various database objects and resources, such as CPU, memory, and I/O. OceanBase Cloud implements resource isolation by using tenants. The platform adopts a multi-tenant management model in a single instance. Resources and data are isolated between tenants. Each tenant owns a group of computing and storage resources and independently provides a complete set of database services. For more information, see Multi-tenant architecture.
Resource unit (unit): A unit indicates the resources available to a tenant on a node, including memory, CPU, and I/O resources. It is also the basic unit for load balancing in the instance. When a node goes online or offline or the instance undergoes scaling in or scaling out, the distribution of units on the nodes is dynamically adjusted to achieve balanced resource usage. For more information, see Tenant resource management.
Prerequisites
The instance has been created. For more information, see Create an instance.
Limitations
You can calculate the maximum number of tenants that can be created in a single instance based on the following rules:
Maximum number of tenants = min(Number of CPU cores per replica × Number of nodes in the instance, Maximum number of tenants allowed for the instance), where:
For an instance deployed in 3F mode (three full-featured replicas), the default maximum number of tenants is 50.
For an instance deployed in 2F1A mode (two full-featured replicas and one arbitration service), the default maximum number of tenants is 32.
Note
- For more information about instance 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 instance and click its name to go to the instance workspace.
In the upper-right corner of the page, click Create Tenant.
Specify the following parameters of the tenant.
Basic configurations
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 You can set the mode to MySQL Compatible or Oracle Compatible. Parameter Template Select one of the four parameter templates. For guidance on choosing a template, see Parameter template overview. Note
Parameter templates are supported only for newly created cluster instances running OceanBase Database V4.3.3 or later.
- OLTP Simple Transactions: Suitable for core systems such as online order and payment systems, as well as internet applications dominated by high-concurrency point queries. The SQL statements are relatively simple and require fast responses.
- OLTP Complex Transactions: Suitable for online transaction systems that involve complex joins, subqueries, PL batch jobs, or long and large transactions.
- HTAP Mixed Workloads: Suitable for mixed transactional and online analytical workloads. In addition to OLTP capabilities, vectorized execution improves computing performance for online analytical workloads.
- OLAP Online Analytics: Suitable for real-time data warehousing and complex analytical queries.
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 units. If each resource unit contains three nodes, each additional resource unit adds 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 maximum available IOPS and log disk size for the tenant. Note
- The total CPU and memory allocated to all tenants cannot exceed the instance specifications.
- Total resources available to a tenant = Resources allocated per replica × Number of resource distribution nodes × Number of replicas
- In the current version, only instances on Alibaba Cloud, Huawei Cloud, and AWS support configuring the maximum available IOPS.
- Only tenants on instances running V4.0 or later support log disk configuration. To use a larger log disk, contact OceanBase Technical Support.
Time Zone Set the time zone information. Primary Zone The primary zone of the tenant. You can select multiple zones. OceanBase Database provides a multi-zone high-availability cluster. The zone that provides read and write services is the primary zone, and the other zones are read-only or backup zones. If the primary zone fails, OceanBase Database automatically switches the primary zone to a new zone to ensure that data services are still available. Network Settings Select this option to create a public endpoint at the same time. Primary endpoint database proxy configuration
Note
- You can configure the database proxy for AWS instances and for Alibaba Cloud instances that support proxy deployment configuration.
- On Alibaba Cloud, if the console offers to create a public endpoint with the tenant, you can select that option and configure the proxy for the primary endpoint. If you skip this step, you can obtain a public or private endpoint later.
- For Alibaba Cloud instances that support proxy deployment mode configuration, select the proxy specification type and node specification from the options shown in the console.
ParameterDescriptionProxy Cluster Specification Type Select a proxy cluster specification type from the options shown in the console. - Serverless: The proxy scales automatically as traffic changes. This tier suits workloads with variable traffic and is currently free. For billing details, see the database proxy overview.
- Shared: The proxy shares compute resources with other customers and is suited to workloads with steady traffic.
- Exclusive: The proxy uses dedicated compute resources and is suited to high-traffic workloads. For pricing, see Database proxy billing.
Note
Serverless specifications are available only to allowlisted users on AWS.
Proxy Cluster Deployment Mode Alibaba Cloud and AWS instances support the following proxy cluster deployment modes. Select a mode from the options shown in the console. - Single-zone deployment: All nodes run in the same zone and handle traffic.
- Dual-zone deployment: Nodes run in two zones.
- Primary-standby (Exclusive only): The primary node handles most of the traffic. The standby node handles 1%. Choose the client’s zone as the primary zone of the proxy cluster. Connections from the standby zone may be interrupted if a deployment mode change in the proxy cluster or database cluster takes that zone offline.
- Active-active: Both zones handle traffic.
- Three-zone deployment: Proxy nodes run in three zones. This mode is available only with the Exclusive tier.
- Primary-standby: The primary node handles most of the traffic. Each of the two standby nodes handles 1%.
- Multi-active: The three zones share traffic evenly.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Node Zone(s) Select the zone for the proxy nodes. Deploying the primary endpoint’s proxy outside the tenant’s primary zone can increase SQL latency because traffic travels between zones. Node Specification Select a node specification from the options shown in the console. - Alibaba Cloud and AWS: The minimum Shared specification is 1C 2G, with increments of 0.25C 0.5G. Exclusive specifications range from 1C 2G to 30C 60G, with increments of 1C 2G.
- Other cloud providers: Shared specifications range from 2C 4G to 8C 16G, with increments of 2C 4G. Exclusive specifications range from 2C 4G to 30C 60G, with increments of 2C 4G.
More configurations
ParameterDescriptionCharacter Set Select a character set for the database. - MySQL-compatible tenants support the following character sets: utf8mb4, utf16, gbk, gb18030, and binary.
- Oracle-compatible tenants support the following character sets: utf8 and gbk.
Collation Select the collation to use for the database. Table Name Case Sensitivity Specifies whether the name of a table is case-sensitive. This parameter is only available when Compatibility Mode is set to MySQL Compatible. The default setting is not case-sensitive. Remarks (optional) The length of the remarks cannot exceed 30 characters.
Click Create. You can view the tenant creation progress on the instance list page.