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. It serves as the foundation for database object and resource management, acting as both a container for various database objects and a container for resources such as CPU, memory, and I/O. OceanBase Cloud achieves resource isolation through tenants, adopting a single-cluster, multi-tenant management model where resources and data are isolated between tenants. A tenant possesses a set of computing and storage resources and provides a complete, independent database service. For more information, see Multi-tenant architecture.
Unit: A unit refers to the available resources (such as memory, CPU, and I/O) of a tenant on a node. It is also the basic unit for load balancing in a cluster. When cluster nodes go online or offline, or when a cluster is scaled out or in, the distribution of units across nodes is dynamically adjusted to achieve balanced resource utilization. For more information, see Tenant resource management.
Prerequisites
You have created a cluster instance. For details, see Create a cluster.
Limitations
You can calculate the maximum number of tenants allowed in a single cluster instance using the following rule:
Maximum tenants = min(Cluster single-replica CPU count × Cluster node count, Maximum number of tenants allowed for the cluster), where:
For clusters deployed with the 3F (3 full-featured replicas) scheme, the default maximum number of tenants is 50.
For clusters deployed with the 2F1A (2 full-featured replicas and 1 arbitration service) scheme, the default maximum number of tenants 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, 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 as needed.
Basic configuration
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 Flagship Edition supports the following compatibility modes: - MySQL Compatible: Highly compatible with MySQL syntax, supports the MySQL protocol, and allows you to select a MySQL version. It is suitable for scenarios such as online transactions and web applications.
- Oracle Compatible: Highly compatible with Oracle syntax and supports PL/SQL. It is suitable for core business systems migrated from Oracle.
- HBase API Compatible: Compatible with HBase APIs and supports wide-table storage. It is suitable for scenarios such as massive data storage, time-series data, and log storage.
- Table API Compatible: Provides Table APIs and supports structured data storage. It is suitable for scenarios such as key-value storage and metadata management.
Parameter Template When the compatibility mode is MySQL or Oracle, four parameter templates are available. For details about the parameters and variables, 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 cluster instance is dedicated to OLTP workloads, we recommend changing the
large_query_thresholdcluster 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 cluster instance is dedicated to OLAP workloads, we recommend optimizing the relevant system variables and cluster 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.
Note
HBase API Compatible and Table API Compatible modes do not support parameter template selection.
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 based on resource units. If each unit contains three nodes, adding one more 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 maximum available IOPS and log disk size for the tenant. 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
- 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. Tenant Primary Zone Set the primary zones for the tenant. Multiple selections are supported. OceanBase Database provides high-availability clusters with multiple zones. The zone that provides read and write services is the primary zone, while the other zones are read-only or backup zones. If the primary zone fails, OceanBase Database automatically switches to a new primary zone to ensure service availability. 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 distributed across two different zones and handle all traffic.
- Dual-zone primary-standby deployment: ODP nodes are deployed in two different zones. The nodes in one zone handle traffic, while the nodes in the other zone act as cold standby nodes. 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 zone for the node. Note
If the zone of the primary endpoint proxy differs from the primary zone of the tenant, traffic is forwarded across IDCs, which may increase SQL response time.
Node Specification Select the target specification size. Shared and Exclusive specifications have different size limits and increments. More configurations
ParameterDescriptionCharacter Set Select the character set for the database. - Tenants in MySQL-compatible mode support the following character sets: utf8mb4, utf16, gbk, gb18030, and binary.
- Tenants in Oracle-compatible mode support the following character sets: utf8mb4, utf8, latin1, gbk, and gb18030.
- Tenants in HBase API Compatible or Table API Compatible mode support the utf8mb4 character set.
Collation Select the collation for the database. Table Name Case Sensitivity Specify whether table names are case-sensitive. Note
This parameter must be set when the tenant mode is set to MySQL-compatible mode. By default, table names are 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 cluster list page.
