Multi-tenant isolation method, apparatus, device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2022-11-17
- Publication Date
- 2026-06-19
AI Technical Summary
Existing tenant isolation methods result in low resource utilization and heavy maintenance in HBase clusters, and cannot effectively isolate the impact between tenant services.
By receiving resource request requests from tenants, allocating a reasonable number of domain server resources, creating independent and public domain server groups, and creating services in different groups according to business needs, the system achieves isolation between tenants and optimized resource allocation.
It improves the utilization rate of cluster resources, reduces the pressure of operation and maintenance, ensures the isolation effect between tenant services, and avoids resource waste and overload.
Smart Images

Figure CN116264576B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, specifically to a multi-tenant isolation method, apparatus, device, and storage medium. Background Technology
[0002] Apache HBase is a distributed, scalable, massive data storage system built on Hadoop. It is commonly used to store massive amounts of relatively simple data (typically exceeding terabytes), such as historical order records, log data, and monitoring Metris data. HBase provides simple, fast key-based query capabilities. A complete HBase cluster consists of ZooKeeper, HDFS, HBase Master, and HBase RegionServer components.
[0003] With the widespread adoption of HBase across various fields, the number of users (also known as tenants) using the same HBase cluster is increasing. The inconsistent pressure on the region servers (RegionServers) caused by tenants' read / write operations on their respective tables, as well as table splitting / merging operations, can affect the usage of other tenants. To address this, the HBase community provides numerous resource isolation features to ensure that multiple tenants can share the same HBase cluster:
[0004] 1. Namespace: Namespaces provide a simple method for resource isolation. Tenants can create their tables under one or more namespaces according to their business lines. HBase clusters also provide methods to limit namespace resources, including limits on the amount of data accessed, storage, and the number of regions. From a resource perspective, this prevents a single tenant from excessively consuming cluster resources and impacting the business of other tenants, ensuring that multiple tenants can share the HBase cluster.
[0005] 2. RegionServer Group (RSG): RSG multi-tenant isolation technology was first proposed by Francis Liu of Yahoo. The core idea is to allocate RegionServers to different groups, and tenants assign their namespaces or tables to a specific RSG, thereby achieving isolation. It can be visualized as each RSG forming a small cluster, and operations personnel only need to maintain one cluster.
[0006] However, with the above solutions, when limiting resources for a tenant's namespace, the mixed distribution of the tenant's HBase table regions across multiple RegionServers, coupled with differences in request methods, required response times, and resource consumption among tenants, often leads to mutual interference between tenant services. This results in cluster operations personnel needing to intervene promptly when server pressure is high to identify which tenant's service is causing the problem and coordinate solutions, making their workload exceptionally heavy. Furthermore, RSG's multi-tenant resource isolation technology can only estimate the demand for each service in advance and cannot effectively integrate with actual needs. This leads to some RSG RegionServers having excessively low resource utilization, others experiencing excessively high load requiring expansion, and still others potentially being idle. Since RegionServer node resources are extremely limited, this approach does not improve cluster resource utilization. Summary of the Invention
[0007] In view of the above problems, embodiments of the present invention provide a multi-tenant isolation method, apparatus, device and storage medium to solve the problems of low isolation effect and low cluster resource utilization of existing tenant isolation methods.
[0008] According to one aspect of the present invention, a multi-tenant isolation method is provided, comprising: receiving a resource request submitted by a tenant, the resource request including tenant information and resource requirements; querying cluster resources and allocating domain server resources to the tenant according to the resource requirements; creating an independent domain server group based on the domain server resources; receiving a service creation request submitted by a tenant and creating a service in the independent domain server group or in a public domain server group according to the service creation request, the public domain server group being constructed based on unallocated domain servers in the cluster resources.
[0009] Optionally, querying cluster resources and allocating domain server resources to tenants based on resource requirements includes: querying the first load data of all unallocated domain servers in the cluster resources; determining the first number of domain servers required based on resource requirements; selecting the first number of unallocated domain servers with the lowest first load data as domain server resources and allocating them to tenants.
[0010] Optionally, creating an independent domain server group based on domain server resources includes: querying the first business data running on each domain server in the domain server resources; migrating the first business data to other unallocated domain servers in the cluster resources; and creating an independent domain server group using the domain servers where the first business data has been migrated.
[0011] Optionally, the first business data can be migrated to other unallocated domain servers in the cluster resources, including: querying the second load data of the unallocated domain servers in the cluster resources; and distributing the first business data evenly to each unallocated domain server according to the size of the second load data of each unallocated domain server.
[0012] Optionally, after creating an independent domain server group based on domain server resources, the method further includes: receiving a namespace creation request sent by a tenant, the namespace creation request including tenant information and a namespace creation zone; determining whether the namespace creation zone is an independent domain server group corresponding to the tenant or a public domain server group; if it is an independent domain server group, creating a namespace in the independent domain server group and establishing a mapping relationship between the independent domain server group and the namespace; if it is a public domain server group, creating a namespace in the public domain server group and establishing a mapping relationship between the public domain server group and the namespace.
[0013] Optionally, after creating a service in an independent domain server group or a public domain server group according to the service creation request, the method further includes: receiving a resource reclamation request submitted by a tenant, the resource reclamation request including tenant information and resource reclamation amount; querying the second load data of each domain server in the independent domain server group; confirming the second number of domain servers to be reclaimed based on the resource reclamation amount; selecting the second number of target domain servers with the lowest second load data, and distributing the second service data in the target domain servers to other domain servers in the independent domain server group; and classifying the target domain servers as unallocated domain servers.
[0014] Optionally, after creating a standalone domain server group based on domain server resources, the process also includes binding the standalone domain server group to the tenant based on tenant information.
[0015] According to another aspect of the present invention, a multi-tenant isolation device is provided, comprising: a receiving module for receiving a resource request submitted by a tenant, the resource request including tenant information and resource requirements; an allocation module for querying cluster resources and allocating domain server resources to the tenant according to the resource requirements; a first creation module for creating an independent domain server group based on the domain server resources; and a second creation module for receiving a service creation request submitted by a tenant and creating a service in the independent domain server group or in a public domain server group according to the service creation request, the public domain server group being constructed based on unallocated domain servers in the cluster resources.
[0016] According to another aspect of the present invention, a computer device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform an operation of the multi-tenant isolation method as described above.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein at least one executable instruction is stored therein, which, when executed on a computer device / apparatus, causes the computer device / apparatus to perform the operation of the multi-tenant isolation method as described above.
[0018] The multi-tenant isolation method of this invention allocates a reasonable number of domain server resources to tenants based on their resource request, thereby ensuring the rational allocation of cluster resources and avoiding low cluster resource utilization due to unreasonable resource allocation. Then, it uses these domain server resources to create independent domain server groups for tenants. Unallocated domain servers in the cluster can be used to build public domain server groups. When a tenant needs to create services on the cluster resources, it can create services with low request volume and no response time requirements on the public domain server group, and services with high request volume and high response time requirements on the independent domain server group. This ensures that services with high request volume and high response time requirements do not affect other tenants' use, improving the isolation effect when tenants use cluster resources. Services with low request volume and no response time requirements that do not generate excessive load can be processed on the public domain server group, reducing the pressure on the independent domain server group and further improving the overall utilization of cluster resources.
[0019] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0020] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0021] Figure 1 A flowchart illustrating the first embodiment of the multi-tenant isolation method of the present invention is shown;
[0022] Figure 2 A flowchart illustrating a second embodiment of the multi-tenant isolation method of the present invention is shown;
[0023] Figure 3 A flowchart illustrating a third embodiment of the multi-tenant isolation method of the present invention is shown;
[0024] Figure 4 A schematic diagram of the structure of a first embodiment of the multi-tenant isolation device of the present invention is shown;
[0025] Figure 5 A schematic diagram of the structure of a second embodiment of the multi-tenant isolation device of the present invention is shown;
[0026] Figure 6 A schematic diagram of the structure of a third embodiment of the multi-tenant isolation device of the present invention is shown;
[0027] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation
[0028] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0029] Figure 1 A flowchart of a first embodiment of the multi-tenant isolation method of the present invention is shown, the method being executed by a computer device. Figure 1 As shown, the method includes the following steps:
[0030] Step 101: Receive resource request requests submitted by tenants. The resource request requests include tenant information and resource requirements.
[0031] Specifically, the resource request submitted by the tenant includes tenant information and resource demand, as well as a business description and the expected resource availability time, which are used to review the tenant and confirm whether they are eligible to apply for the resources.
[0032] Step 102: Query cluster resources and allocate domain server resources to tenants according to resource requirements.
[0033] Specifically, in this embodiment, the cluster resource is an HBase cluster resource, which includes multiple domain servers used to provide resource services to tenants. Upon receiving a resource request from a tenant, the system queries the domain servers in the cluster resource and allocates a domain server to the tenant based on the tenant's resource requirements.
[0034] Step 103: Create a separate domain server group based on the domain server resources.
[0035] Specifically, after allocating domain server resources to a tenant, an independent domain server group is created using those resources and then made available to the tenant.
[0036] Furthermore, after step 103, the process also includes: binding the independent domain server group to the tenant based on the tenant information.
[0037] Specifically, by binding independent domain servers to tenants, a correspondence is established between tenants and independent domain servers, making it convenient for tenants to manage the corresponding independent domain servers.
[0038] Step 104: Receive the service creation request submitted by the tenant, and create the service in the independent domain server group or the public domain server group according to the service creation request. The public domain server group is built based on the domain servers that are not allocated in the cluster resources.
[0039] Specifically, after allocating domain server resources to tenants and creating independent domain server groups based on these resources, tenants can perform business processing within the cluster resources. It should be noted that in this embodiment, the created independent domain server groups are independent of each other; each tenant has its own corresponding independent domain server group. When a tenant creates a service, it can do so within its own independent domain server group, ensuring complete isolation between tenant services and preventing mutual interference. Furthermore, after creating independent domain server groups, unallocated domain servers in the cluster resources can be used to build a public domain server group. This public domain server group serves as a common platform for all tenants, providing services to all tenants. Thus, tenants can choose to create services on independent domain server groups or public domain server groups based on their business needs. For example, services with low request volume and no response time requirements can be created on public domain server groups, while services with high request volume and high response time requirements can be created on independent domain server groups. Alternatively, users can place important services on independent domain server groups and less important services on public domain server groups.
[0040] Furthermore, step 102 specifically includes:
[0041] 1. Query the first load data of all unassigned domain servers in the cluster resources.
[0042] 2. Determine the initial number of domain servers required based on resource needs.
[0043] 3. Select the first number of unallocated domain servers with the lowest first load data as domain server resources and allocate them to tenants.
[0044] Specifically, the domain servers in the cluster resources include domain servers not allocated to tenants and domain servers already allocated to tenants. During resource allocation, only the unallocated domain servers are allocated to tenants. In this embodiment, the unallocated domain servers are used to build a common domain server group. The domain servers in this common domain server group may also be running services created by tenants. Therefore, before allocating unallocated domain servers to tenants, the service data in the selected domain servers needs to be migrated to other unallocated domain servers. However, the data migration process in domain servers can lead to a decrease in the read / write performance of the corresponding services. Therefore, by querying the first load data of each domain server and selecting the domain server with the lower load pressure for data migration, the efficiency of data migration can be greatly improved, maximizing the stable operation of services and reducing the impact of the data migration process on service operation.
[0045] Furthermore, step 103 specifically includes:
[0046] 1. Query the first business data running on each domain server in the domain server resources.
[0047] 2. Migrate the first business data to other unallocated domain servers in the cluster resources.
[0048] 3. Create an independent domain server group using the domain server where the first business data has been migrated.
[0049] Specifically, after confirming the domain server assigned to the tenant, the system queries the first business data running on that domain server, then migrates the first business data to other unassigned domain servers for operation, and then creates an independent domain server group based on the cleared domain servers.
[0050] Furthermore, the steps to migrate the first business data to other unallocated domain servers in the cluster resources specifically include:
[0051] 2.1 Query the second load data of unallocated domain servers in the cluster resources.
[0052] 2.2. Based on the size of the second load data of each unassigned domain server, distribute the first business data evenly to each unassigned domain server.
[0053] Specifically, in order to ensure that business data in unallocated domain servers in the cluster resources can be evenly distributed so that each domain server can be better utilized, when migrating the first business data from the domain server allocated to the tenant to other unallocated domain servers, the second load data of each other unallocated domain server is first confirmed to determine the current resource utilization rate of each other unallocated domain server. Then, based on the resource utilization rate, the first business data is evenly distributed to each unallocated domain server so that the resource utilization rate of each other unallocated domain server is relatively balanced, avoiding the situation where some domain servers are under excessive load while some domain servers are idle.
[0054] The first embodiment of the multi-tenant isolation method of the present invention allocates a reasonable number of domain server resources to tenants based on their resource request requests, thereby ensuring the reasonable allocation of cluster resources and avoiding low utilization of cluster resources due to unreasonable allocation. Then, the domain server resources are used to create independent domain server groups for tenants, while the domain servers in the cluster resources that have not been allocated can be used to build public domain server groups. When a tenant needs to create services on the cluster resources, the tenant can create services with low request volume and no response time requirements on the public domain server group, and create services with high request volume and high response time requirements on the independent domain server group, so that services with high request volume and high response time requirements will not affect the use of other tenants, improving the isolation effect when tenants use cluster resources. Services with low request volume and no response time requirements that will not generate excessive load can be processed on the public domain server group, reducing the pressure on the independent domain server group and further improving the overall utilization of cluster resources.
[0055] Figure 2 A flowchart of a second embodiment of the multi-tenant isolation method of the present invention is shown, the method being executed by a computer device. Figure 2 As shown, the method includes the following steps:
[0056] Step 201: Receive resource request requests submitted by tenants. The resource request requests include tenant information and resource requirements.
[0057] Specifically, the process of step 201 is the same as that of step 101. Please refer to the details of step 101, which will not be repeated here.
[0058] Step 202: Query cluster resources and allocate domain server resources to tenants according to resource requirements.
[0059] Specifically, the process of step 202 is the same as that of step 102. Please refer to the details of step 102, which will not be repeated here.
[0060] Step 203: Create a separate domain server group based on the domain server resources.
[0061] Specifically, the process of step 203 is the same as that of step 103. Please refer to the details of step 103, which will not be repeated here.
[0062] Step 204: Receive the namespace creation request sent by the tenant. The namespace creation request includes tenant information and the namespace creation area.
[0063] It should be noted that, in order to improve the isolation between tenants' business data, in addition to creating independent domain server groups for each tenant, corresponding namespaces can also be created for the same tenant. This allows different businesses to be created in different namespaces, thus achieving isolation between businesses.
[0064] Step 205: Determine whether the namespace creation zone is a standalone domain server group or a public domain server group corresponding to the tenant. If it is a standalone domain server group, proceed to step 206; if it is a public domain server group, proceed to step 207.
[0065] Step 206: Create a namespace in the standalone domain server group and establish a mapping relationship between the standalone domain server group and the namespace.
[0066] Step 207: Create a namespace in the public domain server group and establish a mapping relationship between the public domain server group and the namespace.
[0067] Specifically, after receiving a namespace creation request submitted by a tenant, the system determines from the namespace creation request whether the tenant's goal is to create the namespace in a standalone domain server group or a public domain server group, and then creates the namespace in either the standalone domain server group or the public domain server group according to the tenant's needs.
[0068] Step 208: Receive the service creation request submitted by the tenant, and create the service in the independent domain server group or the public domain server group according to the service creation request. The public domain server group is built based on the domain servers not allocated in the cluster resources.
[0069] Specifically, the process of step 208 is the same as that of step 104. Please refer to the details of step 104, which will not be repeated here.
[0070] The second embodiment of the multi-tenant isolation method of the present invention, based on the first embodiment, provides tenants with the function of creating namespaces, enabling users to create namespaces in independent domain server groups or public domain server groups according to their own business needs. Then, tenants can create businesses in different namespaces according to their business needs, further improving the isolation effect between tenant business data and avoiding mutual interference between businesses.
[0071] Figure 3 A flowchart of a third embodiment of the multi-tenant isolation method of the present invention is shown, which is executed by a computer device. Figure 3 As shown, the method includes the following steps:
[0072] Step 301: Receive resource request requests submitted by tenants. The resource request requests include tenant information and resource requirements.
[0073] Specifically, the process of step 301 is the same as that of step 101. Please refer to the details of step 101, which will not be repeated here.
[0074] Step 302: Query cluster resources and allocate domain server resources to tenants according to resource requirements.
[0075] Specifically, the process of step 302 is the same as that of step 102. Please refer to the details of step 102, which will not be repeated here.
[0076] Step 303: Create a separate domain server group based on the domain server resources.
[0077] Specifically, the process of step 303 is the same as that of step 103. Please refer to the details of step 103, which will not be repeated here.
[0078] Step 304: Receive the service creation request submitted by the tenant, and create the service in the independent domain server group or the public domain server group according to the service creation request. The public domain server group is built based on the domain servers not allocated in the cluster resources.
[0079] Specifically, the process of step 304 is the same as that of step 104. Please refer to the details of step 104, which will not be repeated here.
[0080] Step 305: Receive the resource reclamation request submitted by the tenant. The resource reclamation request includes tenant information and the amount of resources to be reclaimed.
[0081] Step 306: Query the second load data of each domain server in the independent domain server group.
[0082] Step 307: Determine the second number of domain servers to be reclaimed based on the amount of resources reclaimed.
[0083] Step 308: Select the second number of target domain servers with the lowest second load data, and distribute the second business data in the target domain servers to other domain servers in the independent domain server group.
[0084] Step 309: Divide the target domain server into an unassigned domain server.
[0085] It should be noted that after creating an independent domain server group for a tenant, the tenant can use the independent domain server group according to its own business needs. However, the tenant's resource requirements are not static. When the user's business resource requirements decrease, the domain servers allocated by the independent domain server group may become idle. Therefore, in order to avoid resource idleness, in this embodiment, when the tenant's resource requirements decrease, a portion of the resources in the independent domain server group can be reclaimed to the public domain server group for use by other tenants.
[0086] Specifically, upon receiving a resource reclamation request from a tenant, the system queries the second load data of each domain server in the tenant's independent domain server group. Then, based on the resource reclamation amount, it determines the second number of domain servers to be reclaimed. Next, based on the second load data, it selects the second number of target domain servers with the smallest second load data from the independent domain server group. The second business data from these target domain servers is then distributed to the other domain servers in the independent domain server group. Finally, these domain servers are classified as unallocated domain servers and added to the public domain server group. It should be noted that the second business data in the target domain servers is also evenly distributed to the other domain servers in the independent domain server group to ensure that each domain server is utilized effectively.
[0087] In addition, the tenant's independent domain server group can be expanded. The expansion process is similar to the creation process of an independent domain server group, except that it does not require creating a new independent domain server group. Instead, the allocated domain server is directly added to the corresponding independent domain server group to achieve the purpose of expansion.
[0088] The second embodiment of the multi-tenant isolation method of the present invention, based on the first embodiment, reassigns idle domain servers in the independent domain server group to the public domain server group according to the user's resource reclamation request, so that they can be used by other tenants, thereby ensuring the rational use of cluster resources and avoiding resource waste.
[0089] Figure 4 A schematic diagram of an embodiment of the multi-tenant isolation device of the present invention is shown. Figure 4 As shown, the multi-tenant isolation device 400 includes: a receiving module 401, an allocation module 402, a first creation module 403, and a second creation module 404.
[0090] The receiving module 401 is used to receive resource request requests submitted by tenants, which include tenant information and resource requirements.
[0091] The allocation module 402 is used to query cluster resources and allocate domain server resources to tenants according to resource requirements.
[0092] The first creation module 403 is used to create an independent domain server group based on domain server resources;
[0093] The second creation module 404 is used to receive a service creation request submitted by a tenant, and create a service in an independent domain server group or in a public domain server group according to the service creation request. The public domain server group is built based on the domain servers not allocated in the cluster resources.
[0094] Optionally, the allocation module 402 performs the operation of querying cluster resources and allocating domain server resources to tenants according to resource requirements. Specifically, this includes: querying the first load data of all unallocated domain servers in the cluster resources; determining the first number of domain servers required according to resource requirements; selecting the first number of unallocated domain servers with the lowest first load data as domain server resources and allocating them to tenants.
[0095] Optionally, the first creation module 403 performs the operation of creating an independent domain server group based on the domain server resources, specifically including: querying the first business data running on each domain server in the domain server resources; migrating the first business data to other unallocated domain servers in the cluster resources; and creating an independent domain server group using the domain servers where the first business data has been migrated.
[0096] Optionally, the first creation module 403 performs the operation of migrating the first business data to other unallocated domain servers in the cluster resources, specifically including: querying the second load data of the unallocated domain servers in the cluster resources; and distributing the first business data evenly to each unallocated domain server according to the size of the second load data of each unallocated domain server.
[0097] Optionally, such as Figure 5 As shown, the multi-tenant isolation device 400 also includes a third creation module 405, used for: receiving a namespace creation request sent by a tenant, the namespace creation request including tenant information and a namespace creation area; determining whether the namespace creation area is the tenant's independent domain server group or a public domain server group; if it is an independent domain server group, then creating a namespace in the independent domain server group and establishing a mapping relationship between the independent domain server group and the namespace; if it is a public domain server group, then creating a namespace in the public domain server group and establishing a mapping relationship between the public domain server group and the namespace.
[0098] Optionally, such as Figure 6As shown, the multi-tenant isolation device 400 also includes a resource reclamation module 406, used for: receiving a resource reclamation request submitted by a tenant, the resource reclamation request including tenant information and resource reclamation amount; querying the second load data of each domain server in the independent domain server group; confirming the second number of domain servers to be reclaimed based on the resource reclamation amount; selecting the second number of target domain servers with the lowest second load data, and allocating the second business data in the target domain servers to other domain servers in the independent domain server group; and classifying the target domain servers as unallocated domain servers.
[0099] Optionally, after the first creation module 403 performs the operation of creating an independent domain server group based on the domain server resources, it is also used to: bind the independent domain server group to the tenant based on the tenant information.
[0100] For other details regarding the implementation techniques of each module in the multi-tenant isolation device of the above embodiments, please refer to the description of the multi-tenant isolation method in the above embodiments, which will not be repeated here.
[0101] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0102] Figure 7 The diagram shows a structural schematic of an embodiment of the computer device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.
[0103] like Figure 7 As shown, the computer device may include: a processor 502, a communications interface 504, a memory 506, and a communications bus 508.
[0104] The processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508. Communication interface 504 is used to communicate with other network elements such as UEs or other servers. The processor 502 executes program 510, specifically performing the relevant steps described in the multi-tenant isolation method embodiment.
[0105] Specifically, program 510 may include program code, which includes computer-executable instructions.
[0106] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0107] Memory 506 is used to store program 510. Memory 506 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0108] Specifically, program 510 can be called by processor 502 to cause the computer device to perform the following operations:
[0109] Receive resource request requests submitted by tenants, which include tenant information and resource requirements;
[0110] Query cluster resources and allocate domain server resources to tenants based on resource requirements;
[0111] Create a separate domain server group based on domain server resources;
[0112] It receives service creation requests submitted by tenants and creates services in either a standalone domain server group or a public domain server group based on the service creation requests. The public domain server group is built based on domain servers that are not allocated in the cluster resources.
[0113] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a computer device / apparatus, causes the computer device / apparatus to perform the multi-tenant isolation method described in any of the above method embodiments.
[0114] Executable instructions can be used to cause a computer device to perform the following operations:
[0115] Receive resource request requests submitted by tenants, which include tenant information and resource requirements;
[0116] Query cluster resources and allocate domain server resources to tenants based on resource requirements;
[0117] Create a separate domain server group based on domain server resources;
[0118] It receives service creation requests submitted by tenants and creates services in either a standalone domain server group or a public domain server group based on the service creation requests. The public domain server group is built based on domain servers that are not allocated in the cluster resources.
[0119] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0120] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0121] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0122] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0123] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0124] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A multi-tenant isolation method, comprising: It includes: Receive resource request requests submitted by tenants, the resource request requests including tenant information and resource requirements; Query the first load data of all unallocated domain servers in the cluster resources, and determine the first number of domain servers required based on resource demand; Select the first number of unallocated domain servers with the lowest first load data as domain server resources and allocate them to the tenant; Query the first business data running on each domain server in the domain server resources; migrate the first business data to other unallocated domain servers in the cluster resources; Create an independent domain server group using the domain server where the first business data has been migrated; The system receives a service creation request submitted by the tenant and creates a service in the independent domain server group or in the public domain server group according to the service creation request. The public domain server group is built based on the domain servers that are not allocated in the cluster resources. Receive resource reclamation requests submitted by tenants, including tenant information and resource reclamation amount; query the second load data of each domain server in the independent domain server group; and determine the second number of domain servers to be reclaimed based on the resource reclamation amount. Select the second number of target domain servers with the lowest second load data, and distribute the second business data in the target domain servers to other domain servers in the independent domain server group; divide the target domain servers into unassigned domain servers and add them to the public domain server group.
2. The multi-tenant isolation method according to claim 1, characterized in that, The step of migrating the first business data to other unallocated domain servers in the cluster resources includes: Query the second load data of the unallocated domain servers in the cluster resources; Based on the size of the second load data of each unassigned domain server, the first service data is evenly distributed to each unassigned domain server.
3. The multi-tenant isolation method according to claim 1, characterized in that, After creating the independent domain server group, the following is also included: Receive a namespace creation request sent by the tenant, the namespace creation request including the tenant information and the namespace creation area; Determine whether the namespace creation zone is the tenant's independent domain server group or the public domain server group; If it is the independent domain server group, then create a namespace in the independent domain server group and establish a mapping relationship between the independent domain server group and the namespace; If it is the public domain server group, then the namespace is created in the public domain server group, and a mapping relationship is established between the public domain server group and the namespace.
4. The multi-tenant isolation method according to claim 1, characterized in that, After creating the independent domain server group, the following is also included: Bind the independent domain server group to the tenant based on the tenant information.
5. A multi-tenant isolation device, characterized in that, It includes: The receiving module is used to receive resource request requests submitted by tenants, wherein the resource request requests include tenant information and resource requirements; The allocation module is used to query the first load data of all unallocated domain servers in the cluster resources, and determine the first number of domain servers required based on resource demand. Select the first number of unallocated domain servers with the lowest first load data as domain server resources and allocate them to the tenant; The first creation module is used to query the first business data running on each domain server in the domain server resources; The first business data is migrated to other unallocated domain servers in the cluster resources; Create an independent domain server group using the domain server where the first business data has been migrated; The second creation module is used to receive the service creation request submitted by the tenant, and create the service in the independent domain server group or in the public domain server group according to the service creation request. The public domain server group is built based on the domain servers not allocated in the cluster resources. The resource reclamation module is used to receive resource reclamation requests submitted by tenants, which include tenant information and the amount of resources to be reclaimed; query the second load data of each domain server in the independent domain server group; and determine the second number of domain servers to be reclaimed based on the amount of resources to be reclaimed. Select the second number of target domain servers with the lowest second load data, and distribute the second business data in the target domain servers to other domain servers in the independent domain server group; divide the target domain servers into unassigned domain servers and add them to the public domain server group.
6. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the multi-tenant isolation method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the multi-tenant isolation method as described in any one of claims 1-4.