Cloud disk creation request scheduling method and device, electronic equipment and storage medium
By combining user history and cluster load information in a distributed storage system, the cloud disk creation requests are solved, and the performance degradation and lag caused by excessive cluster load is achieved, and the cloud disk creation success rate and system stability are achieved. .
Patent Information
- Application Number
- CN202311026958.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-08-15
AI Technical Summary
In distributed storage systems, it is difficult for the existing technology to effectively schedule cloud disk creation requests, resulting in the fact that when a cluster is overloaded, the request will still be assigned to the cluster, resulting in performance degradation, lag in read and write operations or failure in cloud disk creation .
By combining the historical creation records of the user account, determine the creation type, set the creation rejection water level of different creation types, and obtain candidate clusters from multiple clusters based on the current water level, creation type and blacklist of the cluster, and select the appropriate clusters. The cluster allocation method determines the target cluster to avoid allocating requests to clusters with excessive load.
It improves the performance of the cluster, avoids lag in read and write operations, improves the success rate of cloud disk creation, and ensures the stability and reliability of the system.
Smart Images

Figure CN119520626A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud storage technology, and in particular to a scheduling method, device, electronic device and storage medium for cloud disk creation requests. Background Art
[0002] With the development of cloud computing technology and the explosive growth of data, cloud computing has penetrated into all walks of life, 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. It is the most widely used storage service. In order to obtain the services provided by block storage, users need to send block device creation requests to the distributed storage system so that the cluster in the distributed storage system can create the required block devices for the user. However, the number of clusters included in the distributed storage system is large. How to dispatch the cloud disk creation request sent by the user to the appropriate cluster has become a problem of concern to technicians in this field.
[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 distribution ratio of cloud disk creation requests on multiple clusters is determined according to the theoretical processing capacity of each cluster. Then, when a cloud disk creation request is received, the target cluster is determined according to the determined distribution ratio and the number of cloud disk creation requests allocated to 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, namely cluster A and cluster B. Cluster A includes 10 devices and cluster B includes 5 devices. Then it can be determined that the distribution ratio of cloud disk creation requests on cluster A and cluster B is 2:1. According to this distribution ratio, when a cloud disk creation request is received, the cloud disk creation request is allocated to cluster A. If another cloud disk creation request is received, it will also be allocated to cluster A. If another cloud disk creation request is received, it will be allocated to cluster B.
[0004] However, when a cluster is unable to perform a cloud disk creation operation due to a high read / write operation load rate, the relevant technology will still assign the cloud disk creation request to the cluster, resulting in poor performance of the cluster, and problems such as read / write operation jams may occur, or even cloud disk creation failure. Summary of the invention
[0005] The embodiments of the present application provide a scheduling method, device, electronic device and storage medium for cloud disk creation requests, which can improve the performance of clusters in distributed storage systems, avoid problems such as read and write operation jams during cloud disk creation, and improve the success rate of cloud disk creation. The technical solution is as follows:
[0006] In a first aspect, a method for scheduling a cloud disk creation request is provided, the method being applied to a distributed storage system including multiple clusters, the method comprising:
[0007] In response to a target cloud disk creation request of a user account, 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. Different disk creation types have different disk creation rejection watermarks. The disk creation rejection watermark is the maximum watermark when the cluster performs a cloud disk creation operation. The watermark is used to characterize the load rate of the cluster. The watermark is determined according to the real-time data link QPS (Queries Per Second) capability of the cluster and the snapshot loading capability.
[0008] Based on the target disk creation rejection water level corresponding to the target disk creation type, the current water levels of multiple clusters and a cluster blacklist, multiple candidate clusters are obtained from the multiple clusters, wherein the cluster blacklist is used to store identifiers of clusters that fail to create disks because the actual water level is higher than the disk creation rejection water level corresponding to the allocated cloud disk creation request;
[0009] Determining a target cluster from the multiple candidate clusters according to the cluster allocation method 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 the capacity requested by the target cloud disk creation request.
[0011] In a second aspect, a scheduling device for a cloud disk creation request is provided, the device being applied to a distributed storage system including multiple clusters, the device comprising:
[0012] The first determination module is used to respond to the target cloud disk creation request of the user account, and determine the target disk creation type to which the target cloud disk creation request belongs based on the historical disk creation record of the user account. Different disk creation types have different disk creation rejection water levels. The 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 characterize the load rate of the cluster. The water level is determined according to the real-time data link QPS capacity and snapshot loading capacity of the cluster;
[0013] an acquisition module, configured to acquire multiple candidate clusters from the multiple clusters based on a target disk creation rejection water level corresponding to the target disk creation type, current water levels of multiple clusters, and a cluster blacklist, wherein the cluster blacklist is used to store identifiers of clusters that fail to create a disk because the actual water level is higher than the disk creation rejection water level corresponding to the allocated cloud disk creation request;
[0014] A second determination module is used to determine a target cluster from the multiple candidate clusters according to a cluster allocation method corresponding to the target disk type;
[0015] The sending module is used 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 by the target cloud disk creation request.
[0016] In a third aspect, an electronic device is provided, comprising 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 scheduling method for cloud disk creation requests as described in the first aspect.
[0017] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and when the at least one computer program is executed by a processor, the scheduling method for cloud disk creation requests as described in the first aspect can be implemented.
[0018] In a fifth aspect, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, it can implement the scheduling method for cloud disk creation requests as described in the first aspect.
[0019] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0020] For each cluster in the distributed storage system, the cluster's real-time data link QPS capability and snapshot loading capability affect the cluster's read and write operations. If the cluster's load rate is not controlled based on the cluster's real-time data link QPS capability and snapshot loading capability, it will affect the cluster's read and write operations, resulting in problems such as read and write jams. In addition, user accounts can create disks in batches or in regular ways in the distributed storage system. For batch creation, since the user account sends a large number of cloud disk creation requests in a short period of 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 of fewer available resources in the cluster, by reducing the processing of this type of cloud disk creation request, the available resources are used for regular disk creation, so that more users can obtain the services provided by the cloud disk on the distributed storage system. The embodiment of the present application uses a water level to describe the current load rate of the cluster. Since the processing capacity of the cluster is limited, the higher the current water level of the cluster, the fewer available resources the cluster has for creating cloud disks. To ensure the performance of the cluster, different disk creation types are set with different disk creation rejection water levels, which are the highest water levels when the cluster can perform cloud disk creation operations based on this type of cloud disk creation request, that is, the current maximum load of the cluster. By taking different processing methods for cloud disk creation requests corresponding to different disk creation types, the cluster's disk creation success rate is improved while ensuring cluster performance. In addition, considering that there is a time difference in the communication between the underlying cluster and the upper-level control device of the distributed storage system, for those clusters that fail to create disks during the cloud disk creation process due to the difference between the actual water level and the reported water level, in order to avoid this problem from occurring again in the subsequent disk creation process and improve the success rate of cloud disk creation, this application stores the cluster identifiers of these clusters in the cluster blacklist. Based on the above content, after receiving the cloud disk creation request sent by the user account, this application no longer schedules the cloud disk creation request between the clusters in the current distributed storage system based on fixed rules, but schedules it in combination with the current water level of each underlying cluster in the distributed storage system, the target disk creation type to which the cloud disk creation request belongs, and the cluster blacklist. By taking into account the actual processing capacity of the underlying layer and the resource requirements of different disk creation types, it avoids excessive load on the scheduled cluster, improves cluster performance, avoids problems such as cluster reading and writing jams, and improves the success rate of cloud disk creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is an architecture diagram of a distributed storage system provided by an embodiment of the present application;
[0023] Figure 2 It is a flowchart of a scheduling method for a cloud disk creation request provided in an embodiment of the present application;
[0024] Figure 3 It is a schematic diagram of determining the type of disk creation to which a cloud disk creation request belongs based on a preset time window provided by an embodiment of the present application;
[0025] Figure 4 It is a schematic diagram of water levels corresponding to different types of trays provided in an embodiment of the present application;
[0026] Figure 5 It is a backoff mechanism for a cloud disk creation request provided in an embodiment of the present application;
[0027] Figure 6 This is a flow chart of cluster reselection provided by an embodiment of the present application;
[0028] Figure 7 It is a flowchart of another method for scheduling cloud disk creation requests provided in an embodiment of the present application;
[0029] Figure 8 It is a schematic diagram of the structure of a scheduling device for a cloud disk creation request provided in an embodiment of the present application;
[0030] Fig. 9 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying 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, the 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 device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation portals for users to choose to authorize or refuse. For example, the cloud disk creation request and historical disk creation records involved in this application are all obtained with full authorization.
[0034] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of storage devices of various types in the network (storage devices are also called storage nodes) through application software or application interfaces to work together and provide data storage and access functions to the outside world. Cloud storage is mainly for cloud customers running on the hardware of cloud providers. These functions can meet a variety of different needs and all support pay-per-use. In the cloud storage model, the provider is responsible for maintaining the underlying hardware and ensuring the availability, elasticity, and security of the data. Common cloud storage types include object storage, block storage, and file storage, and this application is applied to block storage scenarios.
[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-layer control flow and the underlying data flow affect each other. The upper-layer scheduling device schedules the received requests to the underlying cluster for processing, thereby affecting the load rate of the underlying cluster, and the load rate of the underlying cluster also affects the scheduling of the underlying cluster by the upper-layer scheduling device. The existing distributed storage system does not consider the actual processing capacity of the underlying cluster, but schedules the received requests 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 scenario of creating large-scale cloud disks. Read and write operations may experience problems such as jamming, and may even cause cloud disk creation to fail.
[0036] The embodiment of the present application provides a scheduling method for cloud disk creation request, which reports the capability of the underlying cluster to the upper scheduling device, and the upper scheduling device selects a suitable cluster to create a cloud disk according to the capability of the underlying cluster, thereby realizing the decoupling of data flow and control flow and improving the performance of the underlying cluster. In order to achieve the complete separation of data flow and control flow, the embodiment of the present application also takes a variety of measures. On the one hand, according to the cloud disk creation request sent by the user account within the preset time, the cloud disk creation request sent by the user account is divided into different disk creation types, namely batch disk creation (i.e., Burst disk creation) and regular disk creation (Normal disk creation), and different water level flow control scheduling mechanisms are used for different disk creation types. For cloud disk creation requests belonging to batch disk creation, a relatively low water level is set for this type of disk creation, so that when the available resources of the cluster are less, the corresponding user account is prevented from intensively creating disks, resulting in the unavailability of the cluster and affecting all users; for cloud disk creation requests belonging to regular disk creation, a relatively high water level is set for this type of disk creation, so that disk creation can still be performed when the available resources of the cluster are less, thereby providing disk creation services for user accounts that create disks sporadically. On the other hand, when the capacity of a single cluster suddenly reaches its upper limit, the received cloud disk creation requests can be dispatched to other clusters, improving the performance of the cluster and the success rate of cloud disk creation. On the other hand, when a single cluster is currently processing a large number of requests, based on the Qos mechanism, the control flow of the single cluster is backed off to avoid excessive load on the cluster within a certain period of time.
[0037] Please refer to Figure 1 , which shows the architecture diagram of the distributed storage system involved in the embodiment of the present application, see Figure 1 The distributed storage system includes an upper-layer scheduling device and an underlying cluster. The scheduling device is used to schedule cloud disk creation requests received by the distributed storage system. The scheduling device includes a cloud server object, multiple storage area-level control components, multiple storage availability zone-level control components, and multiple storage cluster-level control components. The functions of the cloud server object, multiple storage area-level control components, multiple storage availability zone-level control components, and multiple storage cluster-level control components are described in detail below.
[0038] The cloud server object is connected to multiple storage area level control components, and is used to select a target storage area level control component from multiple storage area level control components when receiving a cloud disk creation request from a user account, and send the received cloud disk creation request to the target storage area level control component. The cloud server object is also used to receive a cloud disk creation result message sent by the lower storage area level control 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 reason for the failure is the cluster water level reason, then 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 reason for the failure is the cluster water level reason, then the operation of reselecting a new cluster for the cloud disk creation request is executed.
[0039] The storage area level control component (Ocean) is connected to multiple storage availability zone level control components, and is used to select a target storage availability zone level control component from multiple storage availability zone level control components, and send the received cloud disk creation request to the target storage availability zone level control component. The storage area level control component is also used to receive the cloud disk creation result message sent by the connected storage availability zone level control component, and send the cloud disk creation result message to the upper-level cloud server object. If the cloud disk creation result message is a cloud disk creation failure message, it is necessary to map the cloud disk creation failure message to an error code to obtain a message that can be recognized by the cloud server object, and then send the cloud disk creation failure message after the error code mapping to the cloud server object, so that when the 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 control component (RiverMaster) is connected to multiple storage cluster level control components to receive the current actual water level of each cluster in the availability zone reported by each connected storage cluster level control component, and select multiple candidate clusters based on the current actual water level of each cluster, the cluster blacklist, and the disk creation rejection water level corresponding to the disk creation type to which the cloud disk creation request belongs, and then select a target cluster from the multiple candidate clusters based on the cluster allocation method corresponding to the disk creation type to which the cloud disk creation request belongs. The storage availability zone level control component is also used to determine whether the target cluster meets the conditions for receiving 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 requested cloud disks. When the target cluster meets the conditions, the cloud disk creation request is sent to the storage cluster level control component to which the target cluster is connected. The storage availability zone level control component is also used to receive the cloud disk creation result message sent by the storage cluster level control component, and send the received cloud disk creation result message to the connected storage area level control component, which is sent to the cloud server object by the storage area level control component. If the received cloud disk creation result message is a cloud disk creation failure message, and the reason for the failure is that the current actual water level of the cluster is higher than the disk creation rejection water level corresponding to the cloud disk creation request, then the identifier of the cluster is added to the cluster blacklist, and the current water level of the stored cluster is updated at the same time. In order to facilitate the management of the functions of the storage availability zone level control component, the embodiment of the present application divides the storage availability zone level control component into multiple functional modules, 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 control component (BlockMaster) is connected to a single cluster to calculate the current water level of the connected cluster and reject the cloud disk creation request when the current water level of the connected cluster reaches 100%. In addition, it can also be used to report the current water level of the connected cluster to the upper-level storage availability zone-level control component, and send the received cloud disk creation request to the target cluster determined by the upper-level storage availability zone-level control component. The storage cluster-level control 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-level storage availability zone-level control component.
[0042] Each cluster includes multiple devices, which are used to receive cloud disk creation requests sent by the connected storage cluster-level management and control components, and create cloud disks according to the capacity applied for creation in the received cloud disk creation requests. They are also used to generate cloud disk creation result messages and send the cloud disk creation result messages to the upper-level storage cluster-level management and control components.
[0043] The present application embodiment provides a scheduling method for cloud disk creation request. Figure 1 The scheduling device shown in the embodiment of the present application is used as an example, see Figure 2 , the method flow provided in the embodiment of the present application includes:
[0044] 201. 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.
[0045] Among them, the user account is an account registered by the user in an application that can provide cloud disk services. When the user account needs to obtain the services provided by the cloud disk, the user account can send a target cloud disk creation request to the distributed storage system. When the cloud server object in the distributed storage system receives the target cloud disk creation request, it sends the target cloud disk creation request to the storage area level control component, and the storage area level control component sends the target cloud disk creation request to the storage availability zone level control component. The storage area level control component receives the target cloud disk creation request, pre-processes the target cloud disk creation request, and then sends it to the scheduler, which selects the target cluster for the target cloud disk creation request. The pre-processing mainly includes verifying the legitimacy of the target cloud disk creation request, thereby improving the security and reliability of the created cloud disk.
[0046] In an embodiment of the present application, when the scheduler selects a target cluster for a target cloud disk creation request, it will first determine the target disk creation type to which the target cloud disk creation request belongs based on the historical disk creation records of the user account. Among them, disk creation types include batch disk creation and regular disk creation. Batch disk creation is also called Burst disk creation, which is an intensive disk creation type. It is aimed at user accounts with a large demand for the number of cloud disks. This user account usually sends multiple cloud disk creation requests in succession, and the total capacity of the cloud disks applied for creation is large. Regular disk creation is also called Normal disk creation, which is a sporadic disk creation type. It is aimed at user accounts with a small demand for the number of cloud disks. The number of cloud disk creation requests sent by this user account is small, and the total capacity of the cloud disks applied for creation is not large. Specifically, when determining the target disk creation type to which the target cloud disk creation request sent by the user account belongs 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 applied cloud disk are counted to obtain a first total number and a first total capacity.
[0048] The duration of the preset time window may be 60 seconds, 70 seconds, etc. The preset time window is a sliding window, and the step length of each sliding is a preset step length, such as 10 seconds, 20 seconds, etc. Figure 3A preset time window is shown, see Figure 3 , the duration of the preset time window is 60S.
[0049] In an embodiment of the present application, the scheduler stores historical disk creation records of multiple user accounts. When a target cloud disk creation request of a user account is received, the historical disk creation record of the user account is obtained from the stored historical disk creation records of multiple user accounts based on the user account, and based on the current time and the duration of the preset duration window, the historical disk creation record with a reception time before the current time and within the preset time window is obtained from the historical disk creation records of the user account, and then a first total number is obtained by counting the number of cloud disk creation requests corresponding to these historical disk creation records, and a first total capacity is obtained by counting the capacity of the cloud disk applied for by the cloud disk creation requests corresponding to these historical disk creation records.
[0050] 2012. When the first total quantity is greater than or equal to the first preset quantity, or the first total capacity is greater than or equal to the first preset capacity, determine that the target disk creation type is batch disk creation.
[0051] The first preset quantity is configured according to the experience of the technician, and may be 50, 60, etc. The first preset capacity is configured according to the experience of the technician, and may be 1T, 2T, etc. When the first total quantity and the first total capacity are obtained, the first total quantity is compared with the first preset quantity, and the first total capacity is compared with the first preset capacity. When the first total quantity is greater than or equal to the first preset quantity, or the first total capacity is greater than or equal to the first preset capacity, it is determined that the target disk creation type is batch disk creation.
[0052] 2013. When the first total quantity is less than the first preset quantity and the first total capacity is less than the first preset capacity, determine that the target disk creation type is a regular disk creation.
[0053] 202. Based on the target disk creation rejection water level corresponding to the target disk creation type, the current water levels of the multiple clusters, and the cluster blacklist, multiple candidate clusters are obtained from the multiple 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 situation of the cluster. The larger the load rate of the cluster, the smaller the current processing capacity of the cluster; the smaller the load rate of the cluster, the larger the current processing capacity of the cluster. If the load rate is expressed in percentage, 0 means no load, and 100 means reaching the maximum load limit of the cluster. In order to more intuitively display the current processing capacity of the cluster, the embodiment of the present application uses a water level to vividly represent the load rate of the cluster, and 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, and 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. To facilitate subsequent calculations, the current water levels of all clusters can be normalized to 0-100. When the current water level of a cluster is 0, the load of the cluster is small and a cloud disk can be created. When the current water level of a 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. As the operations performed change, the cluster's real-time data link QPS processing capability and snapshot loading capability change accordingly, and the cluster's current water level also changes accordingly.
[0056] The disk creation rejection water level is the maximum water level when the cluster performs a 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 inability to successfully create cloud disks 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 batch disk creation types is lower than the disk creation rejection water level set for regular disk creation types. Figure 4The disk creation rejection water level set for different disk creation types is shown, wherein the disk creation rejection water level set for the batch disk creation type is 80% of the cluster maximum water level, and the disk creation rejection water level set for the regular disk creation 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 disk creation rejection water level corresponding to the batch disk creation type and the disk creation rejection water level corresponding to the regular disk creation type, cloud disk creation requests belonging to the batch disk creation type and cloud disk creation requests belonging to the regular disk creation 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 disk creation rejection water level corresponding to the batch disk creation type and lower than the disk creation rejection water level corresponding to the regular disk creation type, cloud disk creation requests belonging to the regular disk creation type can be processed, but cloud disk creation requests belonging to the batch disk creation 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 disk creation rejection water level corresponding to the batch disk creation type and the disk creation rejection water level corresponding to the regular disk creation type, cloud disk creation requests belonging to the batch disk creation type and cloud disk creation requests belonging to the regular disk creation type cannot be processed.
[0057] Considering that there is a certain communication time difference between the lower-layer storage cluster-level control component and the upper-layer 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 selects a cluster to process a cloud disk creation request according to the current water level of the stored cluster, and the actual water level of the cluster is greater than the creation disk rejection water level corresponding to the cloud disk creation request to be processed, the cluster cannot successfully create a cloud disk. To this end, an embodiment of the present application maintains a cluster blacklist, which is used to store the identifiers of clusters that failed to create a cloud disk because the actual water level is higher than the creation disk rejection water level corresponding to the allocated cloud disk creation request. When selecting the target cluster later, the selected cluster is screened through the cluster blacklist to improve the success rate of subsequent cloud disk creation.
[0058] In an embodiment of the present application, based on the target disk creation rejection water level corresponding to the target disk creation type, the current water levels of multiple clusters and the cluster blacklist, when obtaining multiple candidate clusters from multiple clusters, it is possible to obtain, from multiple clusters, clusters whose current water levels are less than the target disk creation rejection water level based on the current water levels of the multiple clusters and the target disk creation rejection water level, and then screen the clusters whose current water levels are less than the target disk creation rejection water level based on the cluster blacklist to obtain multiple candidate clusters.
[0059] For example, the distributed storage system includes 5 clusters, namely cluster 1, cluster 2, cluster 3, cluster 4 and cluster 5, wherein 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 of the received cloud disk creation request is batch creation, and the disk creation rejection water level corresponding to the batch creation is 80% of the maximum water level, then based on the current water level of the 5 clusters and the target disk creation rejection water level, the clusters whose current water level is less than the target disk creation rejection water level are obtained from the 5 clusters, namely 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 method corresponding to the target disk creation type, determine a target cluster from multiple candidate clusters.
[0061] The embodiment of the present application sets different cluster allocation methods for different disk creation types. After obtaining multiple candidate clusters, the target cluster is determined from the multiple candidate clusters according to the cluster allocation method corresponding to the target disk creation type, including but not limited to the following two methods:
[0062] The first method: the target disk creation type is batch creation
[0063] The cluster allocation method corresponding to 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, determining the target cluster from multiple candidate clusters includes: obtaining the total number of cloud disk creation requests allocated to each cluster, and then based on the total number of cloud disk creation requests allocated to each cluster, determining a candidate cluster that meets the preset allocation ratio from multiple candidate clusters as the target cluster.
[0064] For example, cluster A includes 10 devices, cluster B includes 5 devices, and cluster A and cluster B include the same devices, so 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 allocated on cluster A is 1, which does not reach the preset allocation ratio, cluster A will be used as the target cluster; if the number of cloud disk creation requests allocated on cluster A is 2, which reaches the preset allocation ratio, cluster B will be used as the target cluster.
[0065] The second method: the target disk creation type is regular disk creation
[0066] Among them, the cluster allocation method corresponding to the regular disk creation is to select the cluster with the highest disk creation capability score. When the target disk creation type is regular disk creation, the target cluster is determined from multiple candidate clusters, including: weighted calculation of the disk creation capability factor of each candidate cluster to obtain the disk creation capability score of each candidate cluster, and then the candidate cluster with the highest disk creation capability score is used as the target cluster. Among them, the disk creation capability factor is a factor that affects the cluster's disk creation capability, including the flow of write data, physical space usage rate, logical space overselling rate, logical water level overselling rate, number of devices and the current water level of the cluster. The disk creation capability score is used to characterize the current processing capability of the cluster. The higher the disk creation capability score, the stronger the cluster's processing capability. By allocating cloud disk creation requests belonging to the regular disk creation type to clusters with strong processing capabilities, the load of each cluster in the system can be balanced, which improves the speed and success rate of cloud disk creation.
[0067] 204. Send a 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 requested by 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 each cluster has limited processing capabilities for cloud disk creation requests, in order to avoid affecting the cloud disk creation operation being processed, after the target cluster is determined, it will also be determined whether the target cluster meets the receiving conditions. When the target cluster meets the receiving conditions, the 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 the capacity requested by the target cloud disk creation request. The receiving conditions are the conditions that the target cluster needs to meet when creating a cloud disk based on the cloud disk creation request.
[0069] Specifically, when judging whether the target cluster meets the receiving conditions, the following methods can be used:
[0070] 2041. Obtain a second total number of cloud disk creation requests currently processed by the target cluster, and obtain a second total capacity of cloud disks applied for creation by the cloud disk creation requests currently processed by the target cluster.
[0071] In an embodiment of the present application, relevant information of the cloud disk creation requests assigned to each cluster is stored. Based on these relevant information, the cloud disk creation requests currently processed by the target cluster can be counted to obtain a second total number, and the capacity of the cloud disks applied for creation by the cloud disk creation requests currently processed by the target cluster can be counted to obtain a second total capacity.
[0072] 2042. Calculate the sum of the second total quantity and the number of target cloud disk creation requests to obtain a third total quantity, and calculate the sum of the second total capacity and the capacity of the cloud disk created by the target cloud disk creation request to obtain a third total capacity.
[0073] 2043. Determine whether the third total quantity is less than the second preset quantity, and determine whether the third total capacity is less than the 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 may be 5, 10, 20, etc. The second preset capacity is the maximum capacity of cloud disks 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, determine 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 conditions. In response to the target cluster not meeting the receiving conditions at the current moment, a backoff mechanism can be adopted to avoid a large load on the target cluster. The backoff mechanism is a dynamic backoff method. When judging for the first time, if the target cluster does not meet the receiving conditions, after waiting for the first preset time, the operation of judging whether the target cluster meets the receiving conditions is performed again. If the target cluster meets the receiving conditions, the target cloud disk creation request is sent to the target cluster. If the target cluster does not meet the receiving conditions, the second preset time is waited for, and then the operation of judging whether the target cluster meets the receiving conditions is performed again until the target cluster meets the receiving conditions or the judgment cutoff condition is met, wherein the second preset time is longer than the first preset time, that is, the waiting time increases with the increase in the number of judgments. The judgment cutoff condition is the condition that needs to be met when stopping judging whether the target cluster meets the receiving conditions, including the number of judgments reaching the number threshold, or the judgment time reaching the time threshold, etc.
[0077] Further, in response to the target cluster meeting the judgment deadline condition, a new cluster is allocated for the target cloud disk creation request. If a cloud disk creation result message returned by the allocated new cluster is received, and the cloud disk creation result message is a cloud disk creation success message, that is, the allocated new cluster can successfully create a cloud disk based on the target cloud disk creation request, then 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 in Figure 5After the target cluster is determined, the second total number of cloud disk creation requests being processed by the target cluster and the second total capacity of the cloud disk being created are obtained. If the second total number of cloud disk creation requests plus the total number of target cloud disk creation requests, that is, the third total number, is less than the second preset number, and the second total capacity of the cloud disk being created plus the capacity of the cloud disk applied for this time, that is, the third total capacity, is less than the second preset capacity, then the target cloud disk creation request is sent to the target cluster. When the 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 disk 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, the backoff mechanism is executed, and the above judgment process is initiated again after a period of time.
[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, there may be a certain deviation between the current water level of the cluster stored by the storage availability zone-level control component and the actual water level of the cluster. When the storage availability zone-level control component determines the target cluster according to the current water level of the stored 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. The target cluster will return a cloud disk creation failure message, which carries the reason for the failure of the target cluster to create the 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 the disk is that the actual water level of the target cluster is higher than the target disk creation rejection water level, the operation of allocating a new cluster for the target cloud disk creation request is executed; if the reason for the failure of the target cluster creation is non-water level reasons, the cloud disk creation operation based on the target cloud disk creation request is terminated.
[0080] Furthermore, in response to the received cloud disk creation failure message of the target cluster, in order 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, which is used to filter the obtained candidate clusters when allocating a new cluster for the target cloud disk creation request. Of course, the current water level of the target cluster will also be updated, so that operations can be performed based on the updated current water level of the target cluster in subsequent steps.
[0081] In an embodiment of the present application, the process of allocating a new cluster for a target cloud disk creation request includes: obtaining the current water levels of multiple clusters and an updated cluster blacklist, and obtaining candidate clusters from multiple clusters based on the current water levels of multiple clusters, the target disk creation rejection water level corresponding to the target disk creation type, and the updated cluster blacklist, and then selecting a new cluster from multiple candidate clusters based on the cluster allocation method 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 will also be determined whether the new cluster meets the receiving conditions. If it meets the receiving conditions, the target cloud disk creation request will be sent to the new cluster. If it does not meet the receiving conditions, the backoff mechanism will be executed, and the above judgment process will be initiated again after a period of time.
[0082] The process of allocating a new cluster for a cloud disk creation request is as follows: Figure 6 Provide detailed explanation.
[0083] See also Figure 6 When receiving a cloud disk creation failure message, 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 creation rejection water level, the target cluster identifier is added to the cluster blacklist to obtain an updated cluster blacklist, and then based on the current water levels of multiple clusters, the target disk creation rejection water level corresponding to the target disk creation type, and the updated cluster blacklist, multiple candidate clusters are obtained from multiple clusters, and it is determined whether the target disk creation type is a Burst disk creation. If it is a Burst disk creation, a new cluster is determined according to a preset allocation ratio to evenly disperse the cloud disk creation request; if it is not a Burst disk creation, the capacity factor of each candidate cluster is weighted to obtain the disk creation capacity score of each candidate cluster, and then the candidate cluster with the highest disk creation capacity score is selected as the new cluster. Before sending the cloud disk creation request to the new cluster, it will also be determined whether the new cluster meets the receiving conditions. If it meets the receiving conditions, the cloud disk creation request is sent to the new cluster in the form of an RPC request. If the new cluster returns a message indicating that the cloud disk creation failed, and the reason for the failure is that the actual water level of the new cluster is higher than the target disk creation rejection water level, the identifier of the new cluster is added to the cluster blacklist.
[0084] Furthermore, if all clusters in the distributed storage system are unable to process the cloud disk creation request, a cloud disk creation failure message is returned to the user account.
[0085] For the entire process of scheduling the above cloud disk creation request, the following will combine Figure 7 Provide detailed explanation.
[0086] See also Figure 7, the storage area level control component (Ocean) receives the cloud disk creation request of the user account and sends the cloud disk creation request to the storage availability zone level control component. The storage availability zone level control component pre-processes the cloud disk creation request, and then performs burst creation labeling (i.e., determines the target disk creation type) based on the historical disk creation record of the user account, and then determines multiple candidate clusters based on the current water level of multiple clusters, cluster blacklists, and the disk creation rejection water level corresponding to different disk creation types. Then, by judging whether the cloud disk creation request is a burst disk creation, the cluster allocation method corresponding to the cloud disk creation request is determined. If it is a burst disk creation, the target cluster is determined from multiple candidate clusters for the purpose of evenly dispersing the cloud disk creation request. If it is not a burst disk creation, the candidate cluster with the highest disk creation ability score is selected as the target cluster based on the disk creation ability score of each candidate cluster. Next, determine whether the target cluster meets the receiving conditions. If it does, send the cloud disk creation request to the target cluster in the form of an RPC request. If it does not, based on the backoff mechanism, wait for a period of time to continue judging until the target cluster meets the receiving conditions or the target cluster meets the judgment deadline conditions. For the target cluster, after receiving the cloud disk creation request, the cloud disk creation operation is executed and the 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 creation rejection water level corresponding to the cloud disk creation request, the identifier of the target cluster is added to the cluster blacklist, and based on the current water levels of multiple clusters, the updated cluster blacklist and the disk creation rejection water levels corresponding to different disk creation types, multiple candidate clusters are determined, and then by judging whether the cloud disk creation request is a burst disk creation, the cluster allocation method corresponding to the cloud disk creation request is determined. If it is a burst disk creation, a new cluster is determined from multiple candidate clusters for the purpose of evenly dispersing the cloud disk creation request. If it is not a burst disk creation, based on the disk creation capability score of each candidate cluster, the candidate cluster with the highest disk creation capability score is selected as the new cluster. Before sending the cloud disk creation request to the new cluster, it will also determine whether the new cluster meets the receiving conditions. If it meets the receiving conditions, the cloud disk creation request will be 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 creation rejection water level, the new cluster's identifier will be added to the cluster blacklist.
[0087] By adopting the method provided in the embodiment of the present application, intensive disk creation is prevented by classifying cloud disk creation requests and adopting different water level flow control scheduling logics for different disk creation types. When the cloud disk creation task is issued, the cloud disk creation task to be issued is flow controlled to alleviate the probability of overloading the capacity of a single cluster. When a single cluster is overloaded, the allocated cloud disk creation request is scheduled to a cluster with surplus capacity to prevent the single cluster from being continuously overloaded. At the level of a single cluster, self-protection is performed through an avoidance mechanism, which greatly reduces the probability of overloading the capacity of a single cluster. When all clusters are overloaded, all disk creations are rejected. In general, by adopting the method provided in the embodiment of the present application, the separation of data flow and control flow is truly achieved, the capacity overload of the cluster in the system is avoided, the performance of the cluster is improved, the normal reading and writing operations of the cluster and the cloud disk creation operations are ensured, and the user's reading and writing operation experience and the success rate of cloud disk creation are improved.
[0088] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0089] Please refer to Figure 8 , which shows a schematic diagram of the structure of a scheduling device for a cloud disk creation request provided in an embodiment of the present application. The device is applied to a distributed storage system including multiple clusters. The device can be implemented by software, hardware, or a combination of both, and becomes all or part of an electronic device. The device includes:
[0090] The first determination module 801 is used to respond to the target cloud disk creation request of the user account, and determine the target disk creation type to which the target cloud disk creation request belongs based on the historical disk creation record of the user account. Different disk creation types have different disk creation rejection water levels. The disk creation rejection water level is the maximum water level when the cluster executes the cloud disk creation operation. The water level is used to characterize the load rate of the cluster. The water level is determined according to the real-time data link QPS capacity and snapshot loading capacity of the cluster;
[0091] The acquisition module 802 is used to acquire multiple candidate clusters from multiple clusters based on the target disk creation rejection water level corresponding to the target disk creation type, the current water levels of multiple clusters, and the cluster blacklist, wherein the cluster blacklist is used to store the identifiers of clusters that failed to create a disk because the actual water level is higher than the disk creation rejection water level corresponding to the allocated cloud disk creation request;
[0092] The second determination module 803 is used to determine a target cluster from multiple candidate clusters according to the cluster allocation method corresponding to the target disk creation type;
[0093] The sending module 804 is used to send a 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 requested by the target cloud disk creation request.
[0094] In another embodiment of the present application, the first determination module 801 is used to count the number of cloud disk creation requests sent by the user account within a preset time window and the capacity of the applied cloud disk based on historical disk creation records, to obtain a first total number and a first total 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, determine 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, determine that the target disk creation type is regular disk creation.
[0095] In another embodiment of the present application, the acquisition module 802 is used to obtain, from multiple clusters, a cluster whose current water level is less than the target disk creation rejection water level based on the current water levels of multiple clusters and the target disk creation rejection water level; based on the cluster blacklist, the cluster whose current water level is less than the target disk creation rejection water level is screened to obtain multiple candidate clusters.
[0096] In another embodiment of the present application, the target disk creation type is batch disk creation, and the cluster allocation method corresponding to the batch disk creation is allocation according to a preset allocation ratio. The second determination module 803 is used to obtain the total number of cloud disk creation requests of user accounts in each cluster; based on the total number of cloud disk creation requests of user accounts, a candidate cluster that meets the preset allocation ratio is determined from multiple candidate clusters as the target cluster.
[0097] In another embodiment of the present application, the target disk creation type is regular disk creation, and the cluster allocation method corresponding to the regular disk creation is to select the cluster with the highest disk creation ability score. The second determination module 803 is used to perform weighted calculation on the disk creation ability factor of each candidate cluster to obtain the disk creation ability score of each candidate cluster, and the disk creation ability factor is a factor that affects the cluster's disk creation ability; the candidate cluster with the highest disk creation ability score is selected as the target cluster.
[0098] In another embodiment of the present application, the device further includes:
[0099] A judgment module, used to judge whether the target cluster meets the receiving condition, which is the condition that the target cluster needs to meet when creating a cloud disk based on the target cloud disk creation request;
[0100] The sending module is used to send a target cloud disk creation request to the target cluster when the target cluster meets the receiving conditions.
[0101] In another embodiment of the present application, a judgment module is used to obtain a second total number of cloud disk creation requests currently processed by the target cluster, and obtain a second total capacity of the cloud disks created by the cloud disk creation requests currently processed by the target cluster; 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 disks created by the target cloud disk creation requests to obtain a third total capacity; determine whether the third total number is less than the second preset number, and determine whether the third total capacity is less than the 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, determine that the target cluster meets the receiving conditions.
[0102] In another embodiment of the present application, the device further comprises:
[0103] A judgment module, used for, when the target cluster does not meet the receiving condition, waiting for a preset time, and then continuing to perform the operation of judging whether the target cluster meets the receiving condition, until the target cluster meets the receiving condition or the judgment cut-off condition;
[0104] A sending module, configured to send a target cloud disk creation request to the target cluster in response to the target cluster meeting the receiving condition;
[0105] The allocation module is used to allocate a new cluster for the target cloud disk creation request in response to the target cluster meeting the judgment deadline condition.
[0106] In another embodiment of the present application, the device further comprises:
[0107] A receiving module is used to receive a cloud disk creation failure message of a target cluster, where the cloud disk creation failure message carries the reason why the target cluster failed to create the disk;
[0108] The allocation module is used to allocate a new cluster for the target cloud disk creation request when the reason for the target cluster disk creation failure is that the actual water level of the target cluster is higher than the target disk creation rejection water level.
[0109] In another embodiment of the present application, the device further comprises:
[0110] The adding module is used to add the identifier of the target cluster to the cluster blacklist to obtain an updated cluster blacklist. The updated cluster blacklist is used to filter the obtained candidate clusters when allocating a new cluster 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 systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0112] Fig. 9The structure block diagram of an electronic device 900 provided by an exemplary 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 of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state; the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an artificial intelligence processor, which is used to process computing operations related to machine learning.
[0114] The memory 902 may include one or more computer-readable storage media, which may be non-temporary computer-readable storage media, for example, the non-temporary computer-readable storage media may be CD-ROM (Compact Disc Read-Only Memory), ROM, RAM (Random Access Memory), magnetic tape, floppy disk and optical data storage device, etc. The computer-readable storage medium stores at least one computer program, which can implement the scheduling method of cloud disk request when executed.
[0115] Of course, the above electronic device may also include other components, such as input / output interface, communication component, etc. The input / output interface provides an interface between the processor and the peripheral interface module, and the above peripheral interface module may be an output device, an input device, 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 will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the electronic device 900, and may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0117] An embodiment of the present application provides a computer-readable storage medium, in which at least one computer program is stored. When the at least one computer program is executed by a processor, the scheduling method for the above-mentioned cloud disk creation request can be implemented.
[0118] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it can implement the above-mentioned scheduling method for cloud disk creation requests.
[0119] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for scheduling a cloud disk creation request, characterized in that: The method is applied to a distributed storage system including multiple clusters, and the method includes: In response to a target cloud disk creation request from a user account, the target disk creation type to which the target cloud disk creation request belongs is determined based on the historical disk creation records of the user account. Different disk creation types have different disk creation rejection watermarks. The disk creation rejection watermark is the maximum watermark when the cluster performs a cloud disk creation operation. The watermark is used to characterize the load rate of the cluster. The watermark is determined according to the cluster's real-time data link request per second (QPS) capability and snapshot loading capability. Based on the target disk creation rejection water level corresponding to the target disk creation type, the current water levels of multiple clusters and a cluster blacklist, multiple candidate clusters are obtained from the multiple clusters, wherein the cluster blacklist is used to store identifiers of clusters that fail to create disks because the actual water level is higher than the disk creation rejection water level corresponding to the allocated cloud disk creation request; Determining a target cluster from the multiple candidate clusters according to a cluster allocation method 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 the capacity requested by the target cloud disk creation request.
2. The method according to claim 1, characterized in that The determining, based on the historical disk creation record of the user account, the target disk creation type to which the target cloud disk creation request belongs, includes: 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 applied cloud disk are counted to obtain a first total number and a first total capacity; When the first total quantity is greater than or equal to a first preset quantity, or the first total capacity is greater than or equal to a first preset capacity, determining 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 a regular disk creation.
3. The method according to claim 1, characterized in that The acquiring multiple candidate clusters from the multiple clusters based on the target disk creation rejection water level corresponding to the target disk creation type, the current water levels of multiple clusters, and the cluster blacklist includes: Based on the current water levels of the plurality of clusters and the target disk creation rejection water level, obtaining, from the plurality of clusters, a cluster whose current water level is less than the target disk creation rejection water level; Based on the cluster blacklist, clusters whose current water level is less than the target disk creation rejection water level are screened to obtain the multiple candidate clusters.
4. The method according to claim 1, characterized in that: The target disk creation type is batch disk creation, and the cluster allocation method corresponding to the batch disk creation is allocation according to a preset allocation ratio. The determining of the target cluster from the multiple candidate clusters according to the cluster allocation method corresponding to the target disk creation type includes: Get the total number of cloud disk creation requests allocated to each cluster; Based on the total number of cloud disk creation requests allocated to each cluster, a candidate cluster that meets the preset allocation ratio is determined from the multiple candidate clusters as the target cluster.
5. The method according to claim 1, characterized in that The target disk creation type is a conventional disk creation, and the cluster allocation method corresponding to the conventional disk creation is to select a cluster with the highest disk creation ability score. The determining of the target cluster from the multiple candidate clusters according to the cluster allocation method corresponding to the target disk creation type includes: Performing weighted calculation on the disk creation capability factor of each candidate cluster to obtain a disk creation capability score of each candidate cluster, wherein the disk creation capability factor is a factor that affects the disk creation capability of the cluster; The candidate cluster with the highest disk creation ability score is used as the target cluster.
6. The method according to any one of claims 1 to 5, characterized in that Before sending the target cloud disk creation request to the target cluster, the method further includes: Determine whether the target cluster meets a receiving condition, where 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, an operation of sending the target cloud disk creation request to the target cluster is executed.
7. The method according to claim 6, characterized in that The determining whether the target cluster meets the receiving condition includes: Obtain a second total number of cloud disk creation requests currently processed by the target cluster, and obtain a second total capacity of cloud disks applied for creation by the cloud disk creation requests currently processed by the target cluster; Calculate the sum of the second total quantity and the number of the target cloud disk creation requests to obtain a third total quantity, and calculate the sum of the second total capacity and the capacity of the cloud disk created by the target cloud disk creation request to obtain a third total capacity; Determining whether the third total quantity is less than the second preset quantity, and determining whether the third total capacity is less than the 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 according to claim 6, characterized in that The method further comprises: When the target cluster does not meet the receiving condition, after waiting for a preset time, continue to perform the operation of determining whether the target cluster meets the receiving condition until the target cluster meets the receiving condition or determines the cut-off condition; 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, a new cluster is allocated for the target cloud disk creation request.
9. The method according to any one of claims 1 to 5, characterized in that After sending the target cloud disk creation request to the target cluster, the method further includes: Receive a cloud disk creation failure message of the target cluster, where the cloud disk creation failure message carries a reason why the target cluster failed to create the disk; When the reason for the failure of the target cluster disk creation is that the actual water level of the target cluster is higher than the target disk creation rejection water level, a new cluster is allocated for the target cloud disk creation request.
10. The method according to claim 9, characterized in that Before allocating a new cluster for the target cloud disk creation request, the method further includes: The identifier of the target cluster is added to the cluster blacklist to obtain an updated cluster blacklist, and the updated cluster blacklist is used to screen the obtained candidate clusters when allocating a new cluster for the target cloud disk creation request.
11. A scheduling device for cloud disk creation request, characterized in that: The device is applied to a distributed storage system including multiple clusters, and the device includes: The first determination module is used to respond to the target cloud disk creation request of the user account, and determine the target disk creation type to which the target cloud disk creation request belongs based on the historical disk creation record of the user account. Different disk creation types have different disk creation rejection water levels. The 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 characterize the load rate of the cluster. The water level is determined according to the real-time data link QPS capacity and snapshot loading capacity of the cluster; an acquisition module, configured to acquire multiple candidate clusters from the multiple clusters based on a target disk creation rejection water level corresponding to the target disk creation type, current water levels of multiple clusters, and a cluster blacklist, wherein the cluster blacklist is used to store identifiers of clusters that fail to create a disk because the actual water level is higher than the disk creation rejection water level corresponding to the allocated cloud disk creation request; A second determination module is used to determine a target cluster from the multiple candidate clusters according to a cluster allocation method corresponding to the target disk type; The sending module is used 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 by the target cloud disk creation request.
12. An electronic device, characterized in that: It includes 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 scheduling method for cloud disk creation request as described 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 when the at least one computer program is executed by the processor, it can implement the scheduling method for cloud disk creation request according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it can implement the scheduling method for cloud disk creation request according to 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
Cloud disk mounting quantity scheduling method, system and device and storage medium
CN114697331A
Method and apparatus for allocating server resource, electronic device and storage medium
US20210218690A1
Cited By
Resource scheduling method, distributed storage system, electronic device and storage medium
WO2026200037A1