Resource isolation control method, device and storage medium
By verifying the tenant's resource application information and basic information and controlling the resource possession, the resource isolation and management problems in the cloud service platform are solved, and the rational allocation and efficient use of resources are achieved.
Patent Information
- Application Number
- CN202311151389.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-07
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-09-07
AI Technical Summary
Existing cloud service platforms are difficult to effectively isolate and manage resources in a multi-tenant environment, resulting in a single tenant occupies too much resources to affect the user experience of other tenants.
By receiving the tenant's resource acquisition and placement application information and basic information, verify its effectiveness, and control the release or recycling of the resource pool based on the comparison results of the estimated resource occupancy and the maximum occupancy, and send an isolation signal to prevent excessive resource occupancy.
Reasonable allocation and isolation of resources are achieved, performance impacts caused by a single tenant occupying too many resources are avoided, and resource utilization efficiency and security in a multi-tenant environment are improved.
Smart Images

Figure CN117194023B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cluster resource management, and in particular to a resource isolation control method, device and storage medium. Background Art
[0002] Currently, in order to fully utilize resources, cloud service platforms often use the same node to serve multiple tenants at the same time. If a tenant generates a large number of requests and processes a large amount of data within a certain period of time due to the uniqueness of its business, it may cause a particularly high resource usage, thus affecting other tenants served by the node at the same time. What's more, when a tenant's operation is unreasonable, it will occupy resources far exceeding the node's capacity, causing the entire node to be unavailable.
[0003] In response to this situation, cloud service platform vendors in the market usually use hardware to isolate resources. For example, different customers can purchase different RDSs for Alibaba Cloud's database RDS, but each tenant must purchase everything from the host to the database separately, which is relatively costly. Using software to isolate resources is often to verify the rationality of tenant applications. As an isolation of tenants and resource pools, it does not limit the resources occupied by each tenant in the cloud service platform's nodes. There will still be problems with unreasonable node resource allocation, which affects the user experience of multiple tenants. Summary of the invention
[0004] In order to ensure the rationality of resource allocation and prevent a single tenant from occupying too many resources and affecting the use of other tenants, the present application provides a resource isolation control method, device and storage medium.
[0005] This application provides a resource isolation control method, which adopts the following technical solution:
[0006] A resource isolation control method, comprising:
[0007] Receive resource access application information and tenant basic information from the tenant, wherein the resource access application information includes resource acquisition application information and resource recovery application information;
[0008] Verify the validity of the tenant basic information, find the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, and verify the validity of the resource access application information;
[0009] When the verification of the tenant basic information and the resource access application information is passed, the estimated resource occupancy is calculated according to the resource access application information and the current tenant resource occupancy;
[0010] According to the type of the resource access and placement application information, combined with the comparison result of the estimated resource occupancy and the maximum resource occupancy, the resource pool is controlled to release or recycle the target resources corresponding to the resource access and placement application and feed an isolation signal; the maximum resource occupancy is associated with the tenant basic information.
[0011] By adopting the above technical solution, the basic information of the tenant is verified to clarify whether the tenant's identity is the tenant corresponding to the resource pool, thereby preventing other unrelated personnel from connecting to the resource pool and occupying resources, which enhances the security of information in the resource pool to a certain extent. At the same time, this case verifies the rationality of the resource access application information to ensure that the application submitted by the tenant is reasonable, reduce subsequent invalid work, and improve overall operating efficiency. In addition, this case will also estimate the estimated amount of resources occupied by the tenant in the resource pool after executing the corresponding operation of the resource access application information. According to the comparison result of the estimated amount of resources and the maximum amount of resources, combined with the type of the resource access application information, the resource pool is controlled to release or recycle the target resources corresponding to the resource access application and feed an isolation signal. Avoid a single tenant occupying too many resources in the resource pool and hinder the use of other tenants connected to the same node.
[0012] Optionally, verifying the validity of the tenant basic information includes:
[0013] The validity of the tenant basic information is verified according to the preset permission tenant set; when the tenant basic information belongs to the permission tenant set, the tenant basic information verification passes; when the tenant basic information does not belong to the permission tenant set, the tenant basic information verification fails.
[0014] By adopting the above technical solution, the validity of the tenant basic information is verified through the permission tenant set, so as to identify whether the current tenant basic information has access rights, reject the application of unauthorized tenants, and protect the security of the data in the data pool.
[0015] Optionally, verifying the validity of the resource access application information includes:
[0016] When the resource access application information is resource recycling application information, determining that the verification of the resource access information is passed;
[0017] When the resource access application information is resource acquisition application information, comparing the current resource occupancy with a preset maximum resource occupancy;
[0018] When the resource occupancy is lower than the preset maximum resource occupancy, the verification of the resource access application information is passed; when the resource occupancy is higher than or equal to the preset maximum resource occupancy, the verification of the resource access application information is failed.
[0019] By adopting the above technical solution, this case verifies the types of resource access application information separately, and fully considers the difference between new resource occupation and resource recovery occupation. When the current tenant resource occupation allows for new occupation space (that is, the current tenant resource occupation is less than the maximum resource occupation), new resource occupation is allowed, and the resource access application information is determined to be valid. Otherwise, new resource occupation is not allowed, and the resource access application information is determined to be invalid. At the same time, resource recovery is allowed in any case, that is, all resource recovery application information is determined to be valid.
[0020] Optionally, calculating the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy corresponding to the tenant basic information in the resource pool includes:
[0021] Determining the resource increase amount according to all target resources indicated by the resource access application information;
[0022] Calculate the sum of the current tenant resource occupancy and the resource increase to obtain the estimated resource occupancy;
[0023] Wherein, when the resource access application information is the resource acquisition application information, the resource increase amount is a positive value; when the resource access application information is the resource recovery application information, the resource increase amount is a negative value.
[0024] By adopting the above technical solution, the target resources are locked according to the resource access and placement application information, the resource quantities of all target resources are taken as the resource increase, and the expected resource occupancy of the tenant after the operation corresponding to the resource access and placement information is executed is estimated in advance, thereby facilitating the subsequent determination of whether the operation corresponding to the resource access and placement application information can be executed.
[0025] The absolute value of the resource increase is determined by the amount of resources occupied by the target resources, and the positive or negative value of the resource increase is determined by the type of resource access application information. If it is resource acquisition application information, the value of the estimated resource occupancy will increase, and the resources occupied by the tenant will further increase. If it is resource recovery application information, the value of the estimated resource occupancy will decrease, and the resources occupied by the tenant will decrease.
[0026] Optionally, the maximum resource occupancy is associated with the tenant basic information.
[0027] By adopting the above technical solution, the maximum resource occupancy used to determine whether the tenant's resource occupancy exceeds the standard corresponds to the tenant's basic information. In other words, this case supports setting different maximum resource occupancy according to different tenants, thereby realizing tailor-made different maximum resource occupancy for different tenants.
[0028] Optionally, the method further includes:
[0029] When the verification of the tenant basic information fails, an identity authentication failure signal is output to prompt the tenant that the identity authentication fails; when the verification of the resource access application information fails, an isolation signal is output to trigger the business thread to execute according to the preset instructions, and the preset instructions include a fuse instruction or a downgrade instruction.
[0030] By adopting the above technical solution, the current tenant basic information is prompted according to the identity authentication failure signal and does not have the authority to use the resource pool of this node. The isolation signal is used to prompt that the current resource access application information is unreasonable, and the resource pool is controlled to refuse to respond to the resource access application information, and at the same time trigger the business line to execute according to the preset instructions, so as to achieve the fuse or downgrade of the business process.
[0031] Optionally, according to the type of the resource access application information and in combination with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, controlling the resource pool to release or recycle the target resource corresponding to the resource access application and feeding back an isolation signal includes:
[0032] When the resource access application information is resource recovery application information, the resource pool is controlled to recover the target resource corresponding to the resource access application information, and the estimated resource occupancy is updated to the current tenant resource occupancy of the tenant basic information.
[0033] By adopting the above technical solution, when the resource access application information is resource recovery application information, the target resource is directly recovered, and the current tenant resource occupancy is updated to facilitate subsequent use by the tenant.
[0034] Optionally, according to the type of the resource access application information and in combination with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, controlling the resource pool to release or recycle the target resource corresponding to the resource access application and feeding back an isolation signal includes:
[0035] When the resource access application information is resource acquisition application information,
[0036] When the estimated resource occupancy is lower than the maximum resource occupancy, the resource pool is controlled to release the target resource corresponding to the resource access application information, and the estimated resource occupancy is updated to the current tenant resource occupancy of the tenant basic information.
[0037] By adopting the above technical solution, when the resource access information is resource acquisition information, the resource pool will be controlled to release the target resource only when the expected occupancy is lower than the maximum occupancy of the resource, so that the tenant can occupy the target resource, and then the current tenant's resource occupancy will be updated to facilitate subsequent operations.
[0038] Optionally, according to the type of the resource access application information and in combination with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, controlling the resource pool to release or recycle the target resource corresponding to the resource access application and feeding back an isolation signal includes:
[0039] When the resource access application information is resource acquisition application information,
[0040] When the estimated resource occupancy is greater than or equal to the maximum resource occupancy, an isolation signal is output to trigger the service thread to execute according to a preset instruction, where the preset instruction includes a fuse instruction or a degradation instruction.
[0041] By adopting the above technical solution, when the estimated resource occupancy exceeds the maximum resource occupancy, an isolation signal is output to trigger the business thread to execute according to the preset instructions, and at the same time, the tenant is prompted that the resource acquisition failed and the resource usage currently occupied by the tenant exceeds the limit.
[0042] Optionally, according to the type of the resource access application information and in combination with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, controlling the resource pool to release or recycle the target resource corresponding to the resource access application and feeding back an isolation signal includes:
[0043] When the resource access application information is resource acquisition application information, controlling the resource pool to release the target resource corresponding to the resource access application information, and updating the estimated resource occupancy to the current tenant resource occupancy of the tenant basic information;
[0044] When the estimated resource occupancy is greater than or equal to the maximum resource occupancy, an alarm signal is output to trigger the start of the early warning system.
[0045] By adopting the above technical solution, when the estimated resource occupancy exceeds the maximum resource occupancy, the request for resource acquisition application information is still executed, the target resources corresponding to the resource acquisition and release application are released, and an alarm signal is output at the same time to trigger the start of the early warning system, thereby notifying the on-duty personnel through the early warning system, and the on-duty personnel adjust the resource allocation of the node and each tenant connected to the node according to the specific situation.
[0046] The present invention also provides a resource isolation control device, the control device comprising:
[0047] An information receiving unit, used to receive resource access application information and tenant basic information from a tenant, wherein the resource access application information includes resource acquisition application information and resource recovery application information;
[0048] An information verification unit, used to find the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, verify the tenant basic information and resource access application information, and output the tenant valid information when the tenant basic information is verified, and output the resource application valid information when the resource access application information is verified;
[0049] The resource prediction unit, upon receiving the tenant valid information and the resource application valid information, calculates the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy;
[0050] A resource control unit is used to control the resource pool to release or recycle the target resource corresponding to the resource access application and to feed an isolation signal according to the type of the resource access application information and the comparison result between the estimated resource occupancy and the preset maximum resource occupancy.
[0051] By adopting the above technical solution, the basic information of the tenant is verified to clarify whether the tenant's identity is the tenant corresponding to the resource pool, thereby preventing other unrelated personnel from connecting to the resource pool and occupying resources, which enhances the security of information in the resource pool to a certain extent. At the same time, this case verifies the rationality of the resource access application information to ensure that the application submitted by the tenant is reasonable, reduce subsequent invalid work, and improve overall operating efficiency. In addition, this case will also estimate the estimated amount of resources occupied by the tenant in the resource pool after executing the corresponding operation of the resource access application information. According to the comparison result of the estimated amount of resources and the maximum amount of resources, combined with the type of the resource access application information, the resource pool is controlled to release or recycle the target resources corresponding to the resource access application and feed an isolation signal. Avoid a single tenant occupying too many resources in the resource pool and hinder the use of other tenants connected to the same node.
[0052] The present invention also provides a storage medium, which stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the resource isolation control method as described in any one of the above.
[0053] In summary, the present application includes at least one of the following beneficial technical effects:
[0054] 1. This case estimates the estimated resource usage of the tenant in the resource pool after executing the operation corresponding to the resource access and placement application information. Based on the comparison result of the estimated resource usage with the maximum resource usage and the type of the resource access and placement application information, the resource pool is controlled to release or recycle the target resources corresponding to the resource access and placement application and to feed an isolation signal.
[0055] 2. The maximum resource occupancy used to determine whether the tenant's resource occupancy exceeds the standard corresponds to the tenant's basic information. In other words, this case supports setting different maximum resource occupancy according to different tenants, thereby achieving different maximum resource occupancy tailored for different tenants.
[0056] 3. According to the identity authentication failure signal, the current tenant basic information is prompted that it does not have the authority to use the resource pool of this node, protecting the resource security of the resource pool. According to the isolation signal, the current resource access application information is not reasonable, and the resource pool is controlled to refuse to respond to the resource access application information, and at the same time trigger the business line to execute according to the preset instructions, so as to achieve the process fuse or the downgrade of the business line. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 is a flow chart of a resource isolation control method provided by a first embodiment of the present invention;
[0058] Figure 2 yes Figure 1 Flowchart of step 102;
[0059] Figure 3 yes Figure 1 The resource acquisition and release application information is a flow chart for resource acquisition application information;
[0060] Figure 4 yes Figure 1 A flowchart when the resource taking and putting application information is resource recycling application information;
[0061] Figure 5 It is a module diagram of a resource isolation control device provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0062] The present application is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] In the following description, for the purpose of explanation, many specific details are set forth in order to provide a thorough understanding of the inventive concept. As part of this specification, some of the drawings in the drawings of the present disclosure represent structures and devices in the form of block diagrams to avoid making the disclosed principles complicated and difficult to understand. For the sake of clarity, not all features of the actual implementation are necessarily described. References to "one specific implementation" or "specific implementations" in this disclosure mean that the specific features, structures, or characteristics described in conjunction with the specific implementation are included in at least one specific implementation, and multiple references to "one specific implementation" or "specific implementations" should not be understood as necessarily all referring to the same specific implementation.
[0064] Unless expressly limited, the terms "a", "an", and "the" are not intended to refer to a singular entity, but rather to include general categories of which specific examples may be used for illustration. Thus, the use of the terms "a" or "an" may mean any number of at least one, including "one", "one or more", "at least one", and "one or more than one". The term "or" means any of the alternatives and any combination of the alternatives, including all alternatives, unless the alternatives are expressly indicated to be mutually exclusive. The phrase "at least one of" when combined with a list of items refers to a single item in the list or any combination of the items in the list. The phrase does not require all of the listed items unless expressly limited to that.
[0065] First embodiment:
[0066] The first embodiment of the present invention provides a resource isolation control method, including: receiving resource access and placement application information and tenant basic information from a tenant, the resource access and placement application information having two types: resource acquisition application information and resource recovery application information; finding the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, and verifying the tenant basic information and the resource access and placement application information; when the verification of the tenant basic information and the resource access and placement application information is passed, calculating the expected resource occupancy according to the resource access and placement application information and the current tenant resource occupancy; according to the type of the resource access and placement application information, combined with the comparison result of the expected resource occupancy and the preset maximum resource occupancy, controlling the resource pool to release or recover the target resource corresponding to the resource access and placement application and feeding an isolation signal.
[0067] This solution, on the one hand, verifies the basic information of the tenant to clarify whether the tenant's identity is the tenant corresponding to the resource pool, thereby preventing other unrelated personnel from connecting to the resource pool and occupying resources, which to a certain extent enhances the security of information in the resource pool. On the other hand, it verifies the rationality of the resource access application information to ensure that the application submitted by the tenant is reasonable, reduce subsequent invalid work, and improve overall operation efficiency.
[0068] And in this case, after both verifications are passed, the estimated resource quantity occupied by the tenant in the resource pool after executing the corresponding operation of the resource access application information is estimated. According to the comparison result of the estimated resource quantity occupied and the maximum resource quantity occupied, combined with the type of the resource access application information, the resource pool is controlled to release or recycle the target resources corresponding to the resource access application and feed an isolation signal. This prevents a single tenant from occupying too many resources in the resource pool and hindering the use of other tenants connected to the same node.
[0069] The following is a detailed description of the implementation details of the resource isolation control method of this embodiment. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The specific process of this embodiment is as follows Figure 1-4 As shown, the following steps are included:
[0070] Step 101: receiving resource access application information and tenant basic information from a tenant, wherein the resource access application information includes resource acquisition application information and resource recovery application information.
[0071] Specifically, the tenant of the cloud service platform uses the client to input resource access application information and tenant basic information to the resource isolation device implementing the resource isolation method of this case through the business thread. Among them, the tenant basic information is the basic information of the tenant who currently submits the application.
[0072] There are two types of resource access application information, namely resource acquisition application information and resource recovery application information. Resource acquisition application information includes resource acquisition signals and resource acquisition instructions, wherein the resource acquisition signal is used to identify the resource acquisition application information, and the resource acquisition instruction is used to lock the target resource in the resource pool of a specific node in the cloud service platform, or to lock the resource occupancy of the resource pool of a node in the cloud service platform.
[0073] The resource acquisition instruction may include the address of the target resource, which is used to lock the target resource in the resource pool of a specific node in the cloud service platform. The resource acquisition instruction may also include the target resource occupancy of the target resource pool, which is used to lock the resource pool of a specific node in the cloud service platform, and the resource acquisition instruction of the resource acquisition application information will cause the resource pool to release the target resource occupancy so that the tenant corresponding to the current tenant basic information can obtain the target resource occupancy released by the resource pool.
[0074] Resource recovery application information includes resource recovery signals and resource recovery instructions, wherein the resource recovery signal is used to identify resource recovery application information, and the resource recovery instruction is used to lock the target resources in the resource pool of a specific node in the cloud service platform, or to lock the resource occupancy of the resource pool of a node in the cloud service platform.
[0075] The resource recycling instruction may include the address of the target resource, which is used to lock the target resource in the resource pool of a specific node in the cloud service platform. The resource recycling instruction may also include the target resource occupancy of the target resource pool, which is used to lock the resource pool of a specific node in the cloud service platform, and the resource recycling instruction of the resource recycling application information will cause the resource pool to recycle the resources of the target resource occupancy, so that all tenants in the permission tenant set corresponding to the node resource pool can obtain the target resource occupancy recycled by the resource pool.
[0076] Step 102, verifying the tenant basic information, finding the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, and verifying the resource access application information.
[0077] Specifically, if Figure 2 As shown, step 102 includes: S2-1, verifying the validity of the tenant basic information; S2-2, finding the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information; S2-3, verifying the validity of the resource access information according to the current tenant resource occupancy.
[0078] In the specific implementation, firstly, step S2-1 is executed to verify whether the tenant basic information can communicate data with the resource pool of the current node. After the verification in step S2-1 is passed, step S2-2 is executed to find the current tenant resource occupancy of the tenant basic information, and then the resource access information is verified to be reasonable according to the current tenant resource occupancy in S2-3.
[0079] In some examples, S2-1, verifying the validity of the tenant basic information includes:
[0080] The validity of the tenant basic information is verified according to the preset permission tenant set; when the tenant basic information belongs to the permission tenant set, the tenant basic information verification passes; when the tenant basic information does not belong to the permission tenant set, the tenant basic information verification fails.
[0081] In specific implementation, the cloud service platform has multiple data interaction storage nodes at runtime, and each node will be authorized to multiple tenants for use. Therefore, S2-1 first verifies whether the tenant basic information is a member of the authorized tenant set of the current node. If so, the tenant basic information and resource access application information are allowed to access the resource pool of the current node; if not, the tenant basic information and resource access application information are not allowed to access the resource pool of the current node. The validity of the tenant basic information is verified through the authorized tenant set, so as to identify whether the current tenant basic information has access rights, reject applications from tenants without permission, and protect the security of data in the data pool.
[0082] In some examples, in S2-3, verifying the resource access application information includes:
[0083] S2-3-1, when the resource access application information is resource recycling application information, determining that the verification of the resource access information is passed;
[0084] S2-3-2, when the resource access and release application information is resource acquisition application information, compare the current resource occupancy with the preset maximum resource occupancy; when the resource occupancy is lower than the preset maximum resource occupancy, determine that the verification of the resource access and release application information is passed; when the resource occupancy is higher than or equal to the preset maximum resource occupancy, determine that the resource access and release application information is not passed.
[0085] This case verifies the types of resource access and release application information separately, taking into full account the difference between new resource occupation and recycled resource occupation. When the current tenant resource occupation allows for new occupation space (i.e., the current tenant resource occupation is less than the maximum resource occupation), new resource occupation is allowed and the resource access and release instructions are determined to be valid. Otherwise, new resource occupation is not allowed and the resource access and release instructions are determined to be invalid. At the same time, resource occupation is allowed to be recycled in any case, that is, all resource recycling application information is determined to be valid.
[0086] In some examples, if S2-1 verifies the tenant's basic information successfully, step S2-2 is executed; if S2-1 fails to verify the tenant's basic information, an identity authentication failure signal is output.
[0087] When the resource access application information is not verified in S2-3, an isolation signal is output to trigger the business thread to execute according to a preset instruction, wherein the preset instruction includes a fuse instruction or a downgrade instruction; if S2-3 is verified, step 103 is executed.
[0088] In this case, the authentication failure signal is used to indicate that the current tenant basic information does not have the authority to use the resource pool of this node. The isolation signal is used to indicate that the current resource access application information is unreasonable, and the resource pool is controlled to refuse to respond to the resource access application information, and at the same time trigger the business line to execute according to the preset instructions, so as to achieve the process fuse or business line downgrade.
[0089] Specifically, the output authentication failure signal is returned to the business thread to prompt the tenant that the authentication has failed. The basic tenant information does not belong to the authorized tenant set of the current node in the cloud service platform, so that the business thread re-sends the tenant information and resource access application information to other nodes of the cloud service platform to call the resource pool. In this way, the case verifies the basic tenant information to clarify whether the tenant identity is the tenant corresponding to the resource pool, thereby preventing other unrelated personnel from connecting to the resource pool and occupying resources, which enhances the security of information in the resource pool to a certain extent.
[0090] The output isolation signal is used to prompt the staff of the business thread that the resource access application information corresponding to the current tenant basic information cannot be executed, that is, the resources in the resource pool of the current node cannot be obtained. At this time, the business thread executes according to the preset instructions, which include fuse instructions or downgrade instructions. The setting of the preset instructions is pre-set by the staff of the business thread. If the fuse instruction is executed, the business thread is fused and no subsequent operations are performed. If the downgrade instruction is executed, the business thread is downgraded (for example, it sleeps for a preset time and then tries again).
[0091] Step 103: Calculate the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy.
[0092] Specifically, this step 103 is executed when the verification of the tenant basic information and the resource access application information in step 102 is passed. The resource estimated occupancy is calculated based on the resource access application information and the current tenant resource occupancy corresponding to the tenant basic information in the resource pool, including:
[0093] S3-1, obtaining a resource increase amount K according to all target resources indicated by the resource access application information;
[0094] S3-2, calculating the sum of the current tenant resource occupancy and the resource increase amount K to obtain the estimated resource occupancy;
[0095] Wherein, when the resource access application information is the resource acquisition application information, the resource increase amount K is a positive value; when the resource access application information is the resource recovery application information, the resource increase amount K is a negative value.
[0096] By adopting the above technical solution, the target resources are locked according to the resource acquisition instructions / resource recovery instructions in the resource access and placement application information, the resource amounts of all target resources are taken as the resource increase amount K, and the expected resource occupancy of the tenant after the corresponding operation of the resource access and placement information is executed is estimated in advance, thereby facilitating the subsequent determination of whether the operation corresponding to the resource access and placement application information can be executed.
[0097] The absolute value of the resource increase amount K is determined by the amount of resources occupied by the target resources, and the positive and negative values of the resource increase amount K are determined by the type of resource access application information. If it is resource acquisition application information, the value of the resource estimated occupancy amount will increase, and the resources occupied by the tenant in the resource pool will further increase. If it is resource recovery application information, the value of the resource estimated occupancy amount will decrease, and the resources occupied by the tenant in the resource pool will decrease.
[0098] Step 104, according to the type of the resource access application information and the comparison result between the estimated resource occupancy and the preset maximum resource occupancy, control the resource pool to release or recycle the target resource corresponding to the resource access application and feed an isolation signal.
[0099] Specifically, the implementation of step 104 includes:
[0100] S4-1, such as Figure 4 As shown, when the resource access application information is resource recovery application information, the resource pool is controlled to recover the target resource corresponding to the resource access application information, and the estimated resource occupancy is updated to the current tenant resource occupancy of the tenant basic information;
[0101] S4-2, such as Figure 3 As shown, when the resource access application information is resource acquisition application information, if the estimated resource occupancy is lower than the maximum resource occupancy, S4-2-1 is executed; if the estimated resource occupancy is greater than or equal to the maximum resource occupancy, S4-2-2 is executed;
[0102] S4-2-1, controlling the resource pool to release the target resource corresponding to the resource access application information, and updating the estimated resource occupancy to the current tenant resource occupancy of the tenant basic information;
[0103] S4-2-2, output an isolation signal to trigger the business thread to execute according to preset instructions, and the preset instructions include fuse instructions or degradation instructions.
[0104] In this case, when the resource access and placement application information is resource recovery application information, the target resource is directly recovered, and the current tenant's resource occupancy is updated to facilitate the subsequent use of other resources in the resource pool of the node by the tenant. When the resource access and placement information is resource acquisition information, the resource pool will be controlled to release the target resource only when the estimated occupancy is lower than the maximum occupancy of the resource, so that the tenant can occupy the target resource, and then the current tenant's resource occupancy is updated to facilitate subsequent operations. When the estimated resource occupancy exceeds the maximum resource occupancy, an isolation signal is output to trigger the business thread to execute according to the preset instructions, and at the same time, the tenant is prompted that the resource acquisition failed and the resource usage currently occupied by the tenant exceeds the limit.
[0105] In other examples, according to the type of the resource access application information, combined with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, the resource pool is controlled to release or recycle the target resource corresponding to the resource access application and feedback the isolation signal, including:
[0106] When the resource access and placement application information is resource acquisition application information, the resource pool is controlled to release the target resource corresponding to the resource access and placement application information, and the estimated resource occupancy is updated to the current tenant resource occupancy of the tenant basic information; when the estimated resource occupancy is greater than or equal to the maximum resource occupancy, an alarm signal is output to trigger the start of the early warning system.
[0107] In this scheme, when the estimated resource occupancy exceeds the maximum resource occupancy, the request for resource acquisition application information is still executed, the target resources corresponding to the resource acquisition and release application are released, and an alarm signal is output at the same time to trigger the start of the early warning system, thereby notifying the on-duty personnel through the early warning system, and the on-duty personnel adjust the resource allocation of the node and each tenant connected to the node according to the specific situation.
[0108] During specific implementation, an error log is generated while outputting an alarm signal. The early warning system usually also counts the number of alarm signals received within a preset period of time for the same tenant's basic information. When the number reaches a preset value, a prompt signal is issued to prompt the on-duty personnel to manually process the business thread (such as adjusting resource allocation, adding or deleting nodes).
[0109] In some examples, the maximum resource occupancy is associated with the tenant basic information.
[0110] By adopting the above technical solution, the maximum resource occupancy used to determine whether the tenant's resource occupancy and the expected resource occupancy exceed the standard corresponds to the tenant's basic information. In other words, this case supports setting different maximum resource occupancy according to different tenants, so as to better fit the tenant's actual operating environment and meet the needs of tailoring different maximum resource occupancy for different tenants.
[0111] The step division of the above-mentioned methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0112] Second implementation method:
[0113] A second embodiment of the present invention provides a resource isolation control device 50, such as Figure 5 As shown, including:
[0114] The information receiving unit 501 is used to receive resource access application information and tenant basic information from a tenant, wherein the resource access application information includes resource acquisition application information and resource recovery application information;
[0115] An information verification unit 502 is used to verify the tenant basic information and resource access application information by finding the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, and output the tenant valid information when the tenant basic information is verified, and output the resource application valid information when the resource access application information is verified;
[0116] The resource prediction unit 503 calculates the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy when receiving the tenant valid information and the resource application valid information;
[0117] A resource control unit 504, configured to control the resource pool to release or recycle the target resource corresponding to the resource access application and to feed an isolation signal according to the type of the resource access application information and the comparison result between the estimated resource occupancy and the preset maximum resource occupancy;
[0118] The signal sending unit 505 is used to output the isolation signal sent by the resource control unit 504.
[0119] When this case is implemented, the resource isolation control device 50 is bound to the cloud service platform to manage the resources in the resource pool of each node in the cloud service platform. This case verifies the basic information of the tenant through the information verification unit 502 to clarify whether the tenant's identity is the tenant corresponding to the resource pool, thereby preventing other unrelated personnel from connecting to the resource pool and occupying resources, which enhances the security of information in the resource pool to a certain extent. At the same time, the information verification unit 502 verifies the rationality of the resource access application information to ensure that the application submitted by the tenant is reasonable, reduce subsequent invalid work, and improve overall operating efficiency.
[0120] In addition, this case will also estimate the estimated resource volume occupied by the tenant in the resource pool after executing the corresponding operation of the resource access and release application information. Based on the comparison result of the estimated resource volume and the maximum resource volume, combined with the type of the resource access and release application information, the resource pool is controlled to release or recycle the target resources corresponding to the resource access and release application and to feed an isolation signal. This prevents a single tenant from occupying too many resources in the resource pool and hindering the use of other tenants connected to the same node.
[0121] Other implementation details and working methods of the resource isolation control device 50 disclosed in the present application are the same as or similar to the resource isolation control method described above and will not be repeated here.
[0122] Third embodiment:
[0123] A third embodiment of the present invention provides a storage medium, which stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement any one of the resource isolation control methods described above.
[0124] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A resource isolation control method, characterized in that: include: Receive resource access application information and tenant basic information from the tenant, wherein the resource access application information includes resource acquisition application information and resource recovery application information; Verify the validity of the tenant basic information, find the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, and verify the validity of the resource access application information; When the verification of the tenant basic information and the resource access application information is passed, the estimated resource occupancy is calculated according to the resource access application information and the current tenant resource occupancy; According to the type of the resource access application information, combined with the comparison result of the estimated resource occupancy and the maximum resource occupancy, the resource pool is controlled to release or recycle the target resource corresponding to the resource access application and to feed an isolation signal; the maximum resource occupancy is associated with the tenant basic information; The calculating the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy corresponding to the tenant basic information in the resource pool includes: Determining the resource increase amount according to all target resources indicated by the resource access application information; Calculate the sum of the current tenant resource occupancy and the resource increase to obtain the estimated resource occupancy; Wherein, when the resource access application information is the resource acquisition application information, the resource increase amount is a positive value; when the resource access application information is the resource recovery application information, the resource increase amount is a negative value; According to the type of the resource access application information, combined with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, the resource pool is controlled to release or recycle the target resource corresponding to the resource access application and feedback an isolation signal, including: When the resource access application information is resource recovery application information, controlling the resource pool to recover the target resource corresponding to the resource access application information, and updating the estimated resource occupancy to the current tenant resource occupancy of the tenant basic information; The resource acquisition application information includes a resource acquisition signal and a resource acquisition instruction. The resource acquisition signal is used to identify the resource acquisition application information. The resource acquisition instruction is used to lock the target resource in the resource pool of a specific node in the cloud service platform, or to lock the resource occupancy of the resource pool of a node in the cloud service platform. The resource acquisition instruction includes the address of the target resource, and the address of the target resource is used to lock the target resource in the resource pool of a specific node in the cloud service platform; the resource acquisition instruction also includes the target resource occupancy of the target resource pool, which is used to lock the resource pool of a specific node in the cloud service platform, and the resource acquisition instruction of the resource acquisition application information will cause the resource pool to release the resources of the target resource occupancy, so that the tenant corresponding to the current tenant basic information can obtain the target resource occupancy released by the resource pool; The resource recycling application information includes a resource recycling signal and a resource recycling instruction; the resource recycling signal is used to identify the resource recycling application information, and the resource recycling instruction is used to lock the target resource in the resource pool of a specific node in the cloud service platform, or to lock the resource occupancy of the resource pool of a node in the cloud service platform; The resource recovery instruction includes the address of the target resource, which is used to lock the target resource in the resource pool of a specific node in the cloud service platform; the resource recovery instruction also includes the target resource occupancy of the target resource pool, which is used to lock the resource pool of a specific node in the cloud service platform, and the resource recovery instruction of the resource recovery application information will enable the resource pool to recover the resources of the target resource occupancy, so that all tenants in the permission tenant set corresponding to the node resource pool can obtain the target resource occupancy recovered by the resource pool.
2. The resource isolation control method according to claim 1, characterized in that: The verifying the validity of the tenant basic information includes: The validity of the tenant basic information is verified according to the preset permission tenant set; when the tenant basic information belongs to the permission tenant set, the tenant basic information verification passes; when the tenant basic information does not belong to the permission tenant set, the tenant basic information verification fails.
3. The resource isolation control method according to claim 1, characterized in that: Verify the validity of the resource access application information, including: When the resource access application information is resource recycling application information, determining that the verification of the resource access information is passed; When the resource access application information is resource acquisition application information, comparing the current tenant resource occupancy with a preset maximum resource occupancy; When the current tenant resource occupancy is lower than the preset maximum resource occupancy, the verification of the resource access application information is passed; when the current tenant resource occupancy is higher than or equal to the preset maximum resource occupancy, the verification of the resource access application information is failed.
4. The resource isolation control method according to claim 2, characterized in that: The method further comprises: When the verification of the tenant basic information fails, an identity authentication failure signal is output to prompt the tenant that the identity authentication fails; when the verification of the resource access application information fails, an isolation signal is output to trigger the business thread to execute according to the preset instructions, and the preset instructions include a fuse instruction or a downgrade instruction.
5. The resource isolation control method according to claim 1, characterized in that: According to the type of the resource access application information, combined with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, the resource pool is controlled to release or recycle the target resource corresponding to the resource access application and feedback an isolation signal, including: When the resource access application information is resource acquisition application information, When the estimated resource occupancy is lower than the maximum resource occupancy, control the resource pool to release the target resource corresponding to the resource access application information, and update the estimated resource occupancy to the current tenant resource occupancy of the tenant basic information; When the estimated resource occupancy is greater than or equal to the maximum resource occupancy, an isolation signal is output to trigger the service thread to execute according to a preset instruction, where the preset instruction includes a fuse instruction or a degradation instruction.
6. The resource isolation control method according to claim 1, characterized in that: According to the type of the resource access application information, combined with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, the resource pool is controlled to release or recycle the target resource corresponding to the resource access application and feedback an isolation signal, including: When the resource access application information is resource acquisition application information, controlling the resource pool to release the target resource corresponding to the resource access application information, and updating the estimated resource occupancy to the current tenant resource occupancy of the tenant basic information; When the estimated resource occupancy is greater than or equal to the maximum resource occupancy, an alarm signal is output to trigger the start of the early warning system.
7. A resource isolation control device, characterized in that: The control device comprises: An information receiving unit, used to receive resource access application information and tenant basic information from a tenant, wherein the resource access application information includes resource acquisition application information and resource recovery application information; The resource acquisition application information includes a resource acquisition signal and a resource acquisition instruction. The resource acquisition signal is used to identify the resource acquisition application information. The resource acquisition instruction is used to lock the target resource in the resource pool of a specific node in the cloud service platform, or to lock the resource occupancy of the resource pool of a node in the cloud service platform. The resource acquisition instruction includes the address of the target resource, and the address of the target resource is used to lock the target resource in the resource pool of a specific node in the cloud service platform; the resource acquisition instruction also includes the target resource occupancy of the target resource pool, which is used to lock the resource pool of a specific node in the cloud service platform, and the resource acquisition instruction of the resource acquisition application information will cause the resource pool to release the resources of the target resource occupancy, so that the tenant corresponding to the current tenant basic information can obtain the target resource occupancy released by the resource pool; The resource recycling application information includes a resource recycling signal and a resource recycling instruction; the resource recycling signal is used to identify the resource recycling application information, and the resource recycling instruction is used to lock the target resource in the resource pool of a specific node in the cloud service platform, or to lock the resource occupancy of the resource pool of a node in the cloud service platform; The resource recycling instruction includes the address of the target resource, which is used to lock the target resource in the resource pool of a specific node in the cloud service platform; the resource recycling instruction also includes the target resource occupancy of the target resource pool, which is used to lock the resource pool of a specific node in the cloud service platform, and the resource recycling instruction of the resource recycling application information will cause the resource pool to recycle the resources of the target resource occupancy, so that all tenants in the permission tenant set corresponding to the resource pool of the node can obtain the target resource occupancy recycled by the resource pool; An information verification unit, used to find the current tenant resource occupancy corresponding to the resource pool according to the tenant basic information, verify the tenant basic information and resource access application information, and output the tenant valid information when the tenant basic information is verified, and output the resource application valid information when the resource access application information is verified; The resource prediction unit, upon receiving the tenant valid information and the resource application valid information, calculates the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy; The calculating the estimated resource occupancy according to the resource access application information and the current tenant resource occupancy corresponding to the tenant basic information in the resource pool includes: Determining the resource increase amount according to all target resources indicated by the resource access application information; Calculate the sum of the current tenant resource occupancy and the resource increase to obtain the estimated resource occupancy; Wherein, when the resource access application information is the resource acquisition application information, the resource increase amount is a positive value; when the resource access application information is the resource recovery application information, the resource increase amount is a negative value; According to the type of the resource access application information, combined with the comparison result of the estimated resource occupancy and the preset maximum resource occupancy, the resource pool is controlled to release or recycle the target resource corresponding to the resource access application and feedback an isolation signal, including: When the resource access application information is resource recovery application information, controlling the resource pool to recover the target resource corresponding to the resource access application information, and updating the estimated resource occupancy to the current tenant resource occupancy of the tenant basic information; A resource control unit is used to control the resource pool to release or recycle the target resource corresponding to the resource access application and to feed an isolation signal according to the type of the resource access application information and the comparison result between the estimated resource occupancy and the preset maximum resource occupancy.
8. A storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the resource isolation control method as described in any one of claims 1-6.
Citation Information
Patent Citations
Kubernetes cluster resource management method and system based on multiple tenants
CN116488836A