Task processing method, device and electronic equipment of cloud system
By configuring intermediate nodes in the cloud system to schedule data writing tasks and update storage node distribution rules, the problem of service interruption when the storage nodes of the cloud system are expanded is solved, non-intrusive expansion and exception handling are achieved, and user experience and system availability are improved. .
Patent Information
- Application Number
- CN202410599730.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing cloud systems require manual intervention when expanding storage nodes, causing service interruptions and affecting user experience, and do not support insensitive expansion.
By configuring intermediate nodes to schedule data writing tasks, and updating storage node distribution rules according to load balancing policies, storage cluster expansion can be achieved without manual intervention and online without service interruption, ensuring that the expansion process is imperceptible to users.
It realizes the insensitive expansion of cloud system storage clusters, avoids service interruptions, improves user experience, and handles abnormal storage nodes through erasure coding and virtual IP technology to ensure the normality of data reading and writing.
Smart Images

Figure CN118170552B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud technology, and in particular to a task processing method, device and electronic device for a cloud system. Background Art
[0002] Cloud storage is a major service model of cloud systems. It refers to a large number of storage nodes in the network working together to provide data writing and data reading services to the outside world.
[0003] Some existing cloud systems, such as MinIO, do not support seamless expansion of storage nodes within the storage cluster and can only be done by stopping the service and manually intervening. This approach leads to interruption of cloud storage services, which in turn affects the user experience. Summary of the invention
[0004] The embodiments of the present application provide a task processing method, device, electronic device and storage medium, which can expand the storage cluster of a cloud system without manual intervention and without online service interruption. The expansion process is imperceptible to the user and will not affect the user experience.
[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] In the first aspect, a task processing method of a cloud system is proposed, comprising:
[0007] For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each storage cluster includes at least one storage node; each storage cluster does not support seamless expansion within the cluster, and includes at least one storage node;
[0008] In the case where the storage cluster of the cloud system needs to be expanded, determining the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node;
[0009] The data writing tasks of the cloud system are scheduled through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0010] In a second aspect, a task processing device of a cloud system is proposed, comprising:
[0011] A configuration module, configured to configure an intermediate node for scheduling data writing tasks for at least one storage cluster of the cloud system; each storage cluster includes at least one storage node; each storage cluster does not support seamless expansion within the cluster and includes at least one storage node;
[0012] An update module, used for determining the storage node distribution rule corresponding to the expansion of the cloud system when the storage cluster of the cloud system needs to be expanded, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node;
[0013] The distribution module is used to schedule the data writing tasks of the cloud system through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0014] In a third aspect, an electronic device is provided, comprising: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor performs the following operations:
[0015] For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each of the storage clusters does not support seamless expansion within the cluster and includes at least one storage node;
[0016] In the case where the storage cluster of the cloud system needs to be expanded, determining the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node;
[0017] The data writing tasks of the cloud system are scheduled through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device performs the following operations:
[0019] For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each of the storage clusters does not support seamless expansion within the cluster and includes at least one storage node;
[0020] In the case where the storage cluster of the cloud system needs to be expanded, determining the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node;
[0021] The data writing tasks of the cloud system are scheduled through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0022] In an embodiment of the present application, for at least one storage cluster of the cloud system that does not support seamless expansion within the cluster, an intermediate node that is only used to schedule data writing tasks is configured, and the intermediate node is configured with a storage node distribution rule of a load balancing strategy to distribute the data writing task to a relatively idle storage node in accordance with the storage node distribution rule to complete the data writing. In the case where it is necessary to expand the storage cluster of the cloud system, the corresponding storage node distribution rule after the expansion of the cloud system is determined, and it is only necessary to update the corresponding storage node distribution rule after the expansion to the intermediate node, so that the storage cluster of the cloud system can be expanded without manual intervention and without online service interruption. The expansion process is imperceptible to the user, and will not affect the user experience. In addition, for the data that has been written, the cloud system still follows the traditional method, skipping the intermediate node and connecting directly to the corresponding storage node to complete the reading, which will not affect the normal reading of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0024] Figure 1 This is a first flow chart of the task processing method of the cloud system according to an embodiment of the present application.
[0025] Figure 2 This is a schematic diagram of the application of the task processing method of the cloud system according to an embodiment of the present application in the cloud system.
[0026] Figure 3 This is a second flow chart of the task processing method of the cloud system according to an embodiment of the present application.
[0027] Figure 4 This is a third flow chart of the task processing method of the cloud system according to an embodiment of the present application.
[0028] Figure 5 This is a fourth flow chart of the task processing method of the cloud system according to an embodiment of the present application.
[0029] Figure 6 A schematic diagram of the structure of a task processing device of a cloud system according to an embodiment of the present application.
[0030] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] As mentioned above, some existing cloud systems can only shut down services for manual intervention when storage nodes need to be expanded. This method causes cloud storage service interruptions, which in turn affects the user experience.
[0032] In view of this, this application aims to propose a task processing solution for a cloud system that can
[0033] Without changing the existing service model of the cloud system, the storage cluster can be expanded without manual intervention and without service interruption.
[0034] In order to make the purpose, technical solutions and advantages of this document clearer, the technical solutions of this application will be clearly and completely described below in combination with the specific embodiments of this application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this document, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this document.
[0035] An embodiment of the present application provides a task processing method for a cloud system. Figure 1 It is a flowchart of the task processing method, including:
[0036] S102, for at least one storage cluster of the cloud system, configure an intermediate node for scheduling data writing tasks; each storage cluster includes at least one storage node; each storage cluster does not support seamless expansion within the cluster, and includes at least one storage node.
[0037] The cloud system of this embodiment will be configured with no less than one storage cluster that does not support seamless expansion within the cluster, and each storage cluster contains multiple storage nodes to ensure high availability of data writing tasks and data reading tasks. It should be understood that the data writing task mentioned here refers to writing new data to a storage node of a storage cluster; the data reading task mentioned here refers to reading the written specified data from a specified storage node or nodes.
[0038] Specifically, the intermediate node of this embodiment is only used to schedule the data writing task of the cloud system, and the data reading task of the cloud system is not handled by the intermediate node. That is, the cloud system skips the intermediate node and directly connects to each storage cluster storage node for data reading task for distribution.
[0039] S104, when it is necessary to expand the storage cluster of the cloud system, determine the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node.
[0040] S106, scheduling the data writing task of the cloud system through the intermediate node, based on the load balancing strategy, distributes the target data writing task of the cloud system to the corresponding storage node according to the updated storage node distribution rule to complete the data writing.
[0041] The load balancing strategy of this embodiment may include: load balancing at the storage cluster level and load balancing at the storage node level in a single storage cluster. The former is to determine a relatively idle storage cluster among multiple storage clusters in the cloud system to be responsible for processing the target data writing task; the latter is to determine one or more relatively idle storage nodes among multiple storage nodes in a storage cluster to be responsible for processing the target data writing task.
[0042] It should be understood that this embodiment will not distribute the target data writing task to the abnormal storage node for data writing according to the updated storage node distribution rule, which is equivalent to automating the abnormal data node to avoid the influence of the abnormal data node on the data writing task.
[0043] In addition, for data reading tasks, if a storage node is determined to be an abnormal storage node due to reasons such as insufficient remaining space in the storage cluster to which it belongs, overload of the storage cluster, or insufficient remaining processing resources of the node, it will not affect normal data reading. Therefore, the data reading task can still be processed normally.
[0044] In summary, the method of this embodiment configures an intermediate node that is only used to schedule data writing tasks for at least one storage cluster of the cloud system that does not support seamless expansion within the cluster. The intermediate node is configured with a storage node distribution rule of a load balancing strategy to distribute data writing tasks to relatively idle storage nodes according to the storage node distribution rule to complete data writing. In the case where it is necessary to expand the storage cluster of the cloud system, the corresponding storage node distribution rule after the expansion of the cloud system is determined, and it is only necessary to update the corresponding storage node distribution rule after the expansion to the intermediate node, so that the storage cluster of the cloud system can be expanded without manual intervention and without online service interruption. The expansion process is imperceptible to the user, and will not affect the user experience. In addition, for the data that has been written, the cloud system still follows the traditional method of skipping the intermediate node and directly connecting to the corresponding storage node to complete the reading, which will not affect the normal reading of data.
[0045] In addition, based on the cloud system realizing dynamic expansion of the storage cluster for data writing tasks through intermediate nodes, this embodiment can further introduce online processing measures for abnormal storage nodes, which can eliminate the impact of abnormal storage nodes in the event of service interruption.
[0046] Specifically, this embodiment monitors at least one storage cluster of the cloud system that does not support seamless capacity expansion within the cluster to determine abnormal storage nodes from multiple storage nodes of the storage cluster; then, the abnormal storage node is removed from the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the removal.
[0047] In order to realize the automatic processing of abnormal storage nodes, the cloud system must first be able to actively identify which storage nodes are abnormal storage nodes.
[0048] As one of the implementation methods, the cloud system can actively monitor the overall status of each storage cluster, so as to determine abnormal storage nodes based on whether the storage cluster can provide services normally. For example, the overall space usage of each storage cluster is monitored to determine the storage cluster with insufficient remaining space, and all storage nodes in the storage cluster with insufficient remaining space are determined as abnormal storage nodes. For another example, the overall load of each storage cluster (such as IO throughput, number of network connections, and data distribution) is monitored to determine the overloaded storage cluster, and all storage nodes in the overloaded storage cluster are determined as abnormal storage nodes.
[0049] As another implementation method, the cloud system can also actively monitor each storage node in the storage cluster, so as to determine abnormal storage nodes based on whether the storage node can provide services normally. For example, the processing resource usage (such as CPU usage, memory usage, etc.) of the storage nodes in each storage cluster is monitored to determine the storage nodes with insufficient remaining processing resources, and the storage nodes with insufficient remaining processing resources are determined as abnormal storage nodes. For another example, the operating status of at least one storage node in the storage cluster is monitored to determine the storage nodes with operating failures in at least one storage cluster, and the storage nodes with operating failures are determined as abnormal storage nodes.
[0050] In addition, if a storage node is determined to be an abnormal storage node due to its own operation failure, the data reading task cannot be processed because the data cannot be read normally. For such abnormal storage nodes with operation failures, this embodiment can use virtual IP technology + erasure coding technology to solve the problem that the data reading task cannot be processed.
[0051] Among them, the erasure code technology is a data redundancy scheme that can split the original data into a certain number of data fragments, and allow the original data to be restored based on the remaining data fragments when a part of the data fragments are lost. Here, the target data writing task is taken as an example. This embodiment can first split the write data corresponding to the target data writing task into data fragments greater than a preset number based on the erasure code technology. The preset number is the minimum number requirement for the erasure code technology to restore the data fragments. Afterwards, based on the load balancing strategy, according to the updated storage node distribution rule, a relatively idle target storage cluster and a relatively idle first storage node in the target storage cluster are determined from the cloud system, and the first storage node corresponds to the data fragment of the write data one by one. Next, for each data fragment of the write data, a corresponding data write request is generated and submitted to the corresponding first storage node in the target server cluster to complete the data writing. Finally, the write evidence of the write data is recorded, and the write evidence indicates each data fragment of the write data and the corresponding first storage node.
[0052] In addition, the virtual IP technology is to configure a virtual IP for a network object so as to access the network object through the virtual IP. Correspondingly, this embodiment can configure a virtual IP for a storage node based on the virtual IP technology, and for an abnormal storage node with a running failure, after it is removed from the storage cluster to which it belongs, its virtual IP can be drifted to other normal storage nodes in the storage cluster to which it belongs.
[0053] In the case of the combination of the above-mentioned virtual IP technology + erasure code technology, when a certain target data reading task needs to read data from an abnormal storage node with a running fault, first determine all the second storage nodes where the data fragments of the read data are written based on the write evidence of the read data corresponding to the target data reading task. Afterwards, a corresponding data read request is generated for a preset number of data fragments of the read data, and submitted to the corresponding second storage node to complete the data reading. Since the virtual IP of the abnormal storage node with a running fault has drifted to other storage nodes in the cluster, the data read request of the abnormal storage node is processed by other second storage nodes, and finally all the read data fragments are restored to the read data through the erasure code technology. That is, even if the abnormal storage node fails to run, the cloud system of this embodiment can normally provide the reading of the internal data of the abnormal storage node.
[0054] It should be noted that erasure coding technology can restore the read data without extracting all the data fragments. Therefore, as a preferred solution, this embodiment can determine a preset number of relatively idle target second storage nodes from all second storage nodes based on the load balancing strategy; then, for the data fragments of the target second storage nodes of the read data, a corresponding data read request is generated and submitted to the corresponding target second storage node to complete the data reading.
[0055] In addition, this implementation can also add the restored abnormal storage nodes back to the storage cluster to which they belong, and update the storage node distribution rules for data writing tasks in the intermediate nodes after re-addition, thereby realizing the in-service capacity expansion of the cloud system for the restored storage nodes.
[0056] The method of this embodiment is described in detail below in conjunction with an application example of a cloud system.
[0057] refer to Figure 2 As shown, the cloud system of this embodiment is provided with multiple storage clusters, such as storage clusters 1, 2, ... n. Each storage cluster is composed of multiple storage nodes, and these storage nodes are allocated virtual IP addresses through Virtual IP (a virtual IP technology). In addition, the storage cluster implements IP load balancing and failover through Keepalived (an open source lightweight high availability solution).
[0058] In addition, the cloud system also configures the following services:
[0059] The monitoring service is used to monitor each storage cluster. The monitoring objects include the overall status of the storage cluster and the status of the storage nodes in the storage cluster.
[0060] The proxy service is used to connect the client and the storage cluster. As a load balancer, the proxy service is configured with storage node distribution rules for data writing tasks. It can distribute the data writing tasks submitted by the client to the relatively idle storage nodes in the backend for processing according to the storage node distribution rules, and return the processed response to the client.
[0061] In addition, for the data reading task submitted by the client, since it has been pointed to a specific storage node, the data reading task of the client can be submitted to the corresponding storage node.
[0062] Correspondingly, the processing flow for data writing tasks can be subdivided into: the process of eliminating abnormal storage clusters / abnormal storage nodes, and the process of expanding the capacity of new storage clusters.
[0063] On the one hand, the process of removing abnormal storage clusters / abnormal storage nodes is as follows: Figure 3 As shown, including:
[0064] A1: The monitoring service continuously monitors the storage cluster that does not support seamless capacity expansion within the cluster and no abnormal storage nodes are found.
[0065] A2, based on the proxy service receiving the first batch of data writing tasks submitted by the client, distributes the first batch of data access tasks to relatively idle storage nodes according to the current storage node distribution rules of the proxy service, so as to write data according to the erasure coding technology.
[0066] A3, after the data is written, the proxy service generates the write credentials corresponding to the first batch of data access tasks (indicating each data segment with written data and the storage node to which it is written), and feeds the write credentials back to the client.
[0067] A4: Based on the monitoring service, the storage cluster that does not support seamless capacity expansion within the cluster is continuously monitored to identify abnormal storage nodes.
[0068] Based on the above, this step can use the following strategy to find abnormal storage nodes:
[0069] 1) The overall space usage of each storage cluster is monitored to determine the storage cluster with insufficient remaining space, and all storage nodes in the storage cluster with insufficient remaining space are determined as abnormal storage nodes.
[0070] 2) Monitor the overall load of each storage cluster (such as IO throughput, number of network connections, and data distribution) to identify the overloaded storage cluster, and identify all storage nodes in the overloaded storage cluster as abnormal storage nodes.
[0071] 3) Monitor the processing resource usage (such as CPU usage, memory usage, etc.) of the storage nodes in each storage cluster to identify the storage nodes with insufficient remaining processing resources, and identify the storage nodes with insufficient remaining processing resources as abnormal storage nodes
[0072] 4) Monitoring the operation status of at least one storage node of the storage cluster to determine a storage node with a fault in at least one storage cluster, and determining the storage node with a fault as an abnormal storage node.
[0073] A5, remove the abnormal storage node from the storage cluster to which it belongs, and update the storage node distribution rule configured locally by the proxy service (intermediate node) after the removal to maintain the continuous availability of the data writing service.
[0074] A6, based on the proxy service, distributes the second batch of data access tasks to relatively idle storage nodes according to the updated storage node distribution rules, so as to write data according to the erasure coding technology.
[0075] A7, after the data is written, the proxy service generates the write credentials corresponding to the second batch of data access tasks and feeds the write credentials back to the client.
[0076] On the other hand, the expansion process of the new storage cluster is as follows Figure 4 As shown, including:
[0077] B1: Based on the monitoring service, the storage cluster that does not support seamless expansion within the cluster is continuously monitored, and no abnormal storage nodes are found.
[0078] B2, based on the proxy service receiving the first batch of data writing tasks submitted by the client, distributes the first batch of data access tasks to relatively idle storage nodes according to the current storage node distribution rules of the proxy service, so as to write data according to the erasure coding technology.
[0079] B3, after the data is written, the proxy service generates the write credentials corresponding to the first batch of data access tasks (indicating each data fragment with written data and the storage node to which it is written), and feeds the write credentials back to the client.
[0080] B4, based on the monitoring service, continuously monitors the storage cluster that does not support seamless capacity expansion within the cluster, and determines that all storage nodes in the original storage cluster are abnormal storage nodes.
[0081] Based on the above, when the remaining space of the original storage cluster is insufficient or the original storage cluster is overloaded, all storage nodes in the original storage cluster may be determined as abnormal storage nodes.
[0082] B5, create a new storage cluster, and remove all storage nodes in the original storage cluster from the storage cluster to which they belong, and then update the storage node distribution rules configured locally by the proxy service for the storage nodes in the new storage cluster to maintain the continuous availability of the data writing service.
[0083] B6, based on the proxy service, distributes the second batch of data access tasks to relatively idle storage nodes in the new storage cluster according to the updated storage node distribution rules, so as to write data according to the erasure coding technology.
[0084] B7, after the data is written, the proxy service generates the write credentials corresponding to the second batch of data access tasks and feeds back the write credentials to the client.
[0085] In addition, the processing flow for data reading tasks is as follows Figure 5 As shown, including:
[0086] C1: Based on the monitoring service, the storage cluster that does not support seamless expansion within the cluster is continuously monitored, and no abnormal storage nodes are found.
[0087] C2 receives the first batch of data reading tasks submitted by the client, and determines the storage node where the read data is written based on the write credentials of the read data of the first batch of data reading tasks;
[0088] C3 submits the first batch of data reading tasks to the storage node specified by the write voucher for data reading, and uses erasure coding technology to restore the read data fragments back to the complete read data to feed back to the client.
[0089] C4, based on the monitoring service, continuously monitors the storage cluster that does not support seamless expansion within the cluster to identify abnormal storage nodes.
[0090] C5, remove the abnormal storage node from the storage cluster to which it belongs, and update the storage node distribution rule configured locally by the proxy service after the removal.
[0091] C6, receiving the second batch of data reading tasks submitted by the client, and determining the storage node where the read data is written according to the write credentials of the read data of the second batch of data reading tasks.
[0092] C7, determine whether the storage node where the read data is written is an abnormal storage node with a running fault; if yes, execute C8; if not, execute C9.
[0093] C8, based on keepalived+Virtual IP technology, drifts the virtual IP of the abnormal storage node with read data to other storage nodes for distribution, and uses erasure coding technology to restore the read data fragments back to the complete read data to feed back to the client.
[0094] C9 directly submits the first batch of data reading tasks to the storage node specified by the write voucher for data reading, and uses erasure coding technology to restore the read data fragments back to the complete read data to feed back to the client.
[0095] On the other hand, for Figure 1 In addition to the method shown, an embodiment of the present application also provides a task processing device for a cloud system. Figure 6 The structural diagram of the task processing device 600 includes:
[0096] Configuration module 610 is used to configure an intermediate node for scheduling data writing tasks for at least one storage cluster of the cloud system; each of the storage clusters does not support seamless expansion within the cluster and includes at least one storage node
[0097] The updating module 620 is used to determine the storage node distribution rules corresponding to the expansion of the cloud system when the storage cluster of the cloud system needs to be expanded, so as to update the storage node distribution rules corresponding to the expansion to the intermediate nodes.
[0098] The distribution module 630 is used to schedule the data writing tasks of the cloud system through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0099] The device of this embodiment configures an intermediate node that is only used to schedule data writing tasks for at least one storage cluster of the cloud system that does not support seamless expansion within the cluster. The intermediate node is configured with a storage node distribution rule of a load balancing strategy to distribute data writing tasks to relatively idle storage nodes in accordance with the storage node distribution rule to complete data writing. In the case where it is necessary to expand the storage cluster of the cloud system, the corresponding storage node distribution rule after the expansion of the cloud system is determined, and it is only necessary to update the corresponding storage node distribution rule after the expansion to the intermediate node, so that the storage cluster of the cloud system can be expanded without manual intervention and without online service interruption. The expansion process is imperceptible to the user and will not affect the user experience. In addition, for the data that has been written, the cloud system still follows the traditional method of skipping the intermediate node and directly connecting to the corresponding storage node to complete the reading, which will not affect the normal reading of data.
[0100] Optionally, the device of this embodiment further includes:
[0101] An exception handling module is used to monitor at least one of the storage clusters of the cloud system to determine abnormal storage nodes from multiple storage nodes of the storage cluster; and to remove the abnormal storage node from the storage cluster to which it belongs, and update the storage node distribution rule of the intermediate node after the removal.
[0102] Optionally, the exception handling module monitors at least one of the storage clusters of the cloud system to determine abnormal storage nodes from multiple storage nodes of the storage cluster, including: monitoring the space usage of at least one of the storage clusters of the cloud system to determine the storage cluster with insufficient remaining space, and determining all storage nodes in the storage cluster with insufficient remaining space as the abnormal storage nodes; monitoring the load of at least one of the storage clusters of the cloud system to determine the overloaded storage cluster, and determining all storage nodes in the overloaded storage cluster as the abnormal storage nodes; monitoring the processing resource usage of the storage nodes of at least one of the storage clusters of the cloud system to determine the storage nodes with insufficient remaining processing resources, and determining the storage nodes with insufficient remaining processing resources as the abnormal storage nodes; monitoring the operating status of the storage nodes of at least one of the storage clusters of the cloud system to determine the storage nodes with operating failures, and determining the storage nodes with operating failures as the abnormal storage nodes.
[0103] Optionally, the distribution module 630 distributes the target data write task of the cloud system to the corresponding storage node based on the load balancing strategy and in accordance with the updated storage node distribution rule to complete data writing, including: based on the erasure code technology, splitting the write data corresponding to the target data write task into data segments greater than a preset number; the preset number is the minimum number requirement for the erasure code technology to restore the data segments; based on the load balancing strategy and in accordance with the hot-updated storage node distribution rule, determining the target storage cluster and the first storage node in the target storage cluster from the cloud system; wherein the first storage node corresponds one-to-one to the data segment of the write data; for each data segment of the write data, generating a corresponding data write request and submitting it to the corresponding first storage node in the target server cluster to complete data writing; recording the write evidence of the write data, the write evidence indicating each data segment of the write data and the corresponding first storage node.
[0104] Optionally, if the abnormal storage node is a storage node with an operation failure, the update module 620 is further configured to: drift the virtual IP of the abnormal storage node to other storage nodes in the storage cluster after removing the abnormal storage node from the storage cluster to which it belongs.
[0105] Optionally, the distribution module 630 is also used to: determine all second storage nodes where data fragments of the read data are written based on the write evidence of the read data corresponding to the target data reading task of the cloud system; generate corresponding data read requests for a preset number of data fragments of the read data, and submit them to the corresponding second storage nodes to complete the data reading, so as to restore the read data fragments back to the read data based on the erasure coding technology.
[0106] Optionally, the update module 620, after removing the abnormal storage node from the storage cluster to which it belongs and updating the storage node distribution rules of the intermediate node after the removal, is also used to: add the abnormal storage node that has returned to normal back to the storage cluster to which it belongs, and update the storage node distribution rules of the intermediate node after the re-addition.
[0107] It should be understood that the task processing device of the embodiment of the present application can be used as Figure 1 The execution subject of the method shown can thus realize Figure 1 The steps and functions of the method shown.
[0108] Figure 7 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 7 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0109] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0110] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0111] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming the task processing device of the above cloud system at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0112] For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each of the storage clusters does not support seamless capacity expansion within the cluster and includes at least one storage node.
[0113] In the case where the storage cluster of the cloud system needs to be expanded, the storage node distribution rule corresponding to the expanded cloud system is determined, so as to update the storage node distribution rule corresponding to the expanded storage system to the intermediate node.
[0114] The data writing tasks of the cloud system are scheduled through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0115] The above application Figure 1The method disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in one or more embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with one or more embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0116] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0117] The present application also provides a computer-readable storage medium that stores one or more programs. The one or more programs include instructions that, when executed by a portable electronic device that includes multiple application programs, enable the portable electronic device to execute Figure 1 The method of the embodiment shown is specifically used to perform the following operations:
[0118] For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each storage cluster includes at least one storage node; each storage cluster does not support seamless expansion within the cluster and includes at least one storage node.
[0119] In the case where the storage cluster of the cloud system needs to be expanded, the storage node distribution rule corresponding to the expanded cloud system is determined, so as to update the storage node distribution rule corresponding to the expanded storage system to the intermediate node.
[0120] The data writing tasks of the cloud system are scheduled through the intermediate node, so as to distribute the target data writing tasks of the cloud system to the corresponding storage nodes based on the load balancing strategy and in accordance with the updated storage node distribution rules to complete the data writing.
[0121] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present application shall be included in the protection scope of one or more embodiments of the present application.
[0122] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0123] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0124] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0125] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A task processing method for a cloud system, characterized in that: include: For at least one storage cluster of the cloud system, configure an intermediate node for scheduling data writing tasks; Each of the storage clusters does not support seamless capacity expansion within the cluster and includes at least one storage node; In the case where the storage cluster of the cloud system needs to be expanded, determining the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node; Scheduling the data writing task of the cloud system through the intermediate node, so as to distribute the target data writing task of the cloud system to the corresponding storage node based on the load balancing strategy and in accordance with the updated storage node distribution rule, so as to complete the data writing; Monitoring at least one of the storage clusters of the cloud system to determine an abnormal storage node from a plurality of storage nodes of the storage cluster; The abnormal storage node is removed from the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the removal; and the abnormal storage node that has returned to normal is added back to the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the re-addition; The intermediate node does not schedule the data reading task of the corresponding storage node before the expansion.
2. The method according to claim 1, characterized in that Monitoring at least one storage cluster of the cloud system to determine an abnormal storage node from a plurality of storage nodes of the storage cluster includes: Monitoring the space usage of at least one storage cluster of the cloud system to determine the storage cluster with insufficient remaining space, and determining all storage nodes in the storage cluster with insufficient remaining space as abnormal storage nodes; Monitoring the load of at least one storage cluster of the cloud system to determine an overloaded storage cluster, and determining all storage nodes in the overloaded storage cluster as abnormal storage nodes; Monitoring the processing resource usage of storage nodes of at least one storage cluster of the cloud system to determine storage nodes with insufficient remaining processing resources, and determining the storage nodes with insufficient remaining processing resources as the abnormal storage nodes; The operation status of at least one storage node of the storage cluster of the cloud system is monitored to determine a storage node with an operation failure, and the storage node with an operation failure is determined as the abnormal storage node.
3. The method according to claim 2, characterized in that Based on the load balancing strategy, according to the updated storage node distribution rule, the target data writing task of the cloud system is distributed to the corresponding storage node to complete the data writing, including: Based on the erasure coding technology, the write data corresponding to the target data write task is split into data fragments greater than a preset number; the preset number is the minimum number requirement for the erasure coding technology to restore the data fragments; Based on the load balancing strategy, according to the updated storage node distribution rule, a target storage cluster and a first storage node in the target storage cluster are determined from the cloud system; wherein the first storage node has a one-to-one correspondence with the data fragments of the written data; For each data segment of the write data, a corresponding data write request is generated, and submitted to the first storage node corresponding to the target storage cluster to complete the data writing; Record a write evidence of the write data, where the write evidence indicates each data fragment of the write data and the corresponding first storage node.
4. The method according to claim 3, characterized in that If the abnormal storage node is a storage node with an operation failure, after removing the abnormal storage node from the storage cluster to which it belongs, the method further includes: The virtual IP address of the abnormal storage node is moved to other storage nodes in the storage cluster.
5. The method according to claim 4, characterized in that Also includes: Based on the write evidence of the read data corresponding to the target data read task of the cloud system, determine all second storage nodes where the data fragments of the read data are written; A corresponding data read request is generated for a preset number of data segments of the read data, and submitted to the corresponding second storage node to complete the data reading, so as to restore the read data segments back to the read data based on the erasure coding technology.
6. A task processing device for a cloud system, characterized in that: include: A configuration module, configured to configure an intermediate node for scheduling data writing tasks for at least one storage cluster of the cloud system; Each storage cluster includes at least one storage node; Each of the storage clusters does not support seamless capacity expansion within the cluster and includes at least one storage node; An update module is used to determine the storage node distribution rule corresponding to the expansion of the cloud system when it is necessary to expand the storage cluster of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node; and monitor at least one of the storage clusters of the cloud system to determine abnormal storage nodes from multiple storage nodes of the storage cluster; Eliminate the abnormal storage node from the storage cluster to which it belongs, and update the storage node distribution rule of the intermediate node after the elimination; A distribution module, used to schedule the data writing task of the cloud system through the intermediate node, so as to distribute the target data writing task of the cloud system to the corresponding storage node based on the load balancing strategy and in accordance with the updated storage node distribution rule, so as to complete the data writing; And, the abnormal storage node that has returned to normal is added back to the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the re-addition; the intermediate node does not schedule the data reading task of the corresponding storage node before the expansion.
7. An electronic device comprising: processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to perform the following operations: For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each of the storage clusters does not support seamless expansion within the cluster and includes at least one storage node; In the case where the storage cluster of the cloud system needs to be expanded, determining the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node; Scheduling the data writing task of the cloud system through the intermediate node, so as to distribute the target data writing task of the cloud system to the corresponding storage node based on the load balancing strategy and in accordance with the updated storage node distribution rule, so as to complete the data writing; At least one of the storage clusters of the cloud system is monitored to identify abnormal storage nodes from multiple storage nodes of the storage cluster; the abnormal storage node is removed from the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the removal; and the abnormal storage node that has returned to normal is added back to the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the re-addition; the intermediate node does not schedule the data reading task of the corresponding storage node before the expansion.
8. A computer-readable storage medium storing one or more programs, characterized in that: When the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device performs the following operations: For at least one storage cluster of the cloud system, an intermediate node for scheduling data writing tasks is configured; each of the storage clusters does not support seamless expansion within the cluster and includes at least one storage node; In the case where the storage cluster of the cloud system needs to be expanded, determining the storage node distribution rule corresponding to the expansion of the cloud system, so as to update the storage node distribution rule corresponding to the expansion to the intermediate node; Scheduling the data writing task of the cloud system through the intermediate node, so as to distribute the target data writing task of the cloud system to the corresponding storage node based on the load balancing strategy and in accordance with the updated storage node distribution rule, so as to complete the data writing; Monitoring at least one of the storage clusters of the cloud system to determine an abnormal storage node from a plurality of storage nodes of the storage cluster; The abnormal storage node is removed from the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the removal; and the abnormal storage node that has returned to normal is added back to the storage cluster to which it belongs, and the storage node distribution rule of the intermediate node is updated after the re-addition; the intermediate node does not schedule the data reading task of the corresponding storage node before the expansion.
Citation Information
Patent Citations
Cloud platform data storage method and device
CN106648471A
Erasure code algorithm redundancy determination method and block chain node
CN114710238A
Data distributed storage management system oriented to edge device
CN115733848A
Method for solving expansion performance and stability of Hadoop cluster
CN115904242A
Data encryption storage method and system based on block chain
CN117633843A
