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 different 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.
Resource unit: A resource 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 resource units across nodes is dynamically adjusted to achieve balanced resource utilization. For more information, see Manage resources.
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 in 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 descriptions related to cluster deployment, see Product series.
- 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 go to the instance workspace.
In the upper-right corner of the page, click Create Tenant.
Specify the tenant configuration 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 MySQL, Oracle, HBase API, and Table API compatibility modes are supported. MySQL Version Select a MySQL version, such as 8.0 or later. Parameter Template For MySQL- and Oracle-compatible tenants, choose one of the following four parameter templates. For specific parameters and variables, see Parameter template description. Note
Currently, parameter template configuration is only supported for newly created OceanBase Database V4.3.3 and later.
- OLTP Simple Transactions: Suitable for core systems such as online order trading and payment, and internet businesses primarily involving high-concurrency point queries. Each executed SQL statement is relatively simple, requiring fast response.
- OLTP Complex Transactions: Suitable for online transaction systems with complex transactions, such as scenarios involving complex join calculations, subqueries, and batch processing jobs written in PL, where long or large transactions occur. If this cluster instance is dedicated for OLTP workload scenarios, it is recommended to optimize the cluster parameter large query strategy
large_query_thresholdfrom the default 600s to 5s. - HTAP Mixed Workloads: Simultaneously runs transactional and online analytical workloads. On top of providing OLTP capabilities, it enhances computing power for online analytics through vectorization.
- OLAP Online Analytics: For real-time data warehouse scenarios involving online analytical processing (OLAP). By default, created tables use columnar storage and a more optimized vectorized engine to enhance computing power for complex analysis scenarios. If this cluster instance is dedicated for OLAP analysis scenarios, it is recommended to optimize system variables and cluster parameters accordingly, such as enabling adaptive parallel computing, optimizing SQL sort memory space, setting SQL and transaction timeouts, and configuring the large query strategy. Additionally, it is recommended to use the
utf8mb4_bincollation for the tenant.
Unit count A unit is a resource unit. OceanBase Database manages physical resources by unit, which is a collection of physical resources such as CPU, memory, storage space, and IOPS. Unit spec Set the tenant CPU and memory resources on each node. - CPU: Select a CPU specification, such as 1 to 3 vCPUs.
- Memory: Select a memory specification, such as 4 to 12 GiB.
IOPS If this setting is available for your AWS BYOC instance, use the instance’s per-node IOPS limit (default) or set a custom limit for the tenant. Time Zone Set the time zone information. This operation will create both the system_time_zone and time_zone parameters simultaneously. After the tenant is created, the system_time_zone parameter cannot be modified. Proceed with caution. Tenant primary zone Set the primary zone for the tenant. Multiple selections are supported. OceanBase Database provides high-availability clusters with multiple zones. The zones that provide read and write services are the primary zones; others are read-only or backup zones. If the primary zone fails, OceanBase services automatically switch the primary to a new zone to ensure data services remain available. Networking Selecting this option will also create a public IP address for you. Primary address database proxy configuration
ParameterDescriptionProxy 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 all carry traffic.
- Dual Zone Active/Active Deployment: Nodes are distributed across two different zones, and both carry traffic.
- Dual Zone Primary/Standby Deployment: ODP nodes are deployed in two different zones. Nodes in one zone carry traffic, while the nodes in the other zone serve as a cold standby. When using dual-zone primary/standby deployment, select the primary zone for the proxy cluster to be the same as the zone used by the client. Requests from the standby zone may be disconnected when the deployment mode changes for the proxy cluster or the database cluster, triggering the decommissioning of this zone.
Note
Dual-zone primary/standby deployment is only supported in exclusive specifications.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Primary Node Zone Select the zone for the primary node. Standby Node Zone Select the zone for the standby node. Node Specification Select the target specification size. Note
To ensure high availability and stability of the cluster, the system reserves 2 vCPUs for its own operation.
Billing information
ItemDescriptionCloud resource costs Collected by the cloud service provider. Compute service fee The service fee charged by OceanBase Cloud, billed on an hourly basis. More configurations
Supports character set, collation, case sensitivity for table names, and remarks.
ParameterDescriptionCharacter Set Select the character set to be used by 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: utf8 and gbk.
- Tenants in HBase API and Table API compatible modes support the utf8mb4 character set.
Collation Select the collation to be used by the database. Table Name Case Sensitivity Specifies 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.