This topic describes how to create and manage tenants in the OceanBase Cloud console.
Concepts
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 more information, see Parameter template description. Note
Parameter templates are supported only for newly created tenants 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. If the instance is dedicated to OLTP workloads, we recommend changing the
large_query_thresholdinstance parameter from its default value of 600 seconds to 5 seconds. - 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 warehouse workloads that involve online analytical processing (OLAP). Tables are created with columnar storage by default, and an optimized vectorized engine improves performance for complex analytical workloads. If the instance is dedicated to OLAP workloads, we recommend optimizing the relevant system variables and instance parameters, such as enabling adaptive parallel execution, optimizing SQL sort memory, configuring SQL and transaction timeouts, and setting a large-query strategy. We also recommend using the
utf8mb4_bincollation for the tenant.
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
Currently, only AWS instances support database proxy configuration.
ParameterDescriptionProxy Cluster Specification Type You can select Shared or Exclusive. - Shared: The database proxy service instance shares computing resources with other customers. This option is suitable for workloads with relatively stable and balanced traffic.
- Exclusive: The database proxy service instance exclusively occupies computing resources. This option is suitable for workloads with high access traffic. For more information about billing, see Database proxy billing.
Proxy Cluster Deployment Mode You can select single-zone deployment, dual-zone active-active deployment, or dual-zone primary-standby deployment. - Single-zone deployment: All nodes are deployed in the same zone and handle all traffic.
- Dual-zone active-active deployment: Nodes are deployed in two different zones and both zones handle traffic.
- Dual-zone primary-standby deployment: ODP nodes are deployed in two different zones. One zone handles traffic and the other serves as a cold standby. For dual-zone primary-standby deployment, select the zone where the client resides as the primary zone of the proxy cluster. Requests from the standby zone may be disconnected if a deployment mode change of the proxy cluster or database cluster causes that zone to go offline.
Note
Dual-zone primary-standby deployment is supported only for Exclusive.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Node Zone(s) Select the node zone. Note
If the zone of the primary endpoint proxy is different from that of the tenant, traffic forwarding will occur across IDCs, which may increase the SQL response time.
Node Specification Select the target specification. Shared and Exclusive specifications have different limits and increments. 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. Note
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.
