This topic describes how to create and manage tenants in the OceanBase Cloud console.
Background
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
- If the cloud vendor for a Flagship Edition cluster instance is Azure, tenants in the same cluster instance can use only one of the following compatibility modes: MySQL-compatible mode, Oracle-compatible mode, or KV-compatible mode (HBase API/Table API). You cannot create tenants in multiple compatibility modes in the same cluster instance.
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
- The preceding limits apply only to Shared Nothing clusters deployed in the 3F or 2F1A mode.
- For more information about cluster deployment modes, see Deployment modes.
- 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 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.
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. Networking Select this option to create a public endpoint at the same time. Primary endpoint database proxy configuration
Note
- On Alibaba Cloud, if the console offers to create a public connection when you create the tenant, you can select this option and configure the proxy for the primary endpoint. You can also obtain a public or private connection after creating the tenant.
- 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: Shared proxy clusters share compute resources with other customers and suit workloads with steady traffic.
- Exclusive: Exclusive proxy clusters use dedicated compute resources and are suited to high-traffic workloads. For more information about billing, 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 node. If the primary endpoint’s proxy runs outside the tenant’s primary zone, traffic crosses zones, which can increase SQL response times. 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.
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. 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.