Overview
What Is Multi-tenancy?
TaurusDB provides multi-tenancy to maximize database resource utilization. Data is isolated among tenants. Different tenants can only access their own data. There are tenant-level resource isolation and user-level resource isolation to avoid resource wastes and improve performance. Resources can be dynamically adjusted to process workload peaks and troughs of different tenants or users in a timely manner.
The following figure shows the principle of multi-tenancy.

The figure shows the overall process of multi-tenancy. There are system tenants and common tenants.
There are a database (DB_1) and a user (User_1) under the system tenant, two databases (DB_1 and DB_2) and two users (User_1 and User_2) under common tenant Tenant_1, and two databases (DB_1 and DB_2) and two users (User_1 and User_2) under common tenant Tenant_2.
The system tenant has access to the entire DB instance. That is, the system tenant can access and manage its own database and user, and can also access and manage the databases and users under Tenant_1 or Tenant_2. Data is isolated between different common tenants. Tenant_1 can only access and manage only its own databases and users. It cannot access the databases and users under Tenant_2 or the database and user under the system tenant.
In addition to data isolation, multi-tenancy also ensures vCPU isolation. The figure shows the total vCPUs of the current instance. You can adjust resource settings for the system tenant and common tenants, and then allocate these resources to specific users under a tenant.
Basic Concepts
Constraints
- If the kernel version of your TaurusDB instance is 2.0.60.241200 or later, the new multi-tenant views (including MT_RESOURCE_CONFIG, MT_TENANT, MT_TENANT_DB, MT_RESOURCE_PLAN, MT_CONSUMER_GROUP, MT_GROUP_MAPPING_RULE, and MT_PLAN_DIRECTIVE) will replace the old DBA_RSRC_* views.
- Binlog: If common tenants pull binlogs, data among tenants will not be isolated. Users of common tenants are not allowed to pull binlogs.
- Proxy instance: HTAP (Standard Edition) does not support databases whose name contains at signs (@). When a database of a common tenant is migrated to an HTAP instance, the destination database name will be changed. After Auto Assign Requests to Column Store or Row Store Nodes is enabled, the proxy instance requires that the source and destination database names be the same, so this function must be disabled for migrating databases of common tenants.
- Backup and restoration:
If the source instance has multi-tenancy enabled and its kernel version is earlier than 2.0.60.241200, and the destination instance's kernel version is 2.0.60.241200 or later, data of the source instance cannot be restored to the destination instance using backups. In such a case, the __taurus_sys__ database may be cleared, and multi-tenancy cannot function properly.
If multi-tenancy is disabled for the destination instance, you cannot create users, databases, and tablespaces with at signs (@) in their names for that instance.
- Upgrade and downgrade:
- If the kernel version of your TaurusDB instance with multi-tenancy enabled is downgraded from 2.0.60.241200 or later to a version earlier than 2.0.60.241200, multi-tenancy will be disabled. To re-enable the function, you need to reboot the instance.
- If the kernel version of your TaurusDB instance is downgraded from 2.0.60.241200 or later to a version earlier than 2.0.60.241200, the new multi-tenant views (including MT_RESOURCE_CONFIG, MT_TENANT, MT_TENANT_DB, MT_RESOURCE_PLAN, MT_CONSUMER_GROUP, MT_GROUP_MAPPING_RULE, and MT_PLAN_DIRECTIVE) may still be displayed when you run the show tables command in information_schema, but cannot be accessed. To clear the residual multi-tenant view metadata, you need to reboot the instance.
- If the kernel version of your TaurusDB instance is upgraded to 2.0.60.241200 or later, the new multi-tenant views may fail to be displayed when you run the show tables command in information_schema, but can be accessed. To display the multi-tenant views, you need to reboot the instance.
- Compatibility:
- If multi-tenancy is enabled and then disabled, the names of databases, users, or tablespaces cannot contain at signs (@).
- For a common tenant, the maximum length of a database name is reduced from 64 characters to 50 characters, and the maximum length of a user name is reduced from 32 characters to 20 characters.
- The system databases mysql and sys are not available to common tenants.
- For a common tenant, fuzzy search is required when a username or database name is used to query tables in the system database performance_schema.
- User root under a system tenant can kill sessions of other users. Users under a common tenant can only kill their own sessions.
- Instances with multi-tenancy enabled do not support full-text indexes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot