System service load distribution method, device, and medium
By dividing the logical unit number into multiple fields of the same scale and evenly distributing it to each cache node, combining cache rule files and backup mechanisms, the problem of load imbalance in storage devices is solved, and load balancing and system stability are improved.
Patent Information
- Application Number
- CN202210764547.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The service load of each cache node in existing storage devices is unbalanced, resulting in the inability to fully utilize the storage performance and affecting the user experience.
Divide the logical unit number into multiple fields of the same size, and evenly distribute the write operation data to each cache node, use the cache rule file for backup, ensure load balancing, and perform re-backup in the event of a failure.
The service load balancing of each cache node is realized, the performance of storage devices and system stability are improved, and the user experience is improved.
Smart Images

Figure CN115061634B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server storage, and in particular to a method, device, and medium for distributing system service load. Background Art
[0002] In order to ensure the reliability and high performance of storage devices, current storage devices all have multiple disk array controllers (ie, cache nodes), wherein the disk array controller includes a CPU, a cache, a fiber channel, and the like. Figure 1 This is a schematic diagram of an existing cache copy distribution and cache flush path, such as Figure 1 As shown, the cache system contains multiple storage blocks, each of which has a physical underlying disk. During server operation, the multiple storage blocks in the block storage are logically integrated into corresponding logical unit numbers (LUNs). During server operation, the server writes write data to the cache node based on the LUN and then flushes the data in the cache node to the hard disk.
[0003] However, currently, tasks are usually assigned to each cache node based on LUN granularity. This will lead to different loads on each cache node due to the uneven distribution of LUNs in each cache node and the different services on each LUN. This cannot fully utilize the storage performance of the storage device, affecting the user experience.
[0004] Therefore, it can be seen that how to provide a storage device service load distribution method to prevent the service load of each cache node from being unbalanced is a problem that those skilled in the art need to solve urgently. Summary of the Invention
[0005] The purpose of this application is to provide a system business load distribution method, device, and medium to evenly distribute the business load of the storage device on each cache node, thereby fully utilizing the storage performance of the storage device, improving system stability and user experience.
[0006] In order to solve the above problems, the present application provides a system service load distribution method, including:
[0007] Determining whether a write operation instruction generated by the server is obtained;
[0008] If the write operation instruction is obtained, determining the logical unit number of the hard disk called by the write operation instruction;
[0009] Divide the logical unit number into multiple fields of the same size and evenly distribute the fields to each cache node, and determine the field where each logical unit number is located;
[0010] The write operation data is written into each target cache node corresponding to each of the fields.
[0011] Preferably, after the step of writing the write operation data into each target cache node corresponding to each field, the method further includes:
[0012] Get the cache rule file;
[0013] A backup node for each of the cache nodes is determined according to the cache rule file, and the write operation data corresponding to each of the cache nodes is backed up to the backup node.
[0014] Preferably, after the step of backing up the write operation data corresponding to each cache node to the backup node, the method further includes:
[0015] When there is a faulty cache node, updating the cache rule file;
[0016] The data in each cache node is re-backed up according to the updated cache rule file.
[0017] Preferably, determining the backup node of each cache node according to the cache rule file includes:
[0018] If the field corresponding to the cache node is the end field of the logical unit number, the backup node is the cache node corresponding to the initial field of the logical unit number;
[0019] If the field corresponding to the cache node is not the last field of the logical unit number, the backup node is a node adjacent to the cache node.
[0020] Preferably, re-backing up the data in each cache node according to the updated cache rule file includes:
[0021] The reserved computing resources of the controller are used to re-back up the data in each cache node.
[0022] Preferably, before the step of backing up the data in each cache node according to the updated cache rule file, the method further includes:
[0023] Setting different weights for the backup request and each service request of the controller;
[0024] Accordingly, executing the backing up of the data in each cache node according to the updated cache rule file includes:
[0025] Requests with higher weights are executed first.
[0026] Preferably, writing the write operation data into each target cache node corresponding to each field includes:
[0027] The IO operation instruction is sent to each of the target cache nodes corresponding to each of the fields, so that each of the target cache nodes executes a command to write the write operation data.
[0028] In order to solve the above technical problems, the present application also provides a system service load distribution device, including:
[0029] A judgment module, used to judge whether a write operation instruction generated by the server is obtained;
[0030] A first determining module is configured to, if the write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction;
[0031] A second determining module is configured to divide the logical unit number into a plurality of fields of the same size and evenly distribute the fields to each cache node, and determine the field where each logical unit number is located;
[0032] The writing module is used to write the write operation data into each target cache node corresponding to each of the fields.
[0033] In order to solve the above technical problems, the present application also provides a system service load distribution device, comprising a memory for storing a computer program;
[0034] A processor is configured to implement the steps of the system service load distribution method when executing the computer program.
[0035] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the system business load distribution method are implemented.
[0036] The system business load distribution method provided by the present application includes: judging whether a write operation instruction generated by the server is obtained to determine whether there is a storage business at present. If a write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction; divide the logical unit number into multiple fields of the same scale, and determine the field where each logical unit number is located; write the write operation data to each target cache node corresponding to each field. It can be seen that the solution provided by the present application divides the LUN into multiple fields, the number of fields corresponding to each cache node is the same, and directly calls the cache node corresponding to the field to complete the system write operation instruction, thereby ensuring the business load balance of each cache node.
[0037] In addition, the present application also provides a system business load distribution device and medium, which correspond to the above method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0039] Figure 1 A schematic diagram of an existing cache copy distribution and cache flush path;
[0040] Figure 2 A flowchart of a system service load distribution method provided in an embodiment of the present application;
[0041] Figure 3 Schematic diagram of cache copy distribution and cache flush path provided by the embodiment of the present application;
[0042] Figure 4 A structural diagram of a system service load distribution device provided in an embodiment of the present application;
[0043] Figure 5 This is a structural diagram of another system service load distribution device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0045] The core of this application is to provide a system business load distribution method, device, and medium to evenly distribute the business load of the storage device on each cache node, thereby fully utilizing the storage performance of the storage device and improving system stability and user experience.
[0046] In the application scenario of storage devices, in order to ensure the reliability and high performance of the storage device, the storage device needs to include multiple cache nodes, and each cache node must ensure load balancing. Traditional cache copies are two copies. When cache data is distributed on two cache nodes in a multi-controller cache device, if the cache copies are distributed at the LUN granularity, the uneven distribution of LUNs on each controller and the different services on each LUN will cause different loads on each controller, and the performance of the entire system cannot be fully utilized. To solve this problem, this embodiment provides a system service load distribution method, including: determining whether a write operation instruction generated by a server is obtained to determine whether there is currently a storage service. If a write operation instruction is obtained, determining the logical unit number of the hard disk called by the write operation instruction; dividing the logical unit number into multiple fields of the same scale and determining the field where each logical unit number is located; and writing the write operation data to each target cache node corresponding to each field. Therefore, the solution provided by this application ensures service load balancing of each cache node by dividing the LUN into multiple fields, with each cache node corresponding to the same number of fields, and directly calling the cache node corresponding to the field to complete the system write operation instruction.
[0047] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0048] Figure 2 A flow chart of a method for distributing system service load provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes:
[0049] S10: Determine whether a write operation instruction generated by the server is obtained.
[0050] S11: If a write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction.
[0051] S12: Divide the logical unit number into multiple fields of the same size and evenly distribute the fields to each cache node, and determine the field where each logical unit number is located.
[0052] S13: Writing the write operation data into each target cache node corresponding to each field.
[0053] In a specific implementation, the logical unit number is divided into multiple fields of the same size. The length of each field can be determined by the system maintenance personnel, for example: 1MB. It should be noted that after the logical unit number is divided into multiple fields, if there is less than 1MB of logical unit number left, the remaining part will be treated as an independent field. Each field is evenly distributed to different cache nodes, that is, each field has a corresponding cache unit. When the server calls the entire LUN to execute a write operation instruction, the field where each logical unit number is called is determined, and the write operation data is written to the target cache nodes corresponding to each field.
[0054] Understandably, load balancing requires more than just storage; it also requires the coordination of host-side multipathing software. Many operating systems come with built-in multipathing software, such as Linux's Multipath and Windows' MOIP. However, these balancing software only provide basic functionality. For more advanced features, you'll need the load balancing software provided by the storage vendor. Load balancing software performs drive letter deduplication and finds the optimal path. Drive letter deduplication refers to removing duplicate drive letters. For example, in a dual-controller system, a server host typically uses two host bus adapters (HBAs) to connect to the two controllers. Because the data connections established through both controllers can locate a single LUN, two drive letters are generated on the host for that LUN. However, these two drive letters actually refer to the same physical hard drive. The load balancing software uses the WWN to determine whether the two drive letters refer to the same disk. If so, the duplicate drive letters are removed.
[0055] Furthermore, in order to further improve the load balancing of each cache node, when the server reads a certain field of the storage volume, the IO request sent by the server is directly sent to the cache node corresponding to the field. This allows the server to directly access the cache node without forwarding through other cache nodes, thereby improving work efficiency. Taking the SCSI protocol as an example, for each field, the target port of each cache node is divided into a Target Port Group. The path attributes corresponding to the target ports in the same Target Port Group are the same, while the path attributes corresponding to the target ports of different Groups report different path optimization strategies through the protocol, which can be divided into Active / optimized, Active / non-optimized, Standby, Unavailable, Reserved, Offline, Transitioning betweenstates and other states, and the corresponding path is selected according to the above states.
[0056] Figure 3 The schematic diagram of cache copy distribution and cache flush path provided in the embodiment of the present application is as follows: Figure 3 As shown in the figure, after the server sends a write operation command, the server's read and write IO requests are sent to the cache nodes corresponding to each field according to the correspondence between each LUN field and each cache node, thereby ensuring load balancing of each cache node and giving full play to the performance of the storage device.
[0057] The system business load distribution method provided by the present application includes: judging whether a write operation instruction generated by the server is obtained to determine whether there is a storage business at present. If a write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction; divide the logical unit number into multiple fields of the same scale, and determine the field where each logical unit number is located; write the write operation data to each target cache node corresponding to each field. It can be seen that the solution provided by the present application divides the LUN into multiple fields, the number of fields corresponding to each cache node is the same, and directly calls the cache node corresponding to the field to complete the system write operation instruction, thereby ensuring the business load balance of each cache node.
[0058] During storage device operation, if write operations are performed on a cache node and the cache node fails, the write data will be lost, ultimately preventing the data from being flushed from the cache node to the hard disk. To address this issue, a dual-node backup method is currently used. Two nodes form a backup group, each storing a mirror image of the other node. However, if a cache node in the backup group fails, backup operations cannot be performed normally, reducing system stability.
[0059] To solve this problem, based on the above embodiment, after the step of writing the write operation data into each target cache node corresponding to each field, the following step is further included:
[0060] Get the cache rule file;
[0061] The backup node of each cache node is determined according to the cache rule file, and the write operation data is backed up to the backup node.
[0062] In a specific implementation, multiple cache nodes are used to mirror each other to achieve data backup and prevent data loss due to cache node failure. Specifically, the backup node for each cache node is determined based on the cache rule file stored in the system. The cache rule file is a file predetermined by the administrator. This embodiment is described using a storage device with four cache nodes as an example. The system has four mirror pairs, or four domains. Each domain contains two nodes, and the data within the domain in each node consists of fields. The data and metadata cache in the system are distributed within the four mirror pairs, with two copies of the mirror within each mirror pair.
[0063] When a node is abnormal, the members of the affected domain are reorganized, triggering the business module to re-mirror the data and metadata cache within the relevant domain, thereby ensuring that the domain is still two nodes, the data and metadata cache within the domain are still mirrored, and the business within the domain is still written back. Re-mirroring is performed in the background, and IO can be continuously processed during the process without affecting the business. After the data and metadata cache within the domain are re-mirrored, each mirror pair is rebuilt. If another node fails thereafter, the domain can be reorganized and the data and metadata cache within the domain can be re-mirrored until only one node remains. In this case, there is only one node left in each domain, but the storage device can still provide services, that is, it supports the scenario where 3 out of 4 controllers are damaged without affecting the business, thus achieving high availability.
[0064] Specifically, when there are four cache nodes Node0, Node1, Node2, and Node3 in the system, the data in Node0 can be backed up to Node1, the data in Node1 can be backed up to Node2, the data in Node2 can be backed up to Node3, and the data in Node3 can be backed up to Node0 to form a circular backup, or other backup methods can be used, which are not limited here.
[0065] It should be noted that the data backed up to the backup node is not all the data of the current cache node, but the data written by the server host to the cache node corresponding to each field according to the LUN field. When a faulty cache node is detected in the storage device, the cache rule file is updated and the faulty cache node is deleted; and the data in each cache node is re-backed up according to the updated cache rule file. For example: Node0 stores the cache data of Node0 and the backup data of Node3. When Node0 fails, Node1 performs the task of the original Node0 and re-backs up the data at the same time, backing up the data in Node1 to Node2, backing up the data in Node2 to Node3, and backing up the data in Node3 to Node1.
[0066] Based on the above embodiment, determining the backup node of each cache node according to the cache rule file includes:
[0067] If the field corresponding to the cache node is the end field of the logical unit number, the backup node is the cache node corresponding to the initial field of the logical unit number;
[0068] If the field corresponding to the cache node is not the end field of the logical unit number, the backup node is a node adjacent to the cache node.
[0069] In this embodiment, a circular mirroring method is used to back up cache data in each cache node. Compared with other backup rules, this backup rule is more efficient in re-backing up when a faulty cache node exists.
[0070] It's important to note that in server workloads, storage devices face significant workloads, putting the cache of each cache node under significant workload. If a cache node fails, data re-mirroring may occur, competing with server host workloads for computing resources.
[0071] In order to solve this problem, two optimization methods are proposed based on the above embodiments.
[0072] (1) Each server reserves a portion of cache for data synchronization during the domain reorganization process
[0073] (2) During the domain reorganization process, the priority weighted values of data cross-controller synchronization IO and host service IO are defined to ensure that domain reorganization and front-end host service IO can proceed normally in a certain ratio.
[0074] Specifically, for solution (1), during the daily operation of the server, the server performance is reduced to achieve the purpose of reserving computing resources. When a cache node failure occurs in the system, the reserved computing resources are used to re-back up the data in each cache node.
[0075] For solution (2), different weights need to be pre-set for the re-backup task request and each task request of the server host, where the weight of the re-backup problem request is higher than the weight of the ordinary business request, so as to ensure that the server gives priority to the work of re-backing up the data in each cache node after completing important business.
[0076] In the above embodiments, the system service load distribution method is described in detail. This application also provides corresponding embodiments of the system service load distribution device. It should be noted that this application describes the embodiments of the device portion from two perspectives: one is based on the functional module perspective, and the other is based on the hardware perspective.
[0077] Figure 4 This is a structural diagram of a system service load distribution device provided in an embodiment of the present application, such as Figure 4 As shown, the system service load distribution device includes:
[0078] The judgment module 10 is used to judge whether the write operation instruction generated by the server is obtained.
[0079] The first determining module 11 is configured to determine the logical unit number of the hard disk called by the write operation instruction if a write operation instruction is obtained.
[0080] The second determination module 12 is used to divide the logical unit number into multiple fields of the same scale, and determine the field where each logical unit number is located, each of the fields is evenly distributed to each cache node.
[0081] The writing module 13 is configured to write the write operation data into each target cache node corresponding to each field.
[0082] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0083] The system business load distribution method provided by the present application includes: judging whether a write operation instruction generated by the server is obtained to determine whether there is a storage business at present. If a write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction; divide the logical unit number into multiple fields of the same scale, and determine the field where each logical unit number is located; write the write operation data to each target cache node corresponding to each field. It can be seen that the solution provided by the present application divides the LUN into multiple fields, the number of fields corresponding to each cache node is the same, and directly calls the cache node corresponding to the field to complete the system write operation instruction, thereby ensuring the business load balance of each cache node.
[0084] Figure 5 This is a structural diagram of a system service load distribution device provided in another embodiment of the present application, such as Figure 5 As shown, the system service load distribution device includes: a memory 20 for storing computer programs;
[0085] The processor 21 is configured to implement the steps of the system service load distribution method of the above embodiment when executing a computer program.
[0086] The smart device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0087] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0088] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the system business load distribution method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the correspondence between fields and cache nodes, etc.
[0089] In some embodiments, the system service load distribution device may further include a display screen 22 , an input and output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0090] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the system service load distribution device, and may include more or fewer components than shown in the figure.
[0091] The system service load distribution device provided in an embodiment of the present application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method:
[0092] Determine whether the write operation instruction generated by the server is obtained.
[0093] If a write operation instruction is obtained, the logical unit number of the hard disk called by the write operation instruction is determined.
[0094] The logical unit number is divided into a plurality of fields of the same size and each field is evenly distributed to each cache node, and the field where each logical unit number is located is determined.
[0095] Write the write operation data to each target cache node corresponding to each field.
[0096] The system business load distribution method provided by the present application includes: judging whether a write operation instruction generated by the server is obtained to determine whether there is a storage business at present. If a write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction; divide the logical unit number into multiple fields of the same scale, and determine the field where each logical unit number is located; write the write operation data to each target cache node corresponding to each field. It can be seen that the solution provided by the present application divides the LUN into multiple fields, the number of fields corresponding to each cache node is the same, and directly calls the cache node corresponding to the field to complete the system write operation instruction, thereby ensuring the business load balance of each cache node.
[0097] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps described in the above method embodiment are implemented. The system business load distribution device provided by the present application includes: judging whether a write operation instruction generated by the server is obtained to determine whether there is a storage business at present. If a write operation instruction is obtained, the logical unit number of the hard disk called by the write operation instruction is determined; the logical unit number is divided into multiple fields of the same scale, and the field where each logical unit number is located is determined; and the write operation data is written to each target cache node corresponding to each field. It can be seen that the solution provided by the present application divides the LUN into multiple fields, the number of fields corresponding to each cache node is the same, and the cache node corresponding to the field is directly called to complete the system write operation instruction, thereby ensuring the balance of business load of each cache node.
[0098] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0099] The above is a detailed introduction to the system business load distribution method, device, and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
[0100] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A system service load distribution method, characterized in that: include: Determine whether the write operation instruction generated by the server is obtained; If the write operation instruction is obtained, determining the logical unit number of the hard disk called by the write operation instruction; Divide the logical unit number into a plurality of fields of the same size and evenly distribute the fields to each cache node, and determine the field where each logical unit number is located; Writing the write operation data into each target cache node corresponding to each of the fields; Correspondingly, after the step of writing the write operation data into each target cache node corresponding to each field, the method further includes: Get the cache rule file; Determine a backup node for each cache node according to the cache rule file, and back up the write operation data corresponding to each cache node to the backup node; Correspondingly, after the step of backing up the write operation data corresponding to each cache node to the backup node, the method further includes: When there is a faulty cache node, updating the cache rule file; Re-backing up the data in each cache node according to the updated cache rule file; Correspondingly, determining the backup node of each cache node according to the cache rule file includes: If the field corresponding to the cache node is the end field of the logical unit number, the backup node is the cache node corresponding to the initial field of the logical unit number; If the field corresponding to the cache node is not the last field of the logical unit number, the backup node is a node adjacent to the cache node.
2. The system service load distribution method according to claim 1, characterized in that: The re-backing up the data in each cache node according to the updated cache rule file includes: The reserved computing resources of the controller are used to re-back up the data in each cache node.
3. The system service load distribution method according to claim 1, characterized in that: Before the step of backing up the data in each cache node according to the updated cache rule file, the method further includes: Set different weights for backup requests and controller business requests; Accordingly, executing the backing up of the data in each cache node according to the updated cache rule file includes: Requests with higher weights are executed first.
4. The system service load distribution method according to claim 1, characterized in that: Writing the write operation data into each target cache node corresponding to each field includes: The IO operation instruction is sent to each of the target cache nodes corresponding to each of the fields, so that each of the target cache nodes executes a command to write the write operation data.
5. A system service load distribution device, characterized in that: include: A judgment module is used to judge whether a write operation instruction generated by the server is obtained; A first determining module is configured to, if the write operation instruction is obtained, determine the logical unit number of the hard disk called by the write operation instruction; A second determining module is configured to divide the logical unit number into a plurality of fields of the same size and evenly distribute the fields to each cache node, and determine the field where each logical unit number is located; A writing module, configured to write write operation data into each target cache node corresponding to each of the fields; Correspondingly, after the step of writing the write operation data into each target cache node corresponding to each field, the method further includes: Get the cache rule file; Determine a backup node for each cache node according to the cache rule file, and back up the write operation data corresponding to each cache node to the backup node; Correspondingly, after the step of backing up the write operation data corresponding to each cache node to the backup node, the method further includes: When there is a faulty cache node, updating the cache rule file; Re-backing up the data in each cache node according to the updated cache rule file; Correspondingly, determining the backup node of each cache node according to the cache rule file includes: If the field corresponding to the cache node is the end field of the logical unit number, the backup node is the cache node corresponding to the initial field of the logical unit number; If the field corresponding to the cache node is not the last field of the logical unit number, the backup node is a node adjacent to the cache node.
6. A system service load distribution device, characterized in that: including a memory for storing a computer program; A processor, configured to implement the steps of the system service load distribution method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the system service load distribution method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Cache management method and device, electronic equipment and storage medium
CN111984552A
Data writing method and device and electronic equipment
CN113608699A