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 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, 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 | Parameter | Description | |----------|-----------| | Tenant Name | The name of the tenant. It must be 2 to 64 characters in length and can contain Chinese characters, numbers, 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 migrating from Oracle.
- HBase API Compatibility Mode**: 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 Compatibility Mode**: Provides the Table API interface and supports structured data storage. It is suitable for scenarios such as key-value storage and metadata management.
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. These operations involve relatively simple SQL statements and require fast response.
- OLTP Complex Transactions: Suitable for online transaction systems with complex transactions, such as those involving complex join calculations, subqueries, and batch processing jobs written in PL. These scenarios may also include long or large transactions. If this cluster instance is dedicated to OLTP workloads, it is recommended to optimize the cluster parameter
large_query_thresholdby adjusting its default value of 600 seconds to 5 seconds. - HTAP Mixed Workloads: Handles mixed workloads that run both transactional and online analytical processes. While providing OLTP capabilities, it enhances computing power for online analytical scenarios through vectorization.
- OLAP Online Analytics: Optimized 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 analytical scenarios. If this cluster instance is dedicated to OLAP analysis, 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_bincharacter set 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 based on resource units. If each unit contains three nodes, adding one more unit adds resources for three more nodes. | | Unit Specification | Specifies the CPU and memory size for the tenant on a single node. You can also configure the maximum available IOPS for the tenant in Advanced Settings.Note
The HBase API and Table API compatibility modes do not support parameter template selection.
| | Time Zone | Sets the time zone information. | | Tenant Primary Zone | Sets the primary zone 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; others are read-only or backup zones. If the primary zone fails, OceanBase Services automatically switches the primary zone to a new one to ensure data services remain available. | | Networking | Selecting this option will simultaneously create a public IP address for you. |Note
- The total sum of CPU and memory for all tenants must not exceed the specifications of the cluster to which they belong.
- Total available resources for a tenant = Resources allocated per replica × Number of resource distribution nodes × Number of replicas
- The current version only supports configuring maximum available IOPS for instances on Alibaba Cloud, Huawei Cloud, and AWS channels.
Primary address database proxy configuration
Note
Currently, only AWS instances support database proxy configuration.
ParameterDescriptionProxy Cluster Specification Type You can select shared or dedicated specifications. - Shared specification: The database proxy service instance shares computing resources with other customers. This is suitable for businesses with relatively fixed and average traffic.
- Dedicated specification: The database proxy service instance occupies computing resources exclusively. This is suitable for businesses with large access traffic. For billing information, see Database proxy billing description.
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. One zone's nodes handle traffic, while the other serves as a cold standby node. When using dual-zone primary/standby deployment, set the primary zone of the proxy cluster to the same zone as the client. Requests from the standby zone may be disconnected when the deployment mode changes in the proxy cluster or database cluster, triggering this zone's decommissioning.
Note
Dual-zone primary/standby deployment is only supported in dedicated specifications.
Proxy Cluster Nodes The number of nodes in the proxy cluster. Node Zone(s) Select the availability zone for the node. Note
If the primary address proxy availability zone is inconsistent with the tenant's primary availability zone, cross-IDC traffic forwarding will occur, which may increase SQL response time.
Node Specification Select the target specification size. Shared and dedicated specifications have different size limits and step sizes. More configurations
ParameterDescriptionCharacter Set Select the character set to use 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: utf8 and gbk.
- Tenants in HBase API and Table API compatible modes support the utf8mb4 character set.
Collation Select the collation to use 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.
