Cloud disk creation request scheduling method and device, electronic equipment and storage medium
By dynamically scheduling cloud disk creation requests based on the cluster's real-time processing capabilities and disk creation type in a distributed storage system, the problems of read/write lag and creation failure caused by uneven cluster load are solved, resulting in a higher cloud disk creation success rate and system performance.
Patent Information
- Application Number
- CN202311026958.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-08-15
AI Technical Summary
In existing technologies, distributed storage systems fail to effectively consider the actual processing capacity of the cluster during the cloud disk creation process, resulting in problems such as read/write operation lag and cloud disk creation failure.
By determining the disk creation rejection level based on the cluster's real-time data link QPS capability and snapshot loading capability, and combining the cluster blacklist and disk creation type, cloud disk creation requests are dynamically scheduled to avoid excessive cluster load and improve the success rate of cloud disk creation.
It improved cluster performance, avoided read/write operation lag, increased the success rate of cloud disk creation, and ensured that more users could access cloud disk services.
Smart Images

Figure CN119520626B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cloud storage, and particularly relates to a cloud disk creation request scheduling method and device, electronic equipment and a storage medium. BACKGROUND
[0002] With the development of cloud computing technology and the explosive growth of data, cloud computing has penetrated into various industries, and storage services are ubiquitous. A large number of services run in cloud servers, and a large number of storage services are also used. Block storage is a low-latency, persistent, and highly reliable block-level random storage provided for cloud servers, and is the most widely used storage service. In order to obtain the services provided by the block storage, a user needs to send a block device creation request to a distributed storage system, so that a cluster in the distributed storage system creates a required block device for the user. However, the number of clusters included in the distributed storage system is large, and how to schedule the cloud disk creation request sent by the user to a suitable cluster becomes a problem that technicians in the field are concerned about.
[0003] In the related art, based on the devices included in each cluster in the distributed storage system, the theoretical processing capacity of each cluster is calculated, and then the allocation ratio of the cloud disk creation request on multiple clusters is determined according to the theoretical processing capacity of each cluster. When a cloud disk creation request is received, the target cluster is determined according to the determined allocation ratio and the number of allocated cloud disk creation requests of each cluster, and then the cloud disk creation request is sent to the target cluster to complete the creation of the cloud disk. For example, the distributed storage system includes two clusters, cluster A and cluster B. Cluster A includes 10 devices, and cluster B includes 5 devices. The allocation ratio of the cloud disk creation request on cluster A and cluster B can be determined as 2:1. According to this allocation ratio, when a cloud disk creation request is received, the cloud disk creation request is allocated to cluster A. When another cloud disk creation request is received, it is also allocated to cluster A. When another cloud disk creation request is received, it is allocated to cluster B.
[0004] However, when a certain cluster cannot perform a cloud disk creation operation due to a large read-write operation load rate, the related art will still allocate the cloud disk creation request to the cluster, which leads to poor performance of the cluster and may cause problems such as read-write operation lag, and even cloud disk creation failure. SUMMARY
[0005] The embodiments of the present application provide a cloud disk creation request scheduling method and device, electronic equipment and a storage medium, which can improve the performance of the cluster in the distributed storage system, avoid problems such as read-write operation lag in the cloud disk creation process, and improve the cloud disk creation success rate. The technical solution is as follows:
[0006] In a first aspect, a cloud disk creation request scheduling method is provided. The method is applied to a distributed storage system including a plurality of clusters. The method includes:
[0007] In response to a target cloud disk creation request of a user account, a target disk creation type to which the target cloud disk creation request belongs is determined based on historical disk creation records of the user account. Different disk creation types have different disk creation rejection water levels. The disk creation rejection water level is a maximum water level when a cluster performs a cloud disk creation operation. The water level is used to represent a load rate of the cluster. The water level is determined according to real-time data link QPS (Queries Per Second) capability and snapshot loading capability of the cluster.
[0008] Based on a target disk creation rejection water level corresponding to the target disk creation type, current water levels of the plurality of clusters, and a cluster blacklist, a plurality of candidate clusters are obtained from the plurality of clusters. The cluster blacklist is used to store identifiers of clusters that fail to create disks because actual water levels are higher than disk creation rejection water levels corresponding to allocated cloud disk creation requests.
[0009] A target cluster is determined from the plurality of candidate clusters according to a cluster allocation manner corresponding to the target disk creation type.
[0010] The target cloud disk creation request is sent to the target cluster, so that the target cluster creates a cloud disk for the user account according to a capacity applied for by the target cloud disk creation request.
[0011] In a second aspect, a cloud disk creation request scheduling apparatus is provided. The apparatus is applied to a distributed storage system including a plurality of clusters. The apparatus includes:
[0012] A first determination module is configured to, in response to a target cloud disk creation request of a user account, determine a target disk creation type to which the target cloud disk creation request belongs based on historical disk creation records of the user account. Different disk creation types have different disk creation rejection water levels. The disk creation rejection water level is a maximum water level when a cluster performs a cloud disk creation operation. The water level is used to represent a load rate of the cluster. The water level is determined according to real-time data link QPS capability and snapshot loading capability of the cluster.
[0013] An obtaining module is configured to, based on a target disk creation rejection water level corresponding to the target disk creation type, current water levels of the plurality of clusters, and a cluster blacklist, obtain a plurality of candidate clusters from the plurality of clusters. The cluster blacklist is used to store identifiers of clusters that fail to create disks because actual water levels are higher than disk creation rejection water levels corresponding to allocated cloud disk creation requests.
[0014] A second determination module is configured to determine a target cluster from the plurality of candidate clusters according to a cluster allocation manner corresponding to the target disk creation type.
[0015] The sending module is configured to send the target cloud disk creation request to the target cluster, so that the target cluster creates a cloud disk for the user account according to the capacity applied for in the target cloud disk creation request.
[0016] In a third aspect, an electronic device is provided, including a processor and a memory; the memory stores at least one program code; the at least one program code is used to be called and executed by the processor to implement the cloud disk creation request scheduling method according to the first aspect.
[0017] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores at least one computer program; the at least one computer program is executed by a processor to implement the cloud disk creation request scheduling method according to the first aspect.
[0018] In a fifth aspect, a computer program product is provided, and the computer program product includes a computer program; the computer program is executed by a processor to implement the cloud disk creation request scheduling method according to the first aspect.
[0019] The technical scheme provided by the embodiments of the present application has the beneficial effects that:
[0020] For each cluster in the distributed storage system, the real-time data link QPS capability and snapshot loading capability of the cluster affect the read and write operations of the cluster. If the load rate of the cluster is not controlled based on the real-time data link QPS capability and snapshot loading capability of the cluster, the read and write operations of the cluster will be affected, and problems such as read and write jamming will occur. In addition, a user account can create a batch of cloud disks in the distributed storage system, and can also create a regular cloud disk. For batch cloud disk creation, because the user account sends a large number of cloud disk creation requests in a short time, based on these cloud disk creation requests, the distributed storage system has created a large number of cloud disks for the user account. In the case that the available resources of the cluster are small, by reducing the processing of this type of cloud disk creation request, the available resources are used for regular cloud disk creation, so that more users can obtain the services provided by the cloud disk on the distributed storage system. The water level is used to describe the current load rate of the cluster. Because the processing capability of the cluster is limited, the higher the current water level of the cluster, the fewer the available resources of the cluster for creating cloud disks. To ensure the performance of the cluster, different cloud disk creation types are set with different cloud disk rejection water levels. The cloud disk rejection water level is the highest water level at which the cluster can execute the cloud disk creation operation based on the cloud disk creation request of this type, that is, the current maximum load of the cluster. By adopting different processing modes for cloud disk creation requests corresponding to different cloud disk creation types, the cloud disk success rate of the cluster is improved while ensuring the performance of the cluster. In addition, considering that there is a time difference between the communication between the underlying cluster of the distributed storage system and the upper control device, for clusters that fail to create cloud disks due to the difference between the actual water level and the reported water level during the cloud disk creation process, to avoid this problem occurring again in the subsequent cloud disk creation process and improve the success rate of cloud disk creation, the cluster identifiers of these clusters are stored in the cluster blacklist. Based on the above, after receiving the cloud disk creation request sent by the user account, the cloud disk creation request is no longer scheduled among the clusters in the current distributed storage system based on a fixed rule, but is scheduled in combination with the current water level of each underlying cluster in the distributed storage system, the target cloud disk creation type to which the cloud disk creation request belongs, and the cluster blacklist. Because the actual processing capability of the underlying layer and the resource demand of different cloud disk creation types are taken into account, the load rate of the scheduled cluster is not too high, the performance of the cluster is improved, the read and write of the cluster are prevented from jamming, and the success rate of cloud disk creation is improved. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0022] Figure 1 is an architecture diagram of a distributed storage system provided by an embodiment of the present application;
[0023] Figure 2 is a flowchart of a cloud disk creation request scheduling method provided by an embodiment of the present application;
[0024] Figure 3 is a schematic diagram of determining a cloud disk creation request belonging to a type of cloud disk creation based on a preset time window provided by an embodiment of the present application;
[0025] Figure 4 is a schematic diagram of water levels corresponding to different types of cloud disk creation provided by an embodiment of the present application;
[0026] Figure 5 is a backoff mechanism of a cloud disk creation request provided by an embodiment of the present application;
[0027] Figure 6 is a flowchart of cluster reselection provided by an embodiment of the present application;
[0028] Figure 7 is a flowchart of another cloud disk creation request scheduling method provided by an embodiment of the present application;
[0029] Figure 8 is a structure schematic diagram of a cloud disk creation request scheduling device provided by an embodiment of the present application;
[0030] Figure 9 shows a structure block diagram of an electronic device provided by an example embodiment of the present application. DETAILED DESCRIPTION
[0031] To make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0032] It can be understood that the terms "each", "multiple" and "any" used in the embodiments of the present application include two or more, each refers to each of the corresponding multiple, and any refers to any one of the corresponding multiple. For example, multiple words include 10 words, and each word refers to each of the 10 words, and any word refers to any one of the 10 words.
[0033] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal. For example, the cloud disk creation request, history disk creation record and the like involved in the present application are obtained under sufficient authorization.
[0034] Cloud storage is a new concept extended and developed on the basis of the concept of cloud computing. A distributed cloud storage system refers to a storage system in which a large number of storage devices (storage nodes) of various types are collected and cooperatively work together to provide data storage and access functions through the application of cluster application, grid technology and distributed storage file system. Cloud storage is mainly for cloud customers running on cloud provider hardware. These functions can meet various different needs and support pay-per-use. In the cloud storage mode, the provider is responsible for maintaining the underlying hardware and ensuring data availability, elasticity and security. Common cloud storage types include object storage, block storage and file storage, and the present application is applied to the block storage scenario.
[0035] As the distributed storage environment becomes more and more complex, the number and types of components in the system are increasing, and the uncontrollable factors in the entire link are becoming more and more. In the distributed storage scenario, the upper control flow and the lower data flow influence each other. The upper scheduling device schedules the received request to the lower cluster for processing, thereby affecting the load rate of the lower cluster. The load rate of the lower cluster also affects the scheduling of the lower cluster by the upper scheduling device. The existing distributed storage system does not consider the actual processing capacity of the lower cluster, but schedules the received request according to the theoretical processing capacity of the cluster. This scheduling method reduces the performance of each cluster in the distributed storage system, especially in the large batch cloud disk creation scenario, read and write operations may appear lagging and other problems, and even cause cloud disk creation failure.
[0036] The embodiment of the present application provides a cloud disk creation request scheduling method, which reports the capability of an underlying cluster to an upper-layer scheduling device, and the upper-layer scheduling device selects a suitable cluster to create a cloud disk according to the capability of the underlying cluster, realizes decoupling of data flow and control flow, and improves the performance of the underlying cluster. In order to realize complete separation of data flow and control flow, the embodiment of the present application also takes a plurality of measures. On the one hand, according to the cloud disk creation requests sent by a user account within a preset time length, the cloud disk creation requests sent by the user account are divided into different disk creation types, which are batch disk creation (Burst disk creation) and normal disk creation (Normal disk creation), and different water level flow control scheduling mechanisms are used for different disk creation types. For the cloud disk creation requests belonging to batch disk creation, a relatively low water level is set for this disk creation type, so that in the case that the available resources of the cluster are less, the corresponding user account intensive disk creation is prevented, which leads to the unavailability of the cluster and affects all users; for the cloud disk creation requests belonging to normal disk creation, a relatively high water level is set for this disk creation type, so that in the case that the available resources of the cluster are less, the disk creation can still be performed, thereby providing disk creation service for sporadic disk creation user accounts. On the other hand, when the capability of a single cluster suddenly reaches the upper limit, the received cloud disk creation requests can be scheduled to other clusters, thereby improving the performance of the cluster and improving the success rate of cloud disk creation. On the other hand, when a single cluster currently processes a large number of requests, the control flow of the single cluster is flow controlled and backed off based on the Qos mechanism, so as to avoid that the load rate of the cluster is too large at a certain time.
[0037] Please refer to Figure 1 which shows an architecture diagram of a distributed storage system related to the embodiment of the present application, referring to Figure 1 The distributed storage system includes a scheduling device at an upper layer and a cluster at a lower layer. The scheduling device is used for scheduling the cloud disk creation requests received by the distributed storage system. The scheduling device includes a cloud server object, a plurality of storage area level control components, a plurality of storage available zone level control components, and a plurality of storage cluster level control components. The functions of the cloud server object, the plurality of storage area level control components, the plurality of storage available zone level control components, and the plurality of storage cluster level control components are described in detail below.
[0038] The cloud server object is connected with a plurality of storage area level management components, and is configured to select a target storage area level management component from the plurality of storage area level management components when receiving a cloud disk creation request of a user account, and send the received cloud disk creation request to the target storage area level management component. The cloud server object is also configured to receive a cloud disk creation result message sent by the lower-level storage area level management component. If the cloud disk creation result message is a cloud disk creation success message, or the cloud disk creation result message is a cloud disk creation failure message and the failure reason is cluster water level, the cloud disk creation process for the cloud disk creation request ends. If the cloud disk creation result message is a cloud disk creation failure message and the failure reason is cluster water level, the cloud server object is configured to perform an operation of selecting a new cluster for the cloud disk creation request.
[0039] The storage area level management component (Ocean) is connected with a plurality of storage availability zone level management components, and is configured to select a target storage availability zone level management component from the plurality of storage availability zone level management components, and send a received cloud disk creation request to the target storage availability zone level management component. The storage area level management component is also configured to receive a cloud disk creation result message sent by the connected storage availability zone level management component, and send the cloud disk creation result message to an upper-layer cloud server object. If the cloud disk creation result message is a cloud disk creation failure message, the storage area level management component is configured to perform error code mapping on the cloud disk creation failure message to obtain a message recognizable by the cloud server object, and then send the cloud disk creation failure message after the error code mapping to the cloud server object. In this way, when the cloud disk creation fails because the current actual water level of the cluster is higher than the disk creation rejection water level of the cloud disk creation request, the cloud server object can perform a cluster reselection operation.
[0040] The storage availability zone level management component (RiverMaster) is connected with a plurality of storage cluster level management components, used to receive the current actual water level of each cluster in the availability zone reported by each connected storage cluster level management component, and based on the current actual water level of each cluster, the cluster blacklist, and the cloud disk creation request corresponding to the cloud disk creation type, select a plurality of candidate clusters, and then based on the cluster allocation mode corresponding to the cloud disk creation type of the cloud disk creation request, select a target cluster from the plurality of candidate clusters. The storage availability zone level management component is also used to judge whether the target cluster meets the receiving conditions of the cloud disk creation request based on the number of cloud disk creation requests currently processed by the target cluster and the total capacity of the cloud disk applied for, and when the target cluster meets the receiving conditions, send the cloud disk creation request to the storage cluster level management component connected with the target cluster. The storage availability zone level management component is also used to receive the cloud disk creation result message sent by the storage cluster level management component, and send the received cloud disk creation result message to the storage area level management component connected therewith, and send the cloud disk creation result message to the cloud server object by the storage area level management component. If the received cloud disk creation result message is a cloud disk creation failure message, and the failure reason is that the current actual water level of the cluster is higher than the cloud disk creation rejection water level corresponding to the cloud disk creation request, the identifier of the cluster is added to the cluster blacklist, and the current water level of the cluster stored is updated. In order to facilitate the management of the functions of the storage availability zone level management component, the storage availability zone level management component is divided into a plurality of functional modules in the embodiments of the present application, including a scheduler, a flow control unit, etc. The scheduler is mainly responsible for determining the candidate cluster and the target cluster, and the flow control unit is mainly responsible for detecting whether the target cluster meets the receiving conditions, and performing a backoff operation when the target cluster does not meet the receiving conditions.
[0041] The storage cluster level management component (BlockMaster) is connected with a single cluster, used to calculate the current water level of the connected cluster, and when the current water level of the connected cluster reaches 100%, reject the cloud disk creation request. In addition, it can also be used to report the current water level of the connected cluster to the upper-layer storage availability zone level management component, and send the received cloud disk creation request to the target cluster determined by the upper-layer storage availability zone level management component. The storage cluster level management component is also used to receive the cloud disk creation result message sent by the target cluster, and send the cloud disk creation result message to the upper-layer storage availability zone level management component.
[0042] Each cluster includes a plurality of devices, used to receive the cloud disk creation request sent by the connected storage cluster level management component, and create a cloud disk according to the capacity applied for by the received cloud disk creation request, and also used to generate a cloud disk creation result message and send the cloud disk creation result message to the upper-layer storage cluster level management component.
[0043] The embodiment of the present application provides a cloud disk creation request scheduling method Figure 1 The scheduling device shown in the embodiment of the present application is taken as an example, and the method provided by the embodiment of the present application comprises the following steps. Figure 2 The method provided by the embodiment of the present application comprises the following steps.
[0044] 201、In response to a target cloud disk creation request of a user account, based on historical disk creation records of the user account, a target disk creation type to which the target cloud disk creation request belongs is determined.
[0045] The user account is an account registered by a user in an application program capable of providing a cloud disk service. When the user account needs to obtain a service provided by the cloud disk, the user account can send a target cloud disk creation request to a distributed storage system. After a cloud server object in the distributed storage system receives the target cloud disk creation request, the target cloud disk creation request is sent to a storage area level management component, and the storage area level management component sends the target cloud disk creation request to a storage availability zone level management component. After the storage area level management component receives the target cloud disk creation request, the target cloud disk creation request is preprocessed, and then sent to a scheduler, and the scheduler selects a target cluster for the target cloud disk creation request. The preprocessing mainly comprises verifying the legality of the target cloud disk creation request, thereby improving the security and reliability of the created cloud disk.
[0046] In the embodiment of the present application, when the scheduler selects a target cluster for the target cloud disk creation request, first, based on the historical disk creation records of the user account, a target disk creation type to which the target cloud disk creation request belongs is determined. The disk creation type comprises a batch disk creation and a normal disk creation. The batch disk creation is also called a Burst disk creation, and is a dense disk creation type. The user account with a large demand for the number of cloud disks usually continuously sends a plurality of cloud disk creation requests, and the total capacity of the cloud disks applied to be created is large. The normal disk creation is also called a Normal disk creation, and is a sporadic disk creation type. The user account with a small demand for the number of cloud disks sends a small number of cloud disk creation requests, and the total capacity of the cloud disks applied to be created is not large. Specifically, when the target disk creation type to which the target cloud disk creation request sent by the user account belongs is determined based on the historical disk creation records of the user account, the following method can be used:
[0047] 2011、Based on the historical disk creation records, the number of cloud disk creation requests sent by the user account within a preset time window and the capacity of the cloud disks applied to be created are counted respectively, to obtain a first total number and a first total capacity.
[0048] The length of the preset time window can be 60S (seconds), 70S, etc. The preset time window is a sliding window, and the step length of each sliding is a preset step length, for example, 10S, 20S, etc. Figure 3A preset time window is shown, see Figure 3 The preset time window has a duration of 60S.
[0049] In the embodiment of the application, the scheduler stores historical cloud disk creation records of a plurality of user accounts. When receiving a target cloud disk creation request of a user account, the historical cloud disk creation record of the user account is obtained from the stored historical cloud disk creation records of the plurality of user accounts based on the user account. The historical cloud disk creation record whose receiving time is before the current time and is within the preset time window is obtained from the historical cloud disk creation record of the user account based on the current time and the duration of the preset time window. Then, the first total number is obtained by counting the number of cloud disk creation requests corresponding to the historical cloud disk creation records, and the first total capacity is obtained by counting the capacity of the cloud disk applied for by the cloud disk creation requests corresponding to the historical cloud disk creation records.
[0050] 2012, when the first total number is greater than or equal to the first preset number, or the first total capacity is greater than or equal to the first preset capacity, it is determined that the target cloud disk creation type is batch cloud disk creation.
[0051] The first preset number is configured according to the experience value of the technical personnel, and can be 50, 60, etc. The first preset capacity is configured according to the experience value of the technical personnel, and can be 1T, 2T, etc. When the first total number and the first total capacity are obtained, the first total number is compared with the first preset number, and the first total capacity is compared with the first preset capacity. When the first total number is greater than or equal to the first preset number, or the first total capacity is greater than or equal to the first preset capacity, it is determined that the target cloud disk creation type is batch cloud disk creation.
[0052] 2013, when the first total number is less than the first preset number, and the first total capacity is less than the first preset capacity, it is determined that the target cloud disk creation type is regular cloud disk creation.
[0053] 202, based on the target cloud disk rejection water level corresponding to the target cloud disk creation type, the current water level of the plurality of clusters and the cluster black list, a plurality of candidate clusters are obtained from the plurality of clusters.
[0054] For each cluster in the distributed storage system, the current processing capacity of each cluster mainly depends on the current load rate of the cluster, which refers to the load condition of the cluster. The greater the load rate of the cluster, the smaller the current processing capacity of the cluster; the smaller the load rate of the cluster, the greater the current processing capacity of the cluster. If the load rate is expressed in percentage, 0 represents no load, and 100 represents reaching the maximum load upper limit of the cluster. In order to more intuitively show the current processing capacity of the cluster, the embodiment of the present application uses water level to represent the load rate of the cluster. The water level can be determined according to the real-time data link QPS processing capacity and snapshot loading capacity of the cluster. Specifically, different weight values can be set for the data link QPS processing capacity and snapshot loading capacity of the cluster, and different capacity values can be set for the maximum data link QPS processing capacity and maximum snapshot loading capacity of the cluster. Then, the real-time data link QPS processing capacity value and snapshot loading capacity value of the cluster are weighted and calculated to obtain the current water level of the cluster. In order to facilitate subsequent calculation, the current water level of all clusters can be normalized to 0-100. When the current water level of the cluster is 0, the load of the cluster is small, and a cloud disk can be created. When the current water level of the cluster is 100, the load of the cluster is large, and a cloud disk cannot be created.
[0055] It should be noted that the current water level of each cluster is not fixed and changes with the operation performed. The real-time data link QPS processing capacity and snapshot loading capacity of the cluster change accordingly, and the current water level of the cluster also changes accordingly.
[0056] The disk creation rejection water level is the maximum water level when the cluster performs the cloud disk creation operation. When the current water level of any cluster exceeds the disk creation rejection water level corresponding to the cloud disk creation request, the cluster cannot process the cloud disk creation request. In order to enable more users to obtain cloud disk services and avoid the same user occupying a large amount of resources, resulting in the failure to successfully create a cloud disk for other users, the embodiment of the present application sets different disk creation rejection water levels for different disk creation types. The disk creation rejection water level set for the batch disk creation type is lower than the disk creation rejection water level set for the regular disk creation type. Figure 4The cloud disk rejection water levels set for different creative disk types are shown, where the cloud disk rejection water level set for the batch creative disk type is 80% of the cluster maximum water level, and the cloud disk rejection water level set for the regular creative disk type is 100% of the cluster maximum water level. When the current water level of the cluster is 70% of the cluster maximum water level, which is lower than the cloud disk rejection water level corresponding to the batch creative disk type and the cloud disk rejection water level corresponding to the regular creative disk type, cloud disk creation requests belonging to the batch creative disk type and cloud disk creation requests belonging to the regular creative disk type can be processed; when the current water level of the cluster is 90% of the cluster maximum water level, which is higher than the cloud disk rejection water level corresponding to the batch creative disk type and lower than the cloud disk rejection water level corresponding to the regular creative disk type, cloud disk creation requests belonging to the regular creative disk type can be processed, and cloud disk creation requests belonging to the batch creative disk type cannot be processed; when the current water level of the cluster is 100% of the cluster maximum water level, which is higher than the cloud disk rejection water level corresponding to the batch creative disk type and the cloud disk rejection water level corresponding to the regular creative disk type, cloud disk creation requests belonging to the batch creative disk type and cloud disk creation requests belonging to the regular creative disk type cannot be processed.
[0057] Considering that there is a certain communication time difference when the lower-level storage cluster level management component in the distributed storage system communicates with the upper-level storage availability zone level management component, the current water level of the cluster stored by the storage availability zone level management component and the actual water level of the cluster may have a certain deviation. When the storage availability zone level management component selects a cluster to process a cloud disk creation request according to the stored current water level of the cluster, and the actual water level of the cluster is greater than the creative disk rejection water level corresponding to the cloud disk creation request to be processed, the cluster cannot successfully create a cloud disk. Therefore, an embodiment of the present application maintains a cluster blacklist, which is used to store the identifiers of clusters that have failed to create a cloud disk because the actual water level is higher than the creative disk rejection water level corresponding to the allocated cloud disk creation request. In subsequent target cluster selection, the selected cluster is filtered through the cluster blacklist, thereby improving the success rate of subsequent cloud disk creation.
[0058] In an embodiment of the present application, when a plurality of candidate clusters are obtained from a plurality of clusters based on the target creative disk rejection water level corresponding to the target creative disk type, the current water levels of the plurality of clusters, and the cluster blacklist, the clusters with current water levels less than the target creative disk rejection water level can be obtained from the plurality of clusters based on the current water levels of the plurality of clusters and the target creative disk rejection water level, and then the clusters with current water levels less than the target creative disk rejection water level are filtered based on the cluster blacklist to obtain the plurality of candidate clusters.
[0059] For example, the distributed storage system includes five clusters, namely cluster 1, cluster 2, cluster 3, cluster 4, and cluster 5. The current water level of cluster 1 is 50% of the maximum water level, the current water level of cluster 2 is 70% of the maximum water level, the current water level of cluster 3 is 85% of the maximum water level, the current water level of cluster 4 is 90% of the maximum water level, and the current water level of cluster 5 is 40% of the maximum water level. If the target disk creation type to which the received cloud disk creation request belongs is batch disk creation, and the disk creation rejection water level corresponding to the batch disk creation is 80% of the maximum water level, based on the current water levels of the five clusters and the target disk creation rejection water level, the cluster whose current water level is less than the target disk creation rejection water level is obtained from the five clusters, which are cluster 1, cluster 2, and cluster 5. If the identifier of cluster 5 is in the cluster blacklist, cluster 5 is filtered out, and cluster 1 and cluster 2 are used as candidate clusters.
[0060] 203. According to the cluster allocation mode corresponding to the target disk creation type, the target cluster is determined from the plurality of candidate clusters.
[0061] Embodiments of the present application set different cluster allocation modes for different disk creation types. When a plurality of candidate clusters are obtained, the target cluster is determined from the plurality of candidate clusters according to the cluster allocation mode corresponding to the target disk creation type, including but not limited to the following two modes:
[0062] The first mode is that the target disk creation type is batch disk creation
[0063] The cluster allocation mode corresponding to the batch disk creation is to allocate according to a preset allocation ratio, and the preset allocation ratio is determined according to the processing capacity of each cluster. When the target disk creation type is batch disk creation, the target cluster is determined from the plurality of candidate clusters, including: obtaining the total number of cloud disk creation requests already allocated to each cluster, and then determining the candidate cluster that meets the preset allocation ratio from the plurality of candidate clusters as the target cluster based on the total number of cloud disk creation requests already allocated to each cluster.
[0064] For example, cluster A includes 10 devices, cluster B includes 5 devices, and each device included in cluster A and cluster B is the same. The allocation ratio of cluster A and cluster B is 2:1. When cluster A and cluster B are candidate clusters, if the number of cloud disk creation requests already allocated to cluster A is 1, which does not reach the preset allocation ratio, cluster A is used as the target cluster; if the number of cloud disk creation requests already allocated to cluster A is 2, which reaches the preset allocation ratio, cluster B is used as the target cluster.
[0065] The second mode is that the target disk creation type is regular disk creation
[0066] The cluster allocation mode corresponding to the regular creative disk is to select the cluster with the highest creative disk capability score. When the target creative disk type is a regular creative disk, the target cluster is determined from the multiple candidate clusters by performing weighted calculation on the creative disk capability factor of each candidate cluster to obtain the creative disk capability score of each candidate cluster, and then selecting the candidate cluster with the highest creative disk capability score as the target cluster. The creative disk capability factor is a factor affecting the creative disk capability of the cluster, including the traffic of writing data, the physical space usage rate, the logical space oversell rate, the logical water level oversell rate, the number of devices, and the current water level of the cluster. The creative disk capability score is used to represent the current processing capability of the cluster, and the higher the creative disk capability score, the stronger the processing capability of the cluster. By allocating the cloud disk creation request of the regular creative disk type to the cluster with strong processing capability, the load of each cluster in the system can be balanced, and the creation speed and success rate of the cloud disk are improved.
[0067] 204. Send the target cloud disk creation request to the target cluster to make the target cluster create a cloud disk for the user account according to the capacity applied for in the target cloud disk creation request.
[0068] The target cloud disk creation request sent to the target cluster is sent in the form of an RPC (Remote Procedure Call) request. Considering that the processing capability of each cluster for the cloud disk creation request is limited, to avoid affecting the cloud disk creation operation being processed, after the target cluster is determined, it is further judged whether the target cluster meets the receiving condition. When the target cluster meets the receiving condition, the cloud disk creation request is sent to the target cluster to make the target cluster create a cloud disk for the user account according to the capacity applied for in the target cloud disk creation request. The receiving condition is a condition that needs to be met by the target cluster when creating a cloud disk based on the cloud disk creation request.
[0069] Specifically, when judging whether the target cluster meets the receiving condition, the following method can be used:
[0070] 2041. Obtain the second total number of cloud disk creation requests currently processed by the target cluster, and obtain the second total capacity of the cloud disks applied to be created by the cloud disk creation requests currently processed by the target cluster.
[0071] In the embodiment of the application, the related information of the cloud disk creation requests allocated to each cluster is stored. Based on the related information, the second total number of the cloud disk creation requests currently processed by the target cluster can be counted, and the second total capacity of the cloud disks applied to be created by the cloud disk creation requests currently processed by the target cluster can be counted.
[0072] 2042、calculate the sum of the second total number and the number of target cloud disk creation requests to obtain a third total number, and calculate the sum of the second total capacity and the capacity of the cloud disk applied to be created by the target cloud disk creation request to obtain a third total capacity.
[0073] 2043、determine whether the third total number is less than a second preset number, and determine whether the third total capacity is less than a second preset capacity.
[0074] The second preset number is the maximum number of cloud disk creation requests processed in parallel by the target cluster, which can be 5, 10, 20, etc. The second preset capacity is the maximum capacity of the cloud disk created in parallel by the target cluster.
[0075] 2044、when the third total number is less than the second preset number, and the third total capacity is less than the second preset capacity, it is determined that the target cluster meets the receiving condition.
[0076] In another embodiment of the present application, when the third total number is greater than or equal to the second preset number, or the third total capacity is greater than or equal to the second preset capacity, it is determined that the target cluster does not meet the receiving condition. In response to the target cluster not meeting the receiving condition at the current time, a backoff mechanism can be adopted to avoid a large load of the target cluster. The backoff mechanism is a dynamic backoff method. When the target cluster does not meet the receiving condition for the first time, after waiting for a first preset time, the operation of determining whether the target cluster meets the receiving condition is performed again. If the target cluster meets the receiving condition, the target cloud disk creation request is sent to the target cluster. If the target cluster does not meet the receiving condition, the operation of determining whether the target cluster meets the receiving condition is performed again after waiting for a second preset time, until the target cluster meets the receiving condition or a judgment cutoff condition is met. The second preset time is longer than the first preset time, that is, the waiting time increases with the number of judgments. The judgment cutoff condition is a condition that needs to be met when stopping determining whether the target cluster meets the receiving condition, including that the number of judgments reaches a number threshold, or the judgment time reaches a time threshold, etc.
[0077] Further, in response to the target cluster meeting the judgment cutoff condition, a new cluster is assigned to the target cloud disk creation request. If a cloud disk creation result message returned by the assigned new cluster is received, the cloud disk creation result message is a cloud disk creation success message, that is, the assigned new cluster can successfully create a cloud disk based on the target cloud disk creation request, the number of cloud disk creation requests being processed by the new cluster and the capacity of the cloud disk are updated.
[0078] Figure 5 The backoff process of the target cluster is shown, referring to Figure 5When the target cluster is determined, a second total number of cloud disk creation requests being processed by the target cluster and a second total capacity of the cloud disks being created are obtained. If the second total number of cloud disk creation requests plus a total number of target cloud disk creation requests, i.e., a third total number, is less than the second preset number, and the second total capacity of the cloud disks being created plus a capacity of the cloud disk in the current application, i.e., a third total capacity, is less than the second preset capacity, the target cloud disk creation request is sent to the target cluster. When a cloud disk creation success message returned by the target cluster is received, the total number of cloud disk creation requests being processed by the target cluster and the total capacity of the cloud disks being created are updated. If the third total number is greater than or equal to the second preset number, or the third total capacity is greater than or equal to the second preset capacity, a backoff mechanism is performed, and a period of time is waited before the above judgment process is initiated again.
[0079] In another embodiment of the present application, considering that there is a communication time difference between the storage cluster level control component and the storage availability zone level control component in the distributed storage system, the current water level of the cluster stored by the storage availability zone level control component and the actual water level of the cluster may have a certain deviation. When the storage availability zone level control component determines the target cluster according to the stored current water level of the cluster, and sends the target cloud disk creation request to the target cluster, if the actual water level of the target cluster is higher than the creation rejection water level corresponding to the target cloud disk creation request to be processed, the cloud disk cannot be successfully created, and the target cluster will return a cloud disk creation failure message. The cloud disk creation failure message carries the reason for the failure of the target cluster to create a disk. In response to the received cloud disk creation failure message of the target cluster, if the reason for the failure of the target cluster to create a disk is that the actual water level of the target cluster is higher than the target disk creation rejection water level, an operation of allocating a new cluster for the target cloud disk creation request is performed. If the reason for the failure of the target cluster to create a disk is a non-water level reason, the cloud disk creation operation based on the target cloud disk creation request ends.
[0080] Further, in response to the received cloud disk creation failure message of the target cluster, to improve the success rate of subsequent cloud disk creation, the identifier of the target cluster is added to the cluster blacklist to obtain an updated cluster blacklist. The updated cluster blacklist is used to filter the obtained candidate clusters when a new cluster is allocated for the target cloud disk creation request. Of course, the current water level of the target cluster will also be updated, so that the operation can be based on the updated current water level of the target cluster in the subsequent steps.
[0081] In the embodiment of the present application, the process of assigning a new cluster for the target cloud disk creation request includes: obtaining the current water levels of multiple clusters and an updated cluster blacklist, and obtaining candidate clusters from the multiple clusters based on the current water levels of the multiple clusters, a target disk rejection water level corresponding to the target disk creation type, and the updated cluster blacklist, and then selecting a new cluster from the multiple candidate clusters based on a cluster assignment mode corresponding to the target disk creation type, and then sending the target cloud disk creation request to the new cluster. Before sending the target cloud disk creation request to the new cluster, it is further determined whether the new cluster meets the receiving condition. If the new cluster meets the receiving condition, the target cloud disk creation request is sent to the new cluster. If the new cluster does not meet the receiving condition, a backoff mechanism is executed, and the above determination process is initiated again after waiting for a period of time.
[0082] For the process of assigning a new cluster for the cloud disk creation request, the following will be described in detail in combination with Figure 6 .
[0083] Referring to Figure 6 , when the cloud disk creation failure message is received, and the reason for the cloud disk creation failure is that the actual water level of the target cluster is higher than the target disk rejection water level, the identifier of the target cluster is added to the cluster blacklist to obtain an updated cluster blacklist, and then multiple candidate clusters are obtained from the multiple clusters based on the current water levels of the multiple clusters, the target disk rejection water level corresponding to the target disk creation type, and the updated cluster blacklist. It is further determined whether the target disk creation type is a Burst disk. If it is a Burst disk, a new cluster is determined according to a preset assignment ratio to evenly scatter the cloud disk creation request. If it is not a Burst disk, the disk creation ability score of each candidate cluster is obtained by weighting the ability factor of each candidate cluster, and then the candidate cluster with the highest disk creation ability score is selected as the new cluster. Before sending the cloud disk creation request to the new cluster, it is further determined whether the new cluster meets the receiving condition. If the new cluster meets the receiving condition, the cloud disk creation request is sent to the new cluster in the form of an RPC request. If the new cluster returns a cloud disk creation failure message, and the reason for the failure is that the actual water level of the new cluster is higher than the target disk rejection water level, the identifier of the new cluster is added to the cluster blacklist.
[0084] Further, if all clusters in the distributed storage system cannot process the cloud disk creation request, a cloud disk creation failure message is returned to the user account.
[0085] For the entire process of the above cloud disk creation request scheduling, the following will be described in detail in combination with Figure 7 .
[0086] Referring to Figure 7The storage area level management component (Ocean) receives a cloud disk creation request of a user account and sends the cloud disk creation request to a storage availability zone level management component. The storage availability zone level management component pre-processes the cloud disk creation request, then performs Burst disk creation tagging (i.e., determines the target disk type) based on the historical disk creation records of the user account, and further determines a plurality of candidate clusters based on the current water levels of the plurality of clusters, the cluster blacklist, and the disk rejection water levels corresponding to different disk types. Then, by judging whether the cloud disk creation request is a Burst disk, the cluster allocation mode corresponding to the cloud disk creation request is determined. If it is a Burst disk, the target cluster is determined from the plurality of candidate clusters for the purpose of uniformly dispersing the cloud disk creation request. If it is not a Burst disk, the candidate cluster with the highest disk creation capability score is selected as the target cluster based on the disk creation capability scores of each candidate cluster. Next, it is judged whether the target cluster meets the receiving condition. If the target cluster meets the receiving condition, the cloud disk creation request is sent to the target cluster in the form of an RPC request. If the target cluster does not meet the receiving condition, the target cluster is waited for a period of time based on the backoff mechanism, and the judgment continues until the target cluster meets the receiving condition or the target cluster meets the judgment cutoff condition. For the target cluster, when the cloud disk creation request is received, a cloud disk creation operation is performed, and a cloud disk creation result message is returned. If the cloud disk creation result message is a cloud disk creation success message, or the cloud disk creation result message is a cloud disk creation failure message and the failure reason is not a water level reason, the process ends. If the cloud disk creation result message is a cloud disk creation failure message and the failure reason is that the actual water level is higher than the disk rejection water level corresponding to the cloud disk creation request, the identifier of the target cluster is added to the cluster blacklist, and a plurality of candidate clusters are determined based on the current water levels of the plurality of clusters, the updated cluster blacklist, and the disk rejection water levels corresponding to different disk types. Then, by judging whether the cloud disk creation request is a Burst disk, the cluster allocation mode corresponding to the cloud disk creation request is determined. If it is a Burst disk, a new cluster is determined from the plurality of candidate clusters for the purpose of uniformly dispersing the cloud disk creation request. If it is not a Burst disk, the candidate cluster with the highest disk creation capability score is selected as the new cluster based on the disk creation capability scores of each candidate cluster. Before sending the cloud disk creation request to the new cluster, it is also judged whether the new cluster meets the receiving condition. If the new cluster meets the receiving condition, the cloud disk creation request is sent to the new cluster in the form of an RPC request. If the new cluster returns a cloud disk creation failure message and the failure reason is that the actual water level of the new cluster is higher than the target disk rejection water level, the identifier of the new cluster is added to the cluster blacklist.
[0087] By adopting the method provided in the embodiments of the present application, the cloud disk creation is classified, and different water level flow control scheduling logics are adopted according to different cloud disk creation types, so as to prevent intensive cloud disk creation. When the cloud disk creation task is issued, the flow control is performed on the cloud disk creation task to be issued, so as to alleviate the probability of the overload of the single cluster. When the single cluster is overloaded, the assigned cloud disk creation request is scheduled to the cluster with surplus, so as to prevent the single cluster from being continuously overloaded. On the single cluster level, the self-protection is performed through the avoidance mechanism, so as to greatly reduce the probability of the overload of the single cluster. When all the clusters are overloaded, all the cloud disk creations are rejected. In general, by adopting the method provided in the embodiments of the present application, the separation of the data flow and the control flow is truly realized, the overload of the cluster in the system is avoided, the performance of the cluster is improved, the read and write operations of the cluster and the cloud disk creation operation are ensured to be normally performed, the read and write operation experience of the user is improved, and the success rate of the cloud disk creation is improved.
[0088] All the optional technical solutions described above can be combined to form optional embodiments of the present application, which will not be described herein.
[0089] Please refer to Figure 8 which shows a structure schematic diagram of a cloud disk creation request scheduling device provided in the embodiments of the present application. The device is applied to a distributed storage system including multiple clusters. The device can be realized by software, hardware or combination of both, and become all or part of an electronic device. The device includes:
[0090] The first determination module 801 is configured to, in response to a target cloud disk creation request of a user account, determine a target cloud disk creation type to which the target cloud disk creation request belongs based on historical cloud disk creation records of the user account. Different cloud disk creation types have different cloud disk creation rejection water levels. The cloud disk creation rejection water level is the maximum water level when the cluster performs the cloud disk creation operation. The water level is used to represent the load rate of the cluster. The water level is determined according to the real-time data link QPS capability and snapshot loading capability of the cluster.
[0091] The acquisition module 802 is configured to acquire multiple candidate clusters from the multiple clusters based on the target cloud disk creation rejection water level corresponding to the target cloud disk creation type, the current water levels of the multiple clusters and a cluster blacklist. The cluster blacklist is used to store the identifiers of the clusters that fail to create the cloud disk because the actual water level is higher than the cloud disk creation rejection water level corresponding to the assigned cloud disk creation request.
[0092] The second determination module 803 is configured to determine a target cluster from the multiple candidate clusters according to the cluster allocation mode corresponding to the target cloud disk creation type.
[0093] The sending module 804 is configured to send the target cloud disk creation request to the target cluster, so that the target cluster creates the cloud disk for the user account according to the capacity applied by the target cloud disk creation request.
[0094] In another embodiment of the present application, the first determination module 801 is configured to: based on historical cloud disk creation records, count the number of cloud disk creation requests and the capacity of applied cloud disks sent by the user account within a preset time window respectively, to obtain a first total number and a first total capacity; when the first total number is greater than or equal to a first preset number, or the first total capacity is greater than or equal to a first preset capacity, determine that the target cloud disk creation type is batch cloud disk creation; when the first total number is less than the first preset number, and the first total capacity is less than the first preset capacity, determine that the target cloud disk creation type is regular cloud disk creation.
[0095] In another embodiment of the present application, the acquisition module 802 is configured to: based on the current water level of the plurality of clusters and the target cloud disk rejection water level, acquire, from the plurality of clusters, a cluster whose current water level is less than the target cloud disk rejection water level; based on the cluster blacklist, screen the cluster whose current water level is less than the target cloud disk rejection water level, to obtain a plurality of candidate clusters.
[0096] In another embodiment of the present application, the target cloud disk creation type is batch cloud disk creation, and the cluster allocation manner corresponding to the batch cloud disk creation is to allocate according to a preset allocation ratio. The second determination module 803 is configured to: acquire the total number of cloud disk creation requests of the user account in each cluster; based on the total number of cloud disk creation requests of the user account, determine, from the plurality of candidate clusters, a candidate cluster that meets the preset allocation ratio as a target cluster.
[0097] In another embodiment of the present application, the target cloud disk creation type is regular cloud disk creation, and the cluster allocation manner corresponding to the regular cloud disk creation is to select a cluster with the highest cloud disk creation ability score. The second determination module 803 is configured to: perform weighted calculation on a cloud disk creation ability factor of each candidate cluster to obtain a cloud disk creation ability score of each candidate cluster, the cloud disk creation ability factor being a factor affecting the cloud disk creation ability of the cluster; and select the candidate cluster with the highest cloud disk creation ability score as the target cluster.
[0098] In another embodiment of the present application, the apparatus further comprises:
[0099] The determination module is configured to determine whether the target cluster meets a receiving condition, the receiving condition being a condition that needs to be met when the target cluster creates a cloud disk based on the target cloud disk creation request.
[0100] The sending module is configured to send the target cloud disk creation request to the target cluster when the target cluster meets the receiving condition.
[0101] In another embodiment of the present application, the judging module is configured to acquire a second total number of cloud disk creation requests currently processed by the target cluster, and acquire a second total capacity of cloud disks applied to be created by the cloud disk creation requests currently processed by the target cluster; calculate a sum of the second total number and a number of target cloud disk creation requests to obtain a third total number, and calculate a sum of the second total capacity and a capacity of the cloud disks applied to be created by the target cloud disk creation requests to obtain a third total capacity; determine whether the third total number is less than a second preset number, and determine whether the third total capacity is less than a second preset capacity; and when the third total number is less than the second preset number and the third total capacity is less than the second preset capacity, determine that the target cluster meets the receiving condition.
[0102] In another embodiment of the present application, the device further comprises:
[0103] The judging module is configured to, when the target cluster does not meet the receiving condition, wait for a preset time length, and then continue to perform the operation of judging whether the target cluster meets the receiving condition until the target cluster meets the receiving condition or a judging cutoff condition is met.
[0104] The sending module is configured to, in response to the target cluster meeting the receiving condition, send the target cloud disk creation request to the target cluster.
[0105] The allocating module is configured to, in response to the target cluster meeting the judging cutoff condition, allocate a new cluster for the target cloud disk creation request.
[0106] In another embodiment of the present application, the device further comprises:
[0107] The receiving module is configured to receive a cloud disk creation failure message of the target cluster, the cloud disk creation failure message carrying a reason for cloud disk creation failure of the target cluster.
[0108] The allocating module is configured to, when the reason for cloud disk creation failure of the target cluster is that an actual water level of the target cluster is higher than a target cloud disk creation rejection water level, allocate a new cluster for the target cloud disk creation request.
[0109] In another embodiment of the present application, the device further comprises:
[0110] The adding module is configured to add an identifier of the target cluster to the cluster blacklist to obtain an updated cluster blacklist, the updated cluster blacklist being used to filter the obtained candidate clusters when a new cluster is allocated for the target cloud disk creation request.
[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein.
[0112] Figure 9A structural block diagram of an electronic device 900 provided by one example embodiment of the present application is shown. Generally, the electronic device 900 includes a processor 901 and a memory 902.
[0113] The processor 901 can be implemented in at least one hardware form of a DSP (Digital Signal Processing), a FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 901 can also include a main processor and a co-processor, the main processor being a processor for processing data in a wake-up state, and the co-processor being a low-power processor for processing data in a standby state. In some embodiments, the processor 901 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content required to be displayed by a display screen. In some embodiments, the processor 901 can further include an artificial intelligence processor for processing computing operations related to machine learning.
[0114] The memory 902 can include one or more computer-readable storage media that can be non-transitory computer-readable storage media, such as CD-ROM (Compact Disc Read-Only Memory), ROM (Random Access Memory), RAM (Random Access Memory), magnetic tape, floppy disk, and optical data storage devices, etc. The computer-readable storage media stores at least one computer program that is executed to implement the cloud disk request scheduling method.
[0115] Of course, the above electronic device can also include other components, such as an input / output interface, a communication component, etc. The input / output interface provides an interface between the processor and peripheral interface modules, and the above peripheral interface modules can be output devices, input devices, etc. The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices.
[0116] Those skilled in the art can understand that, Figure 9 The structure shown in the above description does not constitute a limitation on the electronic device 900, and can include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0117] The embodiment of the present application provides a computer readable storage medium, at least one computer program is stored in the computer readable storage medium, and the at least one computer program can realize the cloud disk creation request scheduling method when being executed by a processor.
[0118] The embodiment of the present application provides a computer program product, the computer program product comprises a computer program, and the computer program can realize the cloud disk creation request scheduling method when being executed by a processor.
[0119] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A cloud disk creation request scheduling method, characterized in that, The method is applied to a distributed storage system comprising a plurality of clusters, and the method comprises: In response to a target cloud disk creation request of a user account, a target disk creation type to which the target cloud disk creation request belongs is determined based on historical disk creation records of the user account, different disk creation types have different disk creation rejection water levels, the disk creation rejection water level is a maximum water level when a cluster performs a cloud disk creation operation, the water level is used to represent a load rate of the cluster, and the water level is determined according to a data link query per second (QPS) capability and a snapshot loading capability of the cluster in real time; Based on a target disk creation rejection water level corresponding to the target disk creation type, current water levels of the plurality of clusters, and a cluster blacklist, a plurality of candidate clusters are obtained from the plurality of clusters, and the cluster blacklist is used to store identifiers of clusters that fail to create disks because actual water levels are higher than disk creation rejection water levels corresponding to cloud disk creation requests allocated by the clusters; A target cluster is determined from the plurality of candidate clusters according to a cluster allocation mode corresponding to the target disk creation type; The target cloud disk creation request is sent to the target cluster, so that the target cluster creates a cloud disk for the user account according to a capacity applied for by the target cloud disk creation request.
2. The method of claim 1, wherein, The target disk creation type to which the target cloud disk creation request belongs is determined based on historical disk creation records of the user account, which comprises: Based on the historical disk creation records, the number of cloud disk creation requests sent by the user account within a preset time window and the capacity of the cloud disks applied for by the user account are counted respectively to obtain a first total number and a first total capacity; When the first total number is greater than or equal to a first preset number, or the first total capacity is greater than or equal to a first preset capacity, it is determined that the target disk creation type is batch disk creation; When the first total number is less than the first preset number and the first total capacity is less than the first preset capacity, it is determined that the target disk creation type is regular disk creation.
3. The method of claim 1, wherein, The target disk creation type to which the target cloud disk creation request belongs is determined based on historical disk creation records of the user account, which comprises: Based on the current water levels of the plurality of clusters and the target disk creation rejection water level, clusters with current water levels less than the target disk creation rejection water level are obtained from the plurality of clusters; Based on the cluster blacklist, the clusters with current water levels less than the target disk creation rejection water level are screened to obtain the plurality of candidate clusters.
4. The method of claim 1, wherein, When the target disk creation type is batch disk creation, the cluster allocation mode corresponding to the batch disk creation is allocation according to a preset allocation ratio, and the target cluster is determined from the plurality of candidate clusters according to the cluster allocation mode corresponding to the target disk creation type, which comprises: The total number of cloud disk creation requests allocated by each cluster is obtained; Based on the total number of cloud disk creation requests allocated by each cluster, candidate clusters that meet the preset allocation ratio are determined from the plurality of candidate clusters as the target cluster.
5. The method of claim 1, wherein, The target disk type is a regular disk, and the cluster allocation mode corresponding to the regular disk is to select a cluster with the highest disk capacity score. The target cluster is determined from the plurality of candidate clusters according to the cluster allocation mode corresponding to the target disk type, and the method comprises the steps of: calculating the disk capacity factor of each candidate cluster to obtain the disk capacity score of each candidate cluster, wherein the disk capacity factor is a factor affecting the disk capacity of the cluster; the candidate cluster with the highest disk capacity score is selected as the target cluster.
6. The method according to any one of claims 1 to 5, characterized in that, Before the target cloud disk creation request is sent to the target cluster, the method further comprises the steps of: determining whether the target cluster meets the receiving condition, wherein the receiving condition is a condition that needs to be met when the target cluster creates a cloud disk based on the target cloud disk creation request; when the target cluster meets the receiving condition, the operation of sending the target cloud disk creation request to the target cluster is performed.
7. The method of claim 6, wherein, The method further comprises the steps of: obtaining a second total number of cloud disk creation requests currently processed by the target cluster, and obtaining a second total capacity of cloud disks applied to be created by the cloud disk creation requests currently processed by the target cluster; calculating the sum of the second total number and the number of target cloud disk creation requests to obtain a third total number, and calculating the sum of the second total capacity and the capacity of the cloud disks applied to be created by the target cloud disk creation request to obtain a third total capacity; determining whether the third total number is less than a second preset number, and determining whether the third total capacity is less than a second preset capacity; when the third total number is less than the second preset number and the third total capacity is less than the second preset capacity, it is determined that the target cluster meets the receiving condition.
8. The method of claim 6, wherein, The method further comprises the steps of: when the target cluster does not meet the receiving condition, waiting for a preset time period, and then continuing to perform the operation of determining whether the target cluster meets the receiving condition until the target cluster meets the receiving condition or a judgment cutoff condition is met; in response to the target cluster meeting the receiving condition, sending the target cloud disk creation request to the target cluster; in response to the target cluster meeting the judgment cutoff condition, assigning a new cluster to the target cloud disk creation request.
9. The method according to any one of claims 1 to 5, characterized in that, After the target cloud disk creation request is sent to the target cluster, the method further comprises the steps of: receiving a cloud disk creation failure message of the target cluster, wherein the cloud disk creation failure message carries a reason for the disk creation failure of the target cluster; when the reason for the disk creation failure of the target cluster is that the actual water level of the target cluster is higher than the target disk creation rejection water level, a new cluster is assigned to the target cloud disk creation request.
10. The method of claim 9, wherein, Before the new cluster is assigned to the target cloud disk creation request, the method further comprises the steps of: adding the identifier of the target cluster to the cluster blacklist to obtain an updated cluster blacklist, wherein the updated cluster blacklist is used to filter the obtained candidate clusters when a new cluster is assigned to the target cloud disk creation request.
11. A cloud disk creation request scheduling apparatus characterized by comprising: The device is applied to a distributed storage system comprising a plurality of clusters, and the device comprises: The first determination module is configured to, in response to a target cloud disk creation request of a user account, determine a target disk creation type to which the target cloud disk creation request belongs based on historical disk creation records of the user account, different disk creation types have different disk creation rejection water levels, the disk creation rejection water level is a maximum water level when a cluster performs a cloud disk creation operation, the water level is used to represent a load rate of the cluster, and the water level is determined according to real-time data link QPS capability and snapshot loading capability of the cluster. The acquisition module is configured to acquire a plurality of candidate clusters from the plurality of clusters based on a target disk creation rejection water level corresponding to the target disk creation type, current water levels of the plurality of clusters, and a cluster blacklist, and the cluster blacklist is used to store identifiers of clusters that fail in disk creation because actual water levels are higher than disk creation rejection water levels corresponding to allocated cloud disk creation requests. The second determination module is configured to determine a target cluster from the plurality of candidate clusters according to a cluster allocation manner corresponding to the target disk creation type. The sending module is configured to send the target cloud disk creation request to the target cluster, so that the target cluster creates a cloud disk for the user account according to a capacity applied for by the target cloud disk creation request.
12. An electronic device, comprising: The computer readable storage medium stores at least one computer program, and the at least one computer program is executed by the processor to implement the cloud disk creation request scheduling method in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one computer program, and the at least one computer program is executed by the processor to implement the cloud disk creation request scheduling method in any one of claims 1 to 10.
14. A computer program product, characterised in that, The computer program product includes a computer program, and the computer program is executed by the processor to implement the cloud disk creation request scheduling method in any one of claims 1 to 10.
Citation Information
Patent Citations
Multi-cluster management method and device, server and storage medium
CN110389836A
Cluster data processing method and device, electronic equipment and storage medium
CN114528095A