IO request processing method, device, electronic device and computer readable medium
By cloning and redirecting IO requests in the storage cluster, the IO request delay problem caused by a single point of network failure is solved, and low latency response and high availability are achieved for enterprise-level user services.
Patent Information
- Application Number
- CN202110172628.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-02-08
AI Technical Summary
When a single network failure occurs within the storage cluster, the delay in processing IO requests is long, resulting in user service stuttering or timeout interruption, which cannot meet the needs of enterprise-level users for low-latency response.
By cloning the original IO request, the first IO request and the second IO request are obtained and sent to other storage nodes in the storage cluster for processing, thereby actively controlling the delay of the IO request.
It realizes a rapid response to IO requests for computing nodes, solves the problem of user service damage caused by single point failure in the network within the storage cluster, and meets users' demands for low latency high-availability indicators.
Smart Images

Figure CN113419669B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to an input / output (IO) request processing method, device, electronic device, and computer-readable medium. Background Art
[0002] Enterprise users usually have high requirements for the availability and performance of distributed storage, especially for availability indicators (including latency, data consistency, fault self-healing rate, etc.). At present, mainstream manufacturers can well guarantee availability indicators such as data consistency and fault self-healing rate. However, there is a lack of effective solutions for low latency indicators. The more common failure is single point failure of the network, which often causes user service timeout or even interruption, and does not meet the current strong demand of enterprise users for low latency response.
[0003] When a single point of network failure occurs within the storage cluster, the computing node is relied upon to initiate an IO (Input / Output) retry or send an IO termination command / resume IO request. The IO response delay to the computing node cannot be guaranteed, which often causes user business to be stuck or even timed out. Summary of the invention
[0004] The purpose of the present application is to propose an IO request processing method, device, electronic device and computer-readable medium, which are used to solve the technical problem in the prior art that when a single point of network failure occurs within a storage cluster, the processing delay of IO requests is long.
[0005] According to a first aspect of an embodiment of the present application, there is provided an IO request processing method, which is applied to a first storage node in a distributed storage cluster, comprising:
[0006] Receiving an original IO request sent by a computing node, cloning the original IO request to obtain a first IO request;
[0007] If a response to the first IO request is received when a first timeout period corresponding to the original IO request is reached, the response to the first IO request is sent to the computing node;
[0008] If no response to the first IO request is received when the first timeout period arrives, cloning the original IO request to obtain a second IO request;
[0009] The second IO request is sent to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes, and the response to the second IO request is sent to the computing node.
[0010] According to a second aspect of an embodiment of the present application, an IO request processing device is provided, which is applied to a first storage node in a distributed storage cluster, including:
[0011] An IO request cloning module, used for receiving an original IO request sent by a computing node, cloning the original IO request to obtain a first IO request;
[0012] A first return sending module, configured to send the return of the first IO request to the computing node if a return of the first IO request is received when a first timeout period corresponding to the original IO request is reached;
[0013] An IO request sending module is used to clone the original IO request to obtain a second IO request if no response to the first IO request is received when the first timeout period arrives; and send the second IO request to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes;
[0014] The second return sending module is used to send a return for the second IO request to the computing node.
[0015] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0016] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the IO request processing method as described in the first aspect of the above embodiment.
[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the IO request processing method described in the first aspect of the above embodiment is implemented.
[0018] The IO request processing method of the embodiment of the present application, when a single point of network failure occurs within the storage cluster, clones the original IO request and sends the cloned IO request to other storage nodes within the storage cluster for processing by other storage nodes, thereby actively controlling the latency of the IO request. The present application fully utilizes the advantages of distributed storage multi-node services to achieve rapid response to computing node service IO requests, solves the problem of user service damage caused by single point of network failure within the storage cluster, and meets users' demands for low latency and high availability indicators. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0020] Figure 1 A schematic diagram of a single point network failure in the related art causing damage to user services;
[0021] Figure 2 A flow chart of an IO request processing method in an embodiment of the present application;
[0022] Figure 3 This is another flow chart of the IO request processing method in the embodiment of the present application;
[0023] Figure 4 A schematic diagram of a scenario of an IO request processing method in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of a scenario of timeout time adaptation in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of the structure of an IO request processing device in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only configured to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0028] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0029] With the continuous development of information technology, the amount of data that needs to be stored is also increasing. Distributed storage systems use an extensible system structure and use multiple storage servers to share the storage load, which not only improves the reliability, availability and access efficiency of the system, but also makes it easy to expand.
[0030] In a storage system based on the SCSI (Small Computer System Interface) protocol, a distributed storage cluster can contain multiple storage nodes, and a computing node can send an IO request (read request or write request) to a storage node to read data from a hard disk or write data to a hard disk through a storage node. SCSI is an independent processor standard for system-level interfaces between computers and their peripheral devices (hard disks, floppy drives, optical drives, printers, scanners, etc.).
[0031] See also Figure 1 , Figure 1 A schematic diagram of a single point network failure in the related art causing damage to user services. LUN is a number used to identify a logical unit, which is a device addressed by SCSI. In other words, the storage system partitions the physical hard disk into parts with logical addresses, and then allows computing nodes to access them. Such a partition is a LUN. It can be seen that a single point network failure occurred in storage node 1. In this case, if the computing node is relied upon to initiate an IO retry, or send an IO termination command / reset IO request, the IO response delay to the computing node cannot be actively guaranteed, which can easily cause user services to be stuck or even timeout interruption.
[0032] In order to solve the above problems, the embodiments of the present application provide an IO request processing method, device, electronic device and computer-readable medium, which can actively control the delay of processing IO requests when a single point of network failure occurs within a storage cluster, thereby achieving a rapid response to the computing node business IO.
[0033] The following first introduces the IO request processing method of the embodiment of the present application in detail.
[0034] The IO request processing method of the embodiment of the present application can be applied to the first storage node in a distributed storage cluster. The distributed storage cluster can usually include multiple storage nodes, and the first storage node can be any storage node in the distributed storage cluster.
[0035] See also Figure 2 , Figure 2 A flowchart of the IO request processing method in an embodiment of the present application may include the following steps:
[0036] Step S210: receiving an original IO request sent by a computing node, cloning the original IO request, and obtaining a first IO request.
[0037] In the embodiment of the present application, when a user uses the storage system disk, the basic operation includes reading data from the disk or writing data to the disk, and each read and write request is an IO request. When a user reads or writes data through a computing node, an IO request can be sent to a storage node. The storage node that receives the IO request is the first storage node, and the IO request sent by the computing node to the first storage node is the original IO request. Cloning the original IO request refers to cloning an IO request with the same attributes as the original IO request, that is, the attributes of the first IO request obtained by cloning are exactly the same as the attributes of the original IO request.
[0038] For example, if the original IO request is a read request, the original IO request includes the address to be read, the data to be read, etc. Then, the address to be read and the data to be read in the cloned first IO request are the same as the address to be read and the data to be read in the original IO request.
[0039] Step S220: If a response to the first IO request is received when the first timeout period corresponding to the original IO request arrives, the response to the first IO request is sent to the computing node.
[0040] In an embodiment of the present application, after receiving the first IO request, the first storage node can read data or write data through the first path. After the read or write is successful, a return for the first IO request can be received. Otherwise, a return for the first IO request cannot be received.
[0041] It should be noted that the first timeout corresponding to the original IO request refers to the longest time to respond to the original IO request. The first timeout is the attribute information of the original IO request. Therefore, after cloning, the first timeout corresponding to the first IO request is the first timeout corresponding to the original IO request. If a response to the first IO request is received when the first timeout arrives, it means that there is no delay and the business needs can be met. The response to the first IO request is directly sent to the computing node.
[0042] Wherein, when the first timeout period arrives, receiving a response to the first IO request includes: when the first timeout period arrives, the response to the first IO request has been received, that is, the time of receiving the response to the first IO request is before the first timeout period arrives; and when the first timeout period arrives, receiving the response to the first IO request. For example, assuming that the first timeout period is 5 seconds, if the response to the first IO request is received within 5 seconds (3 seconds, 4 seconds or 5 seconds, etc.), the response to the first IO request is sent to the computing node.
[0043] Step S230: If no response to the first IO request is received when the first timeout period arrives, the original IO request is cloned to obtain a second IO request.
[0044] Corresponding to the above process, if no response is received for the first IO request when the first timeout period arrives, it means that a delay has occurred, and a single point of network failure may have occurred, which cannot meet business needs. If the computing node initiates a retry, or sends an IO termination command / resets the IO request, a delay may still occur because the failure has not been eliminated in time.
[0045] To avoid this problem, the present application clones the original IO request again to obtain a second IO request, so that the second IO request is processed by other storage nodes in the distributed storage cluster. Of course, the original IO request, the first IO request and the second IO request all have the same attributes.
[0046] Step S240: Send the second IO request to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes, and send the response to the second IO request to the computing node.
[0047] In an embodiment of the present application, after receiving the second IO request, the first storage node may send the second IO request to other storage nodes in the distributed storage cluster, and the other storage nodes may be any storage nodes except the first storage node. For example, when the second IO request is sent to the second storage node, the second storage node may read data or write data through the second path. Similarly, after a successful read or write, a response to the second IO request may be received, otherwise, a response to the second IO request may not be received.
[0048] If the second storage node receives a response to the second IO request, it may send the response to the second IO request to the first storage node. Furthermore, the first storage node sends the response to the second IO request to the storage node.
[0049] If the second storage node does not receive a response to the second IO request, the first storage node will not be able to receive a response to the second IO request. The first storage node may be cloned again and further obtain a response to the second IO request through other storage nodes.
[0050] In another optional implementation, if the first storage node does not receive a response to the first IO request when the first timeout period arrives, the original IO request may be cloned multiple times to obtain multiple second IO requests, and the multiple second IO requests may be sent to different storage nodes respectively, so as to obtain responses to the second IO requests through multiple different storage nodes at the same time. In this way, the latency may be further shortened.
[0051] The IO request processing method of the embodiment of the present application, when a single point of network failure occurs within the storage cluster, clones the original IO request and sends the cloned IO request to other storage nodes within the storage cluster for processing by other storage nodes, thereby actively controlling the latency of the IO request. The present application fully utilizes the advantages of distributed storage multi-node services to achieve rapid response to computing node service IO requests, solves the problem of user service damage caused by single point of network failure within the storage cluster, and meets users' demands for low latency and high availability indicators.
[0052] See also Figure 3 , Figure 3 This is another flow chart of the IO request processing method in the embodiment of the present application, which may include the following steps:
[0053] Step S310: receiving an original IO request sent by a computing node, cloning the original IO request, and obtaining a first IO request.
[0054] In the embodiment of the present application, after receiving the original IO request sent by the computing node, the information of the original IO request can be recorded in the IO local linked list. The information of the original IO request includes: the complete content of the original IO request (including the requested address and data, etc.) and the receiving time. In this way, the original IO request in the IO local linked list can be cloned to obtain the first IO request.
[0055] Step S320, determining whether a response to the first IO request is received when the first timeout period arrives.
[0056] As described above, if a return is received for the first IO request when the first timeout period corresponding to the original IO request arrives, it indicates that no delay occurs, and step S330 can be executed; if a return is not received for the first IO request when the first timeout period arrives, it indicates that a delay occurs, and step S340 can be executed.
[0057] In the embodiment of the present application, the first timeout period corresponding to different types of original IO requests may be different to meet different business requirements. For example, for management commands, the first timeout period may be longer, such as 20 seconds, 30 seconds, etc. For read requests with higher response requirements, the first timeout period may be shorter, such as 1 second, 2 seconds, etc.
[0058] Step S330: Send a response to the first IO request to the computing node.
[0059] Step S340: clone the original IO request to obtain a second IO request.
[0060] Step S350: Send the second IO request to the i-th storage node in the distributed storage cluster; wherein the initial value of i is 2.
[0061] In the embodiment of the present application, after the first execution of step S340, the second IO request may be sent to the second storage node. The second storage node is any storage node other than the first storage node in the distributed storage cluster. Since the embodiment of the present application includes a loop process, after the second execution of step S340, the second IO request may be sent to the third storage node, and so on.
[0062] Step S360, determining whether a response to the second IO request sent by the i-th storage node is received when the first timeout period arrives.
[0063] In the embodiment of the present application, if the first storage node receives a response to the second IO request sent by the i-th storage node when the first timeout period arrives, it means that the i-th storage node has received a response to the second IO request, and no delay has occurred at the i-th storage node, and step S370 is executed. If the i-th storage node does not receive a response to the second IO request when the first timeout period arrives, it means that a delay has also occurred at the i-th storage node, and step S380 can be executed.
[0064] It should be noted that when the original IO request is a read request, the response to the first / second IO request includes: the read content and the read status; when the original IO request is a write request, the response to the first / second IO request includes: the write status. The read status can be success or failure, and the write status can also be success or failure.
[0065] Step S370: Send a response to the second IO request to the computing node.
[0066] Step S380, determine whether the value of i is equal to n.
[0067] Step S390, add 1 to the value of i and return to step S340.
[0068] In an embodiment of the present application, n may represent the total number of times IO requests are processed, for example, it may be 2, 3 or 5, etc. Assuming that the value of n is 3, when a delay occurs in the first storage node, the first IO request has been processed once by the first storage node, then the original IO request may be cloned, and the obtained second IO request may be processed by the second storage node. If no delay occurs, the second storage node will send a response to the second IO request to the first storage node; if a delay occurs, by executing the above-mentioned loop process, the original IO request will be cloned again, and the obtained second IO request will be processed by the third storage node. If no delay occurs, the third storage node will send a response to the second IO request to the first storage node; if a delay still occurs, it means that the delay is already long, and the above-mentioned loop process will no longer be executed, and the process ends.
[0069] In addition, n can also represent the total number of storage nodes in the distributed storage cluster, where n is an integer greater than 1. When the value of i is less than n, it indicates that there are still storage nodes in the distributed storage cluster that have not processed the second IO request. The above-mentioned loop process can be executed to clone the second IO request again and process the second IO request. When the value of i is equal to n, it indicates that all storage nodes in the distributed storage cluster have processed the second IO request, but still have not received a response to the second IO request. At this time, it may be that a fault has occurred inside the distributed storage cluster, and a quick response to the business IO cannot be guaranteed.
[0070] In an embodiment of the present application, after the return to the first / second IO request is sent to the computing node, it indicates that the response to the original IO request has been completed, and the information of the original IO request in the IO local linked list can be cleared to avoid occupying storage space.
[0071] In the embodiment of the present application, the first timeout period may also be adaptively updated to meet the changing requirements of different services for latency, as follows:
[0072] It is assumed that the first timeout period is a value pre-set according to business needs, or it can also be a value that has been adaptively adjusted according to the previous business needs. In the case where the user feels a delay, a terminate IO command can be sent to the first storage node through the computing node, hoping that the previously sent IO request will be returned to the computing node side for retry. If the first storage node receives a terminate IO command sent by the computing node for the original IO request, it means that the original first timeout period cannot meet the user's needs. The first timeout period can be updated according to the reception time of the terminate IO command and the reception time of the original IO request.
[0073] Specifically, if the first storage node does not receive the terminate IO command sent by the computing node when the first timeout period arrives, it means that the first timeout period can meet the user's business needs, and the first timeout period may not be updated. If the first storage node receives the terminate IO command sent by the computing node when the first timeout period arrives, or receives the terminate IO command before the first timeout period arrives, it means that the first timeout period cannot meet the user's business needs, and the first timeout period may be updated according to the reception time of the terminate IO command and the reception time of the original IO request.
[0074] In an optional implementation, the product of the difference between the reception time of the termination IO command and the reception time of the original IO request and a preset coefficient can be used as the second timeout period; wherein the preset coefficient is greater than 0 and less than 1; and the first timeout period is updated to the second timeout period. In this way, when the same type of IO request is received next time, a response to the IO request is received when the first timeout period expires, which will meet the user's business needs.
[0075] In the embodiment of the present application, after the first timeout period is updated, the first timeout period can also be sent to other storage nodes in the distributed storage cluster. In this way, when other storage nodes receive an IO request sent by the computing node, they can respond to the IO request in a timely manner according to the updated first timeout period to avoid delays.
[0076] Through the IO request processing method provided by the embodiment of the present application, when a single point of network failure occurs within the storage cluster, the original IO request is cloned, and the cloned IO request is sent to other storage nodes within the storage cluster for processing by other storage nodes, thereby actively controlling the latency of the IO request. The present application makes full use of the advantages of distributed storage multi-node services to achieve rapid response to IO requests for computing node services, solve the problem of user business damage caused by single point of network failure within the storage cluster, and meet users' demands for low latency and high availability indicators. In addition, the timeout period of different types of IO requests can be adapted in real time based on the termination IO command issued by the computing node, so as to promptly meet the changes in the IO latency requirements of the computing node's business.
[0077] See also Figure 4 , Figure 4 This is a schematic diagram of a scenario of the IO request processing method in the embodiment of the present application. Figure 4 , the above process is illustrated by way of example.
[0078] like Figure 4As shown, when a user wants to read data from a disk or write data to a disk, an original IO request can be sent to storage node 1 through a computing node. After receiving the original IO request, storage node 1 records the information of the original IO request in the IO local linked list. Assuming that the original IO request is a read request, the address to be read by the original IO request, the data to be read, and the time of receiving the original IO request can be recorded in the IO local linked list.
[0079] Storage node 1 can clone the original IO request to obtain the first IO request and read the data through path 1. However, due to a failure, when the first timeout period arrives, storage node 1 will not receive a response to the first IO request. Then, storage node 1 clones the original IO request again to obtain the second IO request and sends the second IO request to storage node 2 through path 2. Storage node 2 can read the data through path 3.
[0080] If storage node 2 receives a response to the second IO request when the first timeout period arrives, it may send the response to the second IO request to storage node 1, and storage node 1 sends the response to the second IO request to the computing node, and the process ends.
[0081] If storage node 2 does not receive a response to the second IO request when the first timeout period arrives, storage node 1 can similarly clone the original IO request again to obtain a second IO request, and send the second IO request to storage node 3 via path 4, and obtain a response to the second IO request via storage node 3.
[0082] By analogy, the return for the second IO request can also be obtained through storage node 4, storage node 5, etc., and the return for the second IO request can be sent to the computing node. Afterwards, the information of the original IO request in the IO local linked list can also be cleared to save storage space.
[0083] It can be seen from the above process that when a single point of network failure occurs, the present application can actively control the delay to achieve a rapid response to business IO.
[0084] See also Figure 5 , Figure 5 A schematic diagram of a scenario in which the timeout time is self-adaptive in the embodiment of the present application is shown below. Figure 5 , the above process is illustrated by way of example.
[0085] like Figure 5As shown, after the user has sent the original IO request to the storage node 1 through the computing node, if the user senses a timeout, the user can send a terminate IO command to the storage node 1, hoping that the original IO request previously issued will be returned to the computing node side for retry. Storage node 1 calculates the second timeout period based on the reception time of the terminate IO command and the reception time of the original IO request stored in the IO local linked list, and updates the first timeout period to the second timeout period. Of course, the second timeout period is less than the difference between the reception time of the terminate IO command and the reception time of the original IO request. In this way, sending a return for the IO request to the computing node based on the updated first timeout period can meet the user's business needs.
[0086] From the above process, it can be seen that the present application can perform real-time timeout adaptation according to the IO termination command issued by the computing node, thereby timely meeting the changes in the IO latency requirements of the business applications of the computing node.
[0087] Corresponding to the above method embodiment, the present application embodiment also provides an IO request processing device, which is applied to the first storage node in the distributed storage cluster. Figure 6 , Figure 6 A schematic diagram of the structure of an IO request processing device in an embodiment of the present application may include:
[0088] The IO request cloning module 610 is used to receive the original IO request sent by the computing node, clone the original IO request, and obtain a first IO request;
[0089] A first return sending module 620 is configured to send the return for the first IO request to the computing node if a return for the first IO request is received when a first timeout period corresponding to the original IO request is reached;
[0090] The IO request sending module 630 is used to clone the original IO request to obtain a second IO request if no response to the first IO request is received when the first timeout period arrives; send the second IO request to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes;
[0091] The second return sending module 640 is used to send the return for the second IO request to the computing node.
[0092] In an optional implementation manner, the IO request processing device further includes:
[0093] The information recording module is used to record the information of the original IO request into the IO local linked list after receiving the original IO request sent by the computing node;
[0094] The information clearing module is used to clear the information of the original IO request in the IO local linked list after sending the return of the first / second IO request to the computing node.
[0095] In an optional implementation, the information of the original IO request includes: the time of receiving the original IO request;
[0096] The IO request processing device of the embodiment of the present application further includes:
[0097] The timeout updating module is used to update the first timeout time according to the reception time of the termination IO command and the reception time of the original IO request if a termination IO command for the original IO request sent by the computing node is received.
[0098] In an optional embodiment, the timeout update module is specifically used to use the product of the difference between the reception time of the termination IO command and the reception time of the original IO request and a preset coefficient as the second timeout; wherein the preset coefficient is greater than 0 and less than 1; and update the first timeout to the second timeout.
[0099] In an optional implementation manner, the IO request processing device further includes:
[0100] The timeout sending module is used to send the first timeout to other storage nodes in the distributed storage cluster.
[0101] In an optional implementation, the IO request sending module 630 includes:
[0102] A cloning unit, used for cloning the original IO request to obtain a second IO request;
[0103] A sending unit, configured to send a second IO request to an i-th storage node; wherein an initial value of i is 2;
[0104] a receiving unit, configured to receive the response to the second IO request sent by the i-th storage node if the i-th storage node receives the response to the second IO request when the first timeout period arrives;
[0105] The loop unit is used to increase the value of i by 1 and return to the cloning unit if the i-th storage node does not receive a response to the second IO request when the first timeout period arrives, until the value of i is equal to n, where n is an integer greater than 1.
[0106] In an optional implementation, different types of original IO requests correspond to different first timeout periods.
[0107] In an optional implementation, if the original IO request is a read request, the response to the first / second IO request includes: the read content and the read status; if the original IO request is a write request, the response to the first / second IO request includes: the write status.
[0108] The IO request processing device provided in this embodiment is used to implement the corresponding IO request processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0109] It should be pointed out that, according to the needs of implementation, the various modules / steps described in the embodiments of the present application can be split into more modules / steps, or two or more modules / steps or partial operations of modules / steps can be combined into new modules / steps to achieve the purpose of the embodiments of the present application.
[0110] Figure 7 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. The electronic device may include: a processor 702, a communication interface 704, a memory 706 and a communication bus 708.
[0111] The processor 702 , the communication interface 704 , and the memory 706 communicate with each other via a communication bus 708 .
[0112] The communication interface 704 is used to communicate with other electronic devices or servers.
[0113] The processor 702 is used to execute the program 710, and specifically can execute the relevant steps in the above-mentioned IO request processing method embodiment.
[0114] Specifically, the program 710 may include program codes, which include computer operation instructions.
[0115] The processor 702 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0116] The memory 706 is used to store the program 710. The memory 706 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0117] The program 710 may be specifically used to enable the processor 702 to execute the corresponding steps in the above-mentioned IO request processing method embodiment.
[0118] The specific implementation of each step in program 710 can refer to the corresponding description of the corresponding steps and units in the above-mentioned recommended method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.
[0119] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed, the above IO request processing method is implemented.
[0120] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code configured to execute the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, the above-mentioned functions defined in the method of the present application are executed.
[0121] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program configured to be used by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency, etc., or any suitable combination of the above.
[0122] The expressions "first", "second", "the first" or "the second" used in various embodiments of the present application may modify various components regardless of order and / or importance, but these expressions do not limit the corresponding components. The above expressions are only configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present disclosure.
[0123] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for processing an input / output (IO) request, applied to a first storage node in a distributed storage cluster, comprising: The first storage node receives the original IO request sent by the computing node, clones the original IO request, and obtains a first IO request; If the first storage node receives a response to the first IO request when the first timeout period corresponding to the original IO request arrives, the first storage node sends the response to the first IO request to the computing node; If the first storage node does not receive a response to the first IO request when the first timeout period arrives, the original IO request is cloned to obtain a second IO request; The first storage node sends the second IO request to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes, and sends the response to the second IO request to the computing node, wherein the other storage nodes are any storage nodes in the distributed storage cluster except the first storage node.
2. The method according to claim 1, wherein: The method further comprises: After receiving the original IO request sent by the computing node, recording information of the original IO request into an IO local linked list; After sending the response to the first / second IO request to the computing node, the information of the original IO request in the IO local linked list is cleared.
3. The method according to claim 2, wherein: The information of the original IO request includes: the time of receiving the original IO request; The method further comprises: If a terminate IO command for the original IO request sent by the computing node is received, the first timeout period is updated according to the reception time of the terminate IO command and the reception time of the original IO request.
4. The method according to claim 3, wherein: The updating of the first timeout period according to the reception time of the terminate IO command and the reception time of the original IO request includes: The product of the difference between the reception time of the termination IO command and the reception time of the original IO request and a preset coefficient is used as the second timeout period; wherein the preset coefficient is greater than 0 and less than 1; Update the first timeout period to the second timeout period.
5. The method according to claim 3, wherein: After the first timeout period is updated, the method further includes: The first timeout period is sent to other storage nodes in the distributed storage cluster.
6. The method according to claim 1, wherein: The cloning of the original IO request to obtain a second IO request; and sending the second IO request to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes, including: The original IO request is cloned to obtain a second IO request, and the second IO request is sent to the i-th storage node; wherein the initial value of i is 2; If the i-th storage node receives a response to the second IO request when the first timeout period expires, receiving a response to the second IO request sent by the i-th storage node; If the i-th storage node does not receive a response to the second IO request when the first timeout period arrives, the value of i is increased by 1, and the step of cloning the original IO request to obtain the second IO request is returned until the value of i is equal to n, where n is an integer greater than 1.
7. The method according to claim 1, wherein: Different types of original IO requests correspond to different first timeout periods.
8. The method according to claim 1, wherein: If the original IO request is a read request, the response to the first / second IO request includes: the read content and the read status; If the original IO request is a write request, the response to the first / second IO request includes: a write status.
9. An IO request processing device, applied to a first storage node in a distributed storage cluster, comprising: An IO request cloning module, located in the first storage node, is used to receive an original IO request sent by a computing node, clone the original IO request, and obtain a first IO request; a first return sending module, located in the first storage node, for sending the return of the first IO request to the computing node if a return of the first IO request is received when a first timeout period corresponding to the original IO request is reached; an IO request sending module, located in the first storage node, for cloning the original IO request to obtain a second IO request if no response to the first IO request is received when a first timeout period arrives; and sending the second IO request to other storage nodes in the distributed storage cluster to obtain a response to the second IO request through the other storage nodes, wherein the other storage nodes are any storage nodes in the distributed storage cluster except the first storage node; The second return sending module is located in the first storage node and is used to send a return for the second IO request to the computing node.
10. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the IO request processing method according to any one of claims 1 to 8.
11. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the IO request processing method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Distributed data reading method and device
CN106598488A