WO2021217864A1 - Load balancing method and apparatus for storage cluster, computer device, and storage medium - Google Patents

Load balancing method and apparatus for storage cluster, computer device, and storage medium Download PDF

Info

Publication number
WO2021217864A1
WO2021217864A1 PCT/CN2020/099309 CN2020099309W WO2021217864A1 WO 2021217864 A1 WO2021217864 A1 WO 2021217864A1 CN 2020099309 W CN2020099309 W CN 2020099309W WO 2021217864 A1 WO2021217864 A1 WO 2021217864A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
basic data
role
migration
groups
Prior art date
Application number
PCT/CN2020/099309
Other languages
French (fr)
Chinese (zh)
Inventor
马媛媛
谷忠言
刘子锐
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021217864A1 publication Critical patent/WO2021217864A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of cloud technology, and in particular to a load balancing method, device, computer equipment, and storage medium of a storage cluster.
  • Cloud storage management is a type of application that monitors and manages storage resources on the physical and logical layers. However, after the cluster continues to expand and upgrade, it will face the problem of high data distribution and uncontrollable data distribution.
  • the embodiments of the present application provide a load balancing method, device, computer equipment, and storage medium for a storage cluster to solve the problem of low performance of the storage cluster.
  • a load balancing method for a storage cluster includes multiple physical nodes, and each physical node contains multiple sets of basic data.
  • the load balancing method for the storage cluster includes: when a load balancing instruction is received, calculating the storage The average number of groups of the basic data of all physical nodes in the cluster; according to the average number of groups and the number of groups of the basic data in each physical node, determine the migration of the basic data in each physical node The number of outgoing groups; for each physical node, the outgoing data is determined in the basic data according to the number of outgoing groups; the number of groups of basic data corresponding to all physical nodes of the storage cluster is compared, and the basic data The physical node with the smallest number of groups is used as the initial migration node; the initial migration node is detected to determine whether the basic data in the initial migration node is the same, and the basic data in the initial migration node When the same, the initial migration node is excluded, the updated initial migration node is obtained, and the comparison of the number of groups of basic data
  • a load balancing device for a storage cluster includes a plurality of physical nodes, and each physical node contains multiple sets of basic data.
  • the load balancing device for the storage cluster includes: an average value calculation module for when a load balancing instruction is received Calculate the average number of groups of the basic data of all physical nodes in the storage cluster; the migration group number determination module is used to calculate the average number of groups and the basic data in each physical node The number of groups determines the number of outgoing groups of the basic data in each physical node; the outgoing data determining module is used to determine the outgoing data in the basic data for each physical node according to the number of outgoing groups
  • Migration node acquisition module used to compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node;
  • a computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the load balancing method for a storage cluster when the processor executes the computer program
  • the following steps are implemented: when a load balancing instruction is received, the average number of groups of basic data of all physical nodes in the storage cluster is calculated, the storage cluster includes multiple physical nodes, and each physical node contains multiple sets of basic data ; According to the average of the number of groups and the number of groups of the basic data in each physical node, determine the number of migration groups of the basic data in each physical node; for each physical node, according to the migration The number of outgoing groups determines the outgoing data in the basic data; the group numbers of basic data corresponding to all physical nodes of the storage cluster are compared, and the physical node with the smallest group number of basic data is used as the initial incoming node Detect the initial migration node to determine whether the basic data in the initial migration node is the same, and when
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the load balancing method of the storage cluster are realized, for example, the following steps are realized:
  • When balancing instructions calculate the average number of groups of basic data of all physical nodes in the storage cluster.
  • the storage cluster includes multiple physical nodes, and each physical node contains multiple groups of basic data;
  • the number of groups of the basic data in the physical node determines the number of migration groups of the basic data in each physical node; for each physical node, the number of migration groups is determined in the basic data according to the number of migration groups.
  • the foregoing load balancing method, device, computer equipment and storage medium of the storage cluster improve the performance of the storage cluster.
  • Fig. 1 is a flowchart of a load balancing method for a storage cluster provided by an embodiment of the present application.
  • FIG. 2 is another flowchart of a load balancing method for a storage cluster provided by an embodiment of the present application.
  • Fig. 3 is a flowchart of a basic data distribution method provided by an embodiment of the present application.
  • FIG. 4 is another flowchart of the load balancing method of the storage cluster provided by the embodiment of the present application.
  • Fig. 5 is a flowchart of a load balancing method provided by an embodiment of the present application.
  • Fig. 6 is a flowchart of a method for determining a role tag provided by an embodiment of the present application.
  • FIG. 7 is another flowchart of the load balancing method of the storage cluster provided by the embodiment of the present application.
  • Fig. 8 is a functional block diagram of a load balancing device for a storage cluster provided by an embodiment of the present application.
  • Fig. 9 is a schematic diagram of a computer device provided by an embodiment of the present application.
  • the technical solution of the present application can be applied to the field of big data and/or blockchain technology, and the related data can be stored in a database such as a database cluster, or can be distributed storage through a blockchain, etc., which is not limited by this application.
  • a load balancing method for a storage cluster is provided.
  • This embodiment is applied to a distributed storage system as an example.
  • the storage cluster of the distributed storage system includes multiple physical nodes.
  • Each physical node contains multiple sets of basic data, and each physical node is connected to the network, the load balancing method of the storage cluster specifically includes the following steps.
  • the load balancing instruction refers to the basic data sharing strategy on each physical node in the storage system
  • the physical node refers to the node server in the storage system
  • the basic data refers to the load currently carried by the node server, such as the data requested by the user.
  • the distributed storage system automatically triggers load balancing instructions to calculate the average number of groups of the basic data of all physical nodes in the storage cluster, that is, the number of groups is calculated based on the sum of the number of groups of the basic array on each physical node and the number of all physical nodes The average value, that is, the number of basic data groups that each physical node can achieve a better number of load balancing.
  • S20 Determine the number of migration groups of the basic data in each physical node according to the average number of groups and the number of groups of the basic data in each physical node.
  • the number of migration groups refers to the number of groups of basic data that need to be migrated to other physical nodes in order to ensure the balance of physical nodes. Specifically, after receiving the load balancing instruction, the basic data needs to be migrated out according to the distribution of the basic data on the physical nodes, and an appropriate amount of basic data is migrated out to balance the load of the physical nodes. Therefore, you can By comparing the average number of groups with the number of groups of basic data in each physical node, when the number of groups of basic data in a physical node is greater than the average number of groups, it means that the load on the physical node is relatively large.
  • the number of outgoing groups can be the difference between the group number of the basic data and the average value of the group number, or close to the difference, which is not limited here.
  • the number of basic data groups on the physical node is 5 groups, and the average number of groups is 3 groups, and the number of outgoing groups is 2. Understandably, by determining the number of migration groups of the basic data in each physical node, the basic data on each physical node can be further processed subsequently.
  • the migration data is the basic data in one physical node that needs to be migrated to other physical nodes, and the number of groups of the basic data is the number of migration groups.
  • the migration data can be directly determined by random selection in the corresponding physical node, or can be determined according to the memory size of each basic data in the physical node, or the basic data in the physical node can be directly designated for determination.
  • the basic data of the migration array is selected from the migration array by random selection and determined to be the migration data. Since the basic data has a relatively close impact on the load performance of each physical node, the migration can be improved. The efficiency of data acquisition.
  • S40 Compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node.
  • the initial migration node refers to the candidate physical node used to determine the migration data.
  • the initial migration node may be the target node for receiving the migration data, or it may be the candidate node for receiving the migration data.
  • the basic data in the migration node is judged. Specifically, since the physical node with the smallest number of groups of basic data is the most idle, the load is the smallest, and can carry more load, the physical node with the smallest number of groups of basic data is used as the initial migration node, which avoids one by one.
  • the redundant operation process of detecting each physical node is conducive to improving the efficiency of load balancing.
  • S50 Detect the initial migration node to determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, exclude the initial migration node to obtain the updated initial migration node, and Perform a step of comparing the number of groups of basic data corresponding to all physical nodes of the storage cluster, and taking the physical node with the smallest number of groups of basic data as the initial migration node.
  • the preset restriction condition is that the basic data in the initial migration node is different.
  • the initial migration node is excluded, and the initial migration node that is not excluded is the updated Initially migrate in the node, and then execute step S50. Understandably, in the case that the initial migrated node does not meet the preset restriction conditions, the updated initial migrated node is the physical data group that is several times smaller (the second smallest) of the basic data group.
  • the physical node needs to be excluded, and the initial migration node after continuing to update is the second smallest (third smallest) physical node of the basic data group.
  • the minimum number of groups of basic data on the physical node that meets the preset restriction condition determines the initial migration node to perform cyclic processing until the initial migration node meets the preset restriction condition.
  • step S50 will not loop indefinitely. It can be seen from step S10 that the average number of groups is calculated and determined according to the number of groups of the basic data of all physical nodes in the storage cluster. Therefore, each basic data has an initial migration node.
  • the preset restriction condition is that the basic data in the initial migration node is different. If the initial migration node meets the preset restriction condition, the initial migration node is the target node. Therefore, the migration data is migrated in. To the initial migration node, the load balancing of each physical node is realized, thereby ensuring the load balancing of the storage cluster.
  • the load balance of the storage cluster it is possible to determine whether the difference between the number of basic data groups stored in the initial migration node and the number of basic data groups on the physical node corresponding to the migration data is greater than 1, if it is greater than 1, Then, migration is allowed, and after migration is completed, it should be ensured that the number of basic data groups of the initial migration node is less than or equal to the number of basic data groups on the physical node corresponding to the migration data. Understandably, when the initial migration node meets the preset restriction conditions, the migration data is migrated to the initial migration node, thereby achieving load balancing of the storage cluster and improving the performance of the storage cluster.
  • the average number of groups of the basic data of all physical nodes in the storage cluster is calculated; then, according to the average number of groups and the number of groups of basic data in each physical node, each group is determined The number of outgoing groups of basic data in physical nodes, so that the basic data on each physical node can be further processed; then, for each physical node, the outgoing data is determined in the basic data according to the number of outgoing groups; next, From all physical nodes in the storage cluster, the physical node with the smallest group of basic data is used as the initial migration node; when the basic data of the initial migration node is the same, the initial migration node is excluded, and the updated initial migration node is obtained , And execute the step of obtaining the physical node with the smallest number of basic data groups from the physical nodes of the storage cluster as the initial migration node; when the basic data of the initial migration node is different, the migration data will be migrated to the initial migration node In order to achieve load balancing and
  • step S10 the following steps are further included.
  • S70 When deploying the storage cluster, select a preset number of virtual nodes according to the number of physical nodes included in the storage cluster, and perform N copies of the basic data on each physical node to obtain the corresponding virtual node And generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1.
  • S80 Distribute the basic data to the virtual nodes through a hash algorithm, and store the N groups of basic data mapped to the virtual nodes in the corresponding physical nodes through the mapping relationship table.
  • replica replication refers to the replication of basic data, specifically by synchronizing the basic data on multiple physical nodes.
  • a virtual node refers to a pre-set virtual space, or it can be a hardware architecture. Specifically, the storage space in the storage cluster is divided into a preset number of virtual nodes according to the number of management nodes, and N copies are replicated in units of virtual nodes, so as to obtain N sets of basic data.
  • the virtual node and the physical node are corresponding, that is, the mapping relationship between the virtual node and the physical node is 1:N. Specifically, the corresponding relationship between the virtual node and the physical node can be reflected by the mapping relationship table between the virtual node and the physical node.
  • N is 3 in this embodiment, that is, three copies. Understandably, for a three-copy storage cluster, The successful application of two copies of the three copies is the application success, so one copy is allowed to be broken; if it is a two copy storage cluster, more than half of the machines in the two copies are the integer two, so the application of both copies is successful. Bad machines are allowed; if it is a four-copy storage cluster, three of the four applications are successful, and only one bad copy is allowed; so, five copies allow two bad copies, six copies allow two bad copies, and seven copies allow bad applications Three copies and so on.
  • odd-numbered copies save storage space and guarantee the same fault tolerance. Therefore, odd-numbered copies are preferred. Regarding the choice between three copies, five copies, and seven copies, the more copies, the longer the data synchronization time between the copies, and the slower the response to user requests. Therefore, choosing three copies can improve the reliability of basic data and the practicality of storage clusters. Performance, reducing the application cost of storage clusters.
  • the basic data is distributed to the virtual nodes through a hash algorithm.
  • the basic data is divided into pieces, for example, a piece of 64M is used to number each piece of file, and the data storage address and the piece number are combined, and the MurmurHash (consistent hash) algorithm is used.
  • a 64-bit character string is generated as the hash value of the fragment file, and the hash value is subjected to a remainder operation on the number of virtual nodes, that is, the preset number in step S10, so as to determine which virtual node the fragment file falls on.
  • a preset number of virtual nodes are selected according to the number of physical nodes included in the storage cluster, and N copies of the basic data on each physical node are replicated to obtain each N groups of basic data corresponding to the virtual node, and generate a mapping relationship table between virtual nodes and physical nodes; distribute the basic data to the virtual node through a hash algorithm, and map the N groups of basic data to the virtual node through the mapping relationship table Stored in the corresponding physical node, improving the consistency of basic data and the availability of storage clusters.
  • step S80 the basic data is distributed to the virtual nodes through a hash algorithm, which specifically includes the following steps.
  • S81 Based on the preset memory size, perform fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data.
  • S82 Perform sequential numbering on the virtual nodes, and for each piece of data, use the sequential number of the piece of data to perform a remainder operation on the number of virtual nodes to obtain the numbering modulus of the piece of data.
  • a preset memory size such as 64M, performs fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data; then, sequentially number the virtual nodes, For each piece of data, use the sequential number of the piece of data to perform the remainder operation on the number of virtual nodes to obtain the number modulus of the piece of data; finally, divide the piece data with the same number mod into the same piece set , And save each shard set to the virtual node corresponding to the sequential number that is consistent with the numbering modulus, and the consistency of the basic data is improved through the consistent hash algorithm.
  • the migration data is migrated to the initial migration node to achieve load balancing, and the following steps are further included .
  • S100 For each physical node, determine the migration threshold according to the ratio of the number of groups of basic data on the physical node and N.
  • S110 Perform role label conversion according to the number of groups of basic data whose role label is the leader role, the number of basic data groups whose role label is the follower role, and the migration threshold corresponding to each physical node.
  • the role tag is used to identify the IO (input/output) of the physical node in the storage cluster
  • the leader role is used to receive read and write requests
  • the follower role is used to synchronize the basic data corresponding to the leader role to achieve data synchronization , Improve data security.
  • the IO balancing operation is automatically triggered.
  • IO balance reflected in the storage cluster, is the role label conversion.
  • the N groups of basic data of the virtual node compete with each other, and the basic data is elected from the N groups of basic data through the Raft algorithm as the leader role, and the role label of the remaining basic data is the follower Role.
  • the leader role on each physical node is one-Nth of the number of basic data groups that carry it. This is used as the migration threshold.
  • the number of groups and role label of the basic data of the leader role Perform role label conversion for the number of basic data groups of the follower role and the migration threshold corresponding to each physical node, and perform the migration of the basic data whose role label is the leader role, so that the IO on the physical node is evenly distributed, thereby further realizing the load balanced.
  • step S110 according to the number of basic data groups whose role label is the leader role, the number of basic data groups whose role label is the follower role, and the migration threshold corresponding to each physical node , Perform role label conversion, specifically including the following steps.
  • step S90 the role tags of the N sets of basic data corresponding to each virtual node are determined.
  • the role tags include the leader role and the follower role, which specifically includes the following steps.
  • the Raft algorithm is used to determine the role labels of the N sets of basic data corresponding to each virtual node according to the voting results corresponding to the voting request sent by the physical nodes in the storage cluster, and then the leader role is based on itself
  • the data is synchronized to the basic data corresponding to the follower role, which can ensure that after the leader role is down, the other N-1 groups of basic data in the virtual node re-elect a leader role and N-2 follower roles, making the new The role of the leader is consistent with the basic data of the previous leader role, ensuring that data is not lost.
  • achieving IO balance can maximize the performance of all physical nodes in the storage cluster, and improve the load capacity and response speed of the entire storage cluster.
  • the migration data is migrated to the initial migration node to achieve load balancing, and the following steps are further included .
  • S120 Traverse all physical nodes in the storage cluster.
  • all physical nodes in the storage cluster are traversed.
  • all the basic data in the data to be migrated out cannot find the node to be initially migrated, it is determined that the load balancing is completed, thereby further ensuring the storage Cluster load balancing.
  • a load balancing device for a storage cluster is provided, and the load balancing device for the storage cluster corresponds to the load balancing method for the storage cluster in the foregoing embodiment one-to-one.
  • the load balancing device of the storage cluster includes an average value calculation module 10, a migration group number determination module 20, a migration data determination module 30, a migration node acquisition module 40, a migration node detection module 50, and load balancing. Module 60.
  • the detailed description of each function module is as follows.
  • the average value calculation module 10 is configured to calculate the average value of the group number of the basic data of all physical nodes in the storage cluster when a load balancing instruction is received.
  • the migration group number determining module 20 is configured to determine the migration group number of the basic data in each physical node according to the average value of the group number and the group number of the basic data in each physical node.
  • the migration data determining module 30 is configured to determine the migration data in the basic data according to the number of migration groups for each physical node.
  • the migration node acquisition module 40 is configured to compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node.
  • the migration node detection module 50 is configured to detect the initial migration node and determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, exclude the Initial migration node, obtain the updated initial migration node, and perform the comparison of the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as Steps for initial migration into the node.
  • the load balancing module 60 is configured to migrate the migration data into the initial migration node when the basic data in the initial migration node is different, so as to achieve load balancing.
  • the load balancing device of the storage cluster further includes a copy replication module and a data distribution module.
  • the copy replication module is used to select a preset number of virtual nodes according to the number of physical nodes included in the storage cluster when the storage cluster is deployed, and respectively perform N copies of the basic data on each physical node Copy to obtain N groups of basic data corresponding to each virtual node, and generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1.
  • the data distribution module is configured to distribute the basic data to the virtual node through a hash algorithm, and store the N groups of basic data mapped to the virtual node in the corresponding physical node through the mapping relationship table. node.
  • the data distribution module includes a data slicing unit, a number modulus calculation unit, and a data storage unit.
  • the data fragmentation unit is configured to perform fragmentation processing on the basic data based on a preset memory size to obtain fragmented data, and sequentially number each fragmented data.
  • the numbering modulus calculation unit is configured to sequentially number the virtual nodes, and for each of the fragmented data, use the serial number of the fragmented data to perform a remainder operation on the number of the virtual nodes to obtain the value of the fragmented data Numbering mode.
  • the data storage unit is configured to divide the fragment data with the same serial number module into the same fragment set, and save each of the fragment sets on the virtual node corresponding to the sequence number consistent with the serial number modulus.
  • the load balancing device of the storage cluster further includes a role determination module, a threshold determination module, and a role conversion module.
  • the role determination module is configured to determine the role tags of the N groups of the basic data corresponding to each virtual node, and the role tags include a leader role and a follower role.
  • the threshold determination module is configured to determine the migration threshold according to the ratio of the number of groups of basic data on the physical node and N for each physical node.
  • the role conversion module is configured to perform according to the number of groups of the basic data whose role label is a leader role, the number of groups of basic data whose role label is a follower role, and the migration threshold corresponding to each physical node Role label conversion.
  • the role conversion module includes a first conversion unit and a second conversion unit.
  • the first conversion unit is configured to convert the role label that exceeds the migration threshold into the role label of the basic data of the leader role when the number of groups of the basic data whose role label is the leader role is greater than the migration threshold It is a follower role, and one basic data is selected from the basic data of the physical node and its role label is set as the leader role.
  • the second conversion unit is configured to transfer the basic data whose role is labeled as the leader role to the physical node when the number of groups of the basic data whose role is labeled as the leader role is less than the migration threshold.
  • the basic data whose role label is the leader role in the physical node is converted into the follower role until the number of groups of the basic data whose role label is the leader role in the physical node meets the migration threshold.
  • the role determination module includes a request sending unit, a result receiving unit, and a role determination unit.
  • the request sending unit is configured to send a voting request to the physical nodes in the storage cluster.
  • the result receiving unit is configured to receive the voting result returned by the physical node corresponding to the voting request.
  • the role determination unit is configured to select, from the N sets of basic data of the virtual node corresponding to the physical node, the role label of one set of basic data to determine the role of the leader according to the voting result, and the N-1 sets of basic data
  • the role tag is determined as the follower role.
  • the load balancing device of the storage cluster further includes a node traversal module and a load balancing module.
  • the node traversal module is used to traverse all physical nodes in the storage cluster.
  • the load balancing module is configured to determine that the load of the storage cluster reaches a balanced state when there is no migration data in the physical node.
  • the various modules in the load balancing device of the storage cluster can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the computer equipment database is used to store physical nodes and basic data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a load balancing method of the storage cluster.
  • a computer device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor executes the computer program to implement the load balancing method of the storage cluster in the foregoing embodiment. , For example, step S10 to step S60 shown in FIG. 1.
  • the function of each module/unit of the load balancing apparatus of the storage cluster in the foregoing embodiment is realized, for example, the module 10 to the module 60 shown in FIG. 8. To avoid repetition, I won’t repeat them here.
  • a computer-readable storage medium is provided, and a computer program is stored thereon.
  • the steps of the load balancing method of the storage cluster in the foregoing embodiment are implemented, or the computer program is executed by the processor.
  • the functions of the modules/units of the load balancing device of the storage cluster of the foregoing embodiment are realized during execution. In order to avoid repetition, details are not described herein again.
  • the storage medium involved in this application such as a computer-readable storage medium, may be non-volatile or volatile.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A load balancing method for a storage cluster, relating to the field of cloud technology. The method comprises: upon receiving a load balancing instruction, calculating a group-count mean value for basic data of all physical nodes in a storage cluster (S10); determining, according to the group-count mean value and a group count of basic data in each physical node, a migration group count of basic data in each physical node (S20); determining, for each physical node, migration data from the basic data according to the migration group count (S30); acquiring, from all the physical nodes in the storage cluster, a physical node having the smallest group count of basic data to serve as an initial migration-reception node (S40); and if the initial migration-reception node has different basic data, migrating the migration data to the initial migration-reception node so as to perform load balancing (S60). The invention thus improves the performance of storage clusters.

Description

存储集群的负载均衡方法、装置、计算机设备及存储介质Load balancing method, device, computer equipment and storage medium of storage cluster
本申请要求于2020年4月29日提交中国专利局、申请号为202010355344.X,发明名称为“存储集群的负载均衡方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 29, 2020, the application number is 202010355344.X, and the invention title is "Load balancing methods, devices, computer equipment and storage media for storage clusters". The entire content is incorporated into this application by reference.
技术领域Technical field
本申请涉及云技术领域,尤其涉及一种存储集群的负载均衡方法、装置、计算机设备及存储介质。This application relates to the field of cloud technology, and in particular to a load balancing method, device, computer equipment, and storage medium of a storage cluster.
背景技术Background technique
软件定义存储由于其方便灵活的伸缩性,存储系统可以在硬件承载范围内任意伸缩。正在被越来越多的企业采用。伴随着云存储的普及,云存储管理成为目前存储领域不可或缺的技术。云存储管理是一类应用程序,它们监控和管理物理及逻辑层上的存储资源。但是集群在不断扩容升级后,会面临数据分布倾斜性高,数据分布不可控的问题。Because of its convenient and flexible scalability, software-defined storage allows the storage system to scale arbitrarily within the scope of the hardware. It is being adopted by more and more companies. With the popularity of cloud storage, cloud storage management has become an indispensable technology in the storage field. Cloud storage management is a type of application that monitors and manages storage resources on the physical and logical layers. However, after the cluster continues to expand and upgrade, it will face the problem of high data distribution and uncontrollable data distribution.
随着集群规模扩大,新机器不断加入,势必会出现数据在集群中分布不均的问题,造成一些机器空闲,其他机器高负荷的情况;同时,由于数据的冷热不同,会导致集群的IO分布不均衡,从而降低集群的有效容量使用率和整体性能。然而发明人意识到,目前针对数据均衡和IO均衡等多维度的均衡问题,通常做法是综合考虑多个因素,按重要程度为各因素分配权重,按权重相加之后统一排序,生成最终的迁移策略。这种多维度综合考虑的均衡算法,使得集群在每个维度上都不能达到最优,而且难以保证数据读写的同步,难以实现负载均衡,降低了集群的性能。As the scale of the cluster expands and new machines continue to join, the problem of uneven distribution of data in the cluster will inevitably occur, causing some machines to be idle and other machines to be heavily loaded; at the same time, due to the different cold and hot data, it will cause the IO of the cluster. The distribution is unbalanced, thereby reducing the effective capacity utilization rate and overall performance of the cluster. However, the inventor realizes that for the current multi-dimensional balance problems such as data balance and IO balance, the usual approach is to comprehensively consider multiple factors, assign weights to each factor according to the degree of importance, and sort them according to the addition of the weights to generate the final migration. Strategy. This multi-dimensional balancing algorithm makes the cluster unable to achieve the optimal in each dimension, and it is difficult to ensure the synchronization of data reading and writing, and it is difficult to achieve load balancing, which reduces the performance of the cluster.
技术问题technical problem
本申请实施例提供一种存储集群的负载均衡方法、装置、计算机设备及存储介质,以解决存储集群性能低下的问题。The embodiments of the present application provide a load balancing method, device, computer equipment, and storage medium for a storage cluster to solve the problem of low performance of the storage cluster.
技术解决方案Technical solutions
一种存储集群的负载均衡方法,该存储集群中包括多个物理节点,每个物理节点包含多组基础数据,该存储集群的负载均衡方法包括:当接收到负载均衡指令时,计算所述存储集群中所有物理节点的所述基础数据的组数均值;根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡。A load balancing method for a storage cluster. The storage cluster includes multiple physical nodes, and each physical node contains multiple sets of basic data. The load balancing method for the storage cluster includes: when a load balancing instruction is received, calculating the storage The average number of groups of the basic data of all physical nodes in the cluster; according to the average number of groups and the number of groups of the basic data in each physical node, determine the migration of the basic data in each physical node The number of outgoing groups; for each physical node, the outgoing data is determined in the basic data according to the number of outgoing groups; the number of groups of basic data corresponding to all physical nodes of the storage cluster is compared, and the basic data The physical node with the smallest number of groups is used as the initial migration node; the initial migration node is detected to determine whether the basic data in the initial migration node is the same, and the basic data in the initial migration node When the same, the initial migration node is excluded, the updated initial migration node is obtained, and the comparison of the number of groups of basic data corresponding to all physical nodes of the storage cluster is performed, and the number of groups of basic data is the smallest The physical node is used as an initial migration step; when the basic data in the initial migration node is different, the migration data is migrated to the initial migration node to achieve load balancing.
一种存储集群的负载均衡装置,该存储集群中包括多个物理节点,每个物理节点包含多组基础数据,该存储集群的负载均衡装置包括:均值计算模块,用于当接收到负载均衡指令时,计算所述存储集群中所有物理节点的所述基础数据的组数均值;迁出组数确定模块,用于根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;迁出数据确定模块,用于针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;迁入节点获取模块,用于对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;迁入节点检测模块,用于对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;负载均衡模块,用于在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中。A load balancing device for a storage cluster. The storage cluster includes a plurality of physical nodes, and each physical node contains multiple sets of basic data. The load balancing device for the storage cluster includes: an average value calculation module for when a load balancing instruction is received Calculate the average number of groups of the basic data of all physical nodes in the storage cluster; the migration group number determination module is used to calculate the average number of groups and the basic data in each physical node The number of groups determines the number of outgoing groups of the basic data in each physical node; the outgoing data determining module is used to determine the outgoing data in the basic data for each physical node according to the number of outgoing groups Migration node acquisition module, used to compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node; Migration node detection A module for detecting the initial migration node, judging whether the basic data in the initial migration node is the same, and when the basic data in the initial migration node is the same, excluding the initial migration node, Obtain the updated initial migration node, and perform the comparison of the group numbers of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest group number of basic data as the initial migration node Step; a load balancing module for migrating the migration data into the initial migration node when the basic data in the initial migration node is different.
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述存储集群的负载均衡方法的步骤,例如,实现以下步骤:当接收到负载均衡指令时,计算存储集群中所有物理节点的基础数据的组数均值,所述存储集群中包括多个物理节点,每个物理节点包含多组基础数据;根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中。A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the load balancing method for a storage cluster when the processor executes the computer program For example, the following steps are implemented: when a load balancing instruction is received, the average number of groups of basic data of all physical nodes in the storage cluster is calculated, the storage cluster includes multiple physical nodes, and each physical node contains multiple sets of basic data ; According to the average of the number of groups and the number of groups of the basic data in each physical node, determine the number of migration groups of the basic data in each physical node; for each physical node, according to the migration The number of outgoing groups determines the outgoing data in the basic data; the group numbers of basic data corresponding to all physical nodes of the storage cluster are compared, and the physical node with the smallest group number of basic data is used as the initial incoming node Detect the initial migration node to determine whether the basic data in the initial migration node is the same, and when the basic data in the initial migration node is the same, exclude the initial migration node to obtain the updated And execute the step of comparing the number of groups of basic data corresponding to all physical nodes of the storage cluster, and using the physical node with the smallest number of groups of basic data as the initial migration node; When the basic data in the initial migration node is different, the migration data is migrated to the initial migration node.
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述存储集群的负载均衡方法的步骤,例如,实现以下步骤:当接收到负载均衡指令时,计算存储集群中所有物理节点的基础数据的组数均值,所述存储集群中包括多个物理节点,每个物理节点包含多组基础数据;根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中。A computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the load balancing method of the storage cluster are realized, for example, the following steps are realized: When balancing instructions, calculate the average number of groups of basic data of all physical nodes in the storage cluster. The storage cluster includes multiple physical nodes, and each physical node contains multiple groups of basic data; The number of groups of the basic data in the physical node determines the number of migration groups of the basic data in each physical node; for each physical node, the number of migration groups is determined in the basic data according to the number of migration groups. Out data; compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node; detect the initial migration node, Determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, exclude the initial migration node to obtain the updated initial migration node, and execute the pairing The number of groups of basic data corresponding to all physical nodes of the storage cluster is compared, and the physical node with the smallest number of groups of basic data is used as the initial migration node; the basic data in the initial migration node is not At the same time, the migration data is migrated into the initial migration node.
有益效果Beneficial effect
上述存储集群的负载均衡方法、装置、计算机设备及存储介质,提高了存储集群的性能。The foregoing load balancing method, device, computer equipment and storage medium of the storage cluster improve the performance of the storage cluster.
附图说明Description of the drawings
图1是本申请实施例提供的存储集群的负载均衡方法的流程图。Fig. 1 is a flowchart of a load balancing method for a storage cluster provided by an embodiment of the present application.
图2是本申请实施例提供的存储集群的负载均衡方法的另一流程图。Fig. 2 is another flowchart of a load balancing method for a storage cluster provided by an embodiment of the present application.
图3是本申请实施例提供的基础数据分配方法的流程图。Fig. 3 is a flowchart of a basic data distribution method provided by an embodiment of the present application.
图4是本申请实施例提供的存储集群的负载均衡方法的又一流程图。FIG. 4 is another flowchart of the load balancing method of the storage cluster provided by the embodiment of the present application.
图5是本申请实施例提供的负载均衡方法的流程图。Fig. 5 is a flowchart of a load balancing method provided by an embodiment of the present application.
图6是本申请实施例提供的角色标签确定方法的流程图。Fig. 6 is a flowchart of a method for determining a role tag provided by an embodiment of the present application.
图7是本申请实施例提供的存储集群的负载均衡方法的再一流程图。FIG. 7 is another flowchart of the load balancing method of the storage cluster provided by the embodiment of the present application.
图8是本申请实施例提供的存储集群的负载均衡装置的原理框图。Fig. 8 is a functional block diagram of a load balancing device for a storage cluster provided by an embodiment of the present application.
图9是本申请实施例提供的计算机设备的示意图。Fig. 9 is a schematic diagram of a computer device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
本申请的技术方案可应用于大数据和/或区块链技术领域,涉及的数据可存储于数据库如数据库集群中,或者可以通过区块链分布式存储,等等,本申请不做限定。The technical solution of the present application can be applied to the field of big data and/or blockchain technology, and the related data can be stored in a database such as a database cluster, or can be distributed storage through a blockchain, etc., which is not limited by this application.
如图1所示,在一个实施例中,提供了一种存储集群的负载均衡方法,本实施例以应用于分布式存储系统举例说明,该分布式存储系统的存储集群中包括多个物理节点,每个物理节点包含多组基础数据,且每个物理节点网络通信连接,该存储集群的负载均衡方法具体包括以下步骤。As shown in Figure 1, in one embodiment, a load balancing method for a storage cluster is provided. This embodiment is applied to a distributed storage system as an example. The storage cluster of the distributed storage system includes multiple physical nodes. , Each physical node contains multiple sets of basic data, and each physical node is connected to the network, the load balancing method of the storage cluster specifically includes the following steps.
S10:当接收到负载均衡指令时,计算存储集群中所有物理节点的基础数据的组数均值。S10: When the load balancing instruction is received, calculate the average group number of the basic data of all physical nodes in the storage cluster.
其中,负载均衡指令是指存储系统中各个物理节点上的基础数据的分担策略,物理节点是指存储系统中节点服务器,基础数据是指节点服务器当前承载的负载,如用户发送请求的数据。当检测到存储集群中出现了负载不均衡的情况,示例性地,新加入了物理节点到该集群中,此时,存储集群会出现严重不均衡的情况(如新加入的物理节点负载为空),分布式存储系统自动触发负载均衡指令,计算存储集群中所有物理节点的基础数据的组数均值,即根据各个物理节点上基础数组的组数的总和所有物理节点的数量,计算得到组数均值,也即各个物理节点能够达到负载均衡的较佳数量的基础数据组数。Among them, the load balancing instruction refers to the basic data sharing strategy on each physical node in the storage system, the physical node refers to the node server in the storage system, and the basic data refers to the load currently carried by the node server, such as the data requested by the user. When it is detected that the load is unbalanced in the storage cluster, for example, a new physical node is added to the cluster. At this time, the storage cluster will be seriously unbalanced (for example, the load of the newly added physical node is empty). ), the distributed storage system automatically triggers load balancing instructions to calculate the average number of groups of the basic data of all physical nodes in the storage cluster, that is, the number of groups is calculated based on the sum of the number of groups of the basic array on each physical node and the number of all physical nodes The average value, that is, the number of basic data groups that each physical node can achieve a better number of load balancing.
S20:根据组数均值和每个物理节点中的基础数据的组数,确定每个物理节点中基础数据的迁出组数。S20: Determine the number of migration groups of the basic data in each physical node according to the average number of groups and the number of groups of the basic data in each physical node.
其中,迁出组数是指为保证物理节点平衡,需要进行迁移到其他物理节点上的基础数据的组数。具体地,在接收到负载均衡指令后,需要根据物理节点上基础数据的分布来进行基础数据的进行迁出处理,通过迁出合适数量的基础数据,以使物理节点的负载均衡,因此,可以通过比较组数均值与每个物理节点中的基础数据的组数,当物理节点中的基础数据的组数大于组数均值时,则说明该物理节点中负载较大,为了减少该物理节点的负载,因此需要迁出合适数量的基础数据,以保证物理节点的负载均衡。此时,就需要确定迁出组数,该迁出组数可以是基础数据的组数与组数均值的差值,或者与差值接近,此处不做限定。在一具体实施方式中,其中的物理节点上的基础数据组数为5组,而组数均值为3组,则迁出组数为2。可以理解地,通过确定每个物理节点中基础数据的迁出组数,以便后续对各个物理节点上的基础数据进行进一步处理。Among them, the number of migration groups refers to the number of groups of basic data that need to be migrated to other physical nodes in order to ensure the balance of physical nodes. Specifically, after receiving the load balancing instruction, the basic data needs to be migrated out according to the distribution of the basic data on the physical nodes, and an appropriate amount of basic data is migrated out to balance the load of the physical nodes. Therefore, you can By comparing the average number of groups with the number of groups of basic data in each physical node, when the number of groups of basic data in a physical node is greater than the average number of groups, it means that the load on the physical node is relatively large. In order to reduce the physical node’s Therefore, a suitable amount of basic data needs to be moved out to ensure the load balance of the physical nodes. At this time, it is necessary to determine the number of outgoing groups. The number of outgoing groups can be the difference between the group number of the basic data and the average value of the group number, or close to the difference, which is not limited here. In a specific embodiment, the number of basic data groups on the physical node is 5 groups, and the average number of groups is 3 groups, and the number of outgoing groups is 2. Understandably, by determining the number of migration groups of the basic data in each physical node, the basic data on each physical node can be further processed subsequently.
S30:针对每个物理节点,根据迁出组数在基础数据中确定迁出数据。S30: For each physical node, determine the migration data in the basic data according to the number of migration groups.
其中,迁出数据是一个物理节点中的需要进行迁移到其他物理节点上的基础数据,且基础数据的组数为迁出组数。具体地,迁出数据可以直接在对应的物理节点中通过随机选取的方式确定,也可以根据物理节点中各个基础数据的内存大小进行确定,还可以直接指定物理节点中基础数据进行确定。作为本实施例的优选,通过随机选取的方式从迁出数组中选取迁出数组个基础数据确定为迁出数据,由于基础数据对每个物理节点的负载性能影响比较接近,因此,能够提高迁出数据的获取效率。Among them, the migration data is the basic data in one physical node that needs to be migrated to other physical nodes, and the number of groups of the basic data is the number of migration groups. Specifically, the migration data can be directly determined by random selection in the corresponding physical node, or can be determined according to the memory size of each basic data in the physical node, or the basic data in the physical node can be directly designated for determination. As a preference of this embodiment, the basic data of the migration array is selected from the migration array by random selection and determined to be the migration data. Since the basic data has a relatively close impact on the load performance of each physical node, the migration can be improved. The efficiency of data acquisition.
S40:对存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的物理节点作为初始迁入节点。S40: Compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node.
其中,初始迁入节点是指用于确定接收迁出数据的候选物理节点,该初始迁入节点可能是接收迁出数据的目标节点,也可能是接收迁出数据的备选节点,具体根据初始迁入节点中的基础数据进行判断。具体地,由于基础数据的组数最小的物理节点中的最为空闲,负载最小,能够承载更多的负载,因此,将基础数据的组数最小的物理节点作为初始迁入节点,避免了一一对各个物理节点进行检测的冗余操作过程,有利于提高负载均衡效率。Among them, the initial migration node refers to the candidate physical node used to determine the migration data. The initial migration node may be the target node for receiving the migration data, or it may be the candidate node for receiving the migration data. The basic data in the migration node is judged. Specifically, since the physical node with the smallest number of groups of basic data is the most idle, the load is the smallest, and can carry more load, the physical node with the smallest number of groups of basic data is used as the initial migration node, which avoids one by one. The redundant operation process of detecting each physical node is conducive to improving the efficiency of load balancing.
S50:对初始迁入节点进行检测,判断初始迁入节点中的基础数据是否相同,在初始迁入节点中的基础数据相同时,排除初始迁入节点,得到更新后的初始迁入节点,并执行对存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的物理节点作为初始迁入节点的步骤。S50: Detect the initial migration node to determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, exclude the initial migration node to obtain the updated initial migration node, and Perform a step of comparing the number of groups of basic data corresponding to all physical nodes of the storage cluster, and taking the physical node with the smallest number of groups of basic data as the initial migration node.
具体地,为了保证存储集群的可靠性,避免初始迁入节点中的基础数据相同,如同一个初始迁入节点中存在基础数据对应的2个或者以上副本,因此,需要判断初始迁入节点是否预设限制条件,该预设限制条件为初始迁入节点中的基础数据不同,在初始迁入节点中的基础数据相同时,排除初始迁入节点,未被排除的初始迁入节点作为更新后的初始迁入节点,然后执行步骤S50,可以理解地,在初始迁入节点不满足预设限制条件的情况下,更新后的初始迁入节点为基础数据组数次小(第二小)的物理节点,若次小的物理节点仍然不满足预设限制条件,则需要排除该物理节点,继续更新后的初始迁入节点为基础数据组数次次小(第三小)的物理节点,按照不满足预设限制条件的物理节点上基础数据的组数最小确定初始迁入节点进行循环处理,直到初始迁入节点满足预设限制条件为止。Specifically, in order to ensure the reliability of the storage cluster, avoid the same basic data in the initial migration node, just as there are two or more copies of the basic data in an initial migration node. Therefore, it is necessary to determine whether the initial migration node is in advance. Set a restriction condition. The preset restriction condition is that the basic data in the initial migration node is different. When the basic data in the initial migration node is the same, the initial migration node is excluded, and the initial migration node that is not excluded is the updated Initially migrate in the node, and then execute step S50. Understandably, in the case that the initial migrated node does not meet the preset restriction conditions, the updated initial migrated node is the physical data group that is several times smaller (the second smallest) of the basic data group. If the next smallest physical node still does not meet the preset restriction conditions, the physical node needs to be excluded, and the initial migration node after continuing to update is the second smallest (third smallest) physical node of the basic data group. The minimum number of groups of basic data on the physical node that meets the preset restriction condition determines the initial migration node to perform cyclic processing until the initial migration node meets the preset restriction condition.
需要说明的是,该步骤S50不会无限循环,由步骤S10可知,组数均值是根据存储集群中所有物理节点的基础数据的组数计算确定的,因此,每个基础数据均存在初始迁入节点。It should be noted that this step S50 will not loop indefinitely. It can be seen from step S10 that the average number of groups is calculated and determined according to the number of groups of the basic data of all physical nodes in the storage cluster. Therefore, each basic data has an initial migration node.
S60:在初始迁入节点中的基础数据不同时,将迁出数据迁入到初始迁入节点中,以实现负载均衡,其中,预设限制条件为初始迁入节点中的基础数据不同。S60: When the basic data in the initial migration node is different, migrate the migration data into the initial migration node to achieve load balancing, wherein the preset restriction condition is that the basic data in the initial migration node is different.
具体地,预设限制条件为初始迁入节点中的基础数据不同,在初始迁入节点满足预设限制条件的情况下,则初始迁入节点即为目标节点,因此,将迁出数据迁入到初始迁入节点中,从而实现了各个物理节点的负载均衡,从而保证能够了存储集群的负载均衡。Specifically, the preset restriction condition is that the basic data in the initial migration node is different. If the initial migration node meets the preset restriction condition, the initial migration node is the target node. Therefore, the migration data is migrated in. To the initial migration node, the load balancing of each physical node is realized, thereby ensuring the load balancing of the storage cluster.
需要说明的是,为了进一步保证存储集群的负载均衡,可以通过判断初始迁入节点存储的基础数据组数与迁出数据对应的物理节点上的基础数据组数相差是否大于1,若大于1,则允许迁入,且迁入完成后,应保证初始迁入节点的基础数据组数小于或者等于迁出数据对应的物理节点上的基础数据组数。可以理解地,在初始迁入节点满足预设限制条件的情况下,将迁出数据迁入到初始迁入节点中,从而实现了存储集群的负载均衡,提高了存储集群的性能。It should be noted that, in order to further ensure the load balance of the storage cluster, it is possible to determine whether the difference between the number of basic data groups stored in the initial migration node and the number of basic data groups on the physical node corresponding to the migration data is greater than 1, if it is greater than 1, Then, migration is allowed, and after migration is completed, it should be ensured that the number of basic data groups of the initial migration node is less than or equal to the number of basic data groups on the physical node corresponding to the migration data. Understandably, when the initial migration node meets the preset restriction conditions, the migration data is migrated to the initial migration node, thereby achieving load balancing of the storage cluster and improving the performance of the storage cluster.
本实施例中,在接收到负载均衡指令时,计算存储集群中所有物理节点的基础数据的组数均值;然后,根据组数均值和每个物理节点中的基础数据的组数,确定每个物理节点中基础数据的迁出组数,以便后续对各个物理节点上的基础数据进行进一步处理;接着,针对每个物理节点,根据迁出组数在基础数据中确定迁出数据;接下来,从存储集群的所有物理节点中,获取基础数据的组数最小的物理节点作为初始迁入节点;在初始迁入节点的基础数据相同时,排除初始迁入节点,得到更新后的初始迁入节点,并执行从存储集群的物理节点中,获取基础数据组数最小的物理节点作为初始迁入节点的步骤;在初始迁入节点的基础数据不同时,将迁出数据迁入到初始迁入节点中,以实现负载均衡,提高了存储集群的性能。In this embodiment, when the load balancing instruction is received, the average number of groups of the basic data of all physical nodes in the storage cluster is calculated; then, according to the average number of groups and the number of groups of basic data in each physical node, each group is determined The number of outgoing groups of basic data in physical nodes, so that the basic data on each physical node can be further processed; then, for each physical node, the outgoing data is determined in the basic data according to the number of outgoing groups; next, From all physical nodes in the storage cluster, the physical node with the smallest group of basic data is used as the initial migration node; when the basic data of the initial migration node is the same, the initial migration node is excluded, and the updated initial migration node is obtained , And execute the step of obtaining the physical node with the smallest number of basic data groups from the physical nodes of the storage cluster as the initial migration node; when the basic data of the initial migration node is different, the migration data will be migrated to the initial migration node In order to achieve load balancing and improve the performance of the storage cluster.
在一实施例中,如图2所示,在步骤S10之前,还包括如下步骤。In an embodiment, as shown in FIG. 2, before step S10, the following steps are further included.
S70:在对存储集群进行部署时,根据存储集群中包含的物理节点的数目,选取预设数目的虚拟节点,分别对每个物理节点上的基础数据进行N副本复制,得到每一虚拟节点对应的N组基础数据,并生成虚拟节点与物理节点的映射关系表,其中,N为大于1的正整数。S70: When deploying the storage cluster, select a preset number of virtual nodes according to the number of physical nodes included in the storage cluster, and perform N copies of the basic data on each physical node to obtain the corresponding virtual node And generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1.
S80:通过哈希算法将基础数据分配至虚拟节点上,并通过映射关系表,将映射到虚拟节点的N组基础数据存储在对应的物理节点。S80: Distribute the basic data to the virtual nodes through a hash algorithm, and store the N groups of basic data mapped to the virtual nodes in the corresponding physical nodes through the mapping relationship table.
其中,副本复制是指对基础数据进行复制,具体地可通过将基础数据同步在多个物理节点。虚拟节点是指预先设置好的虚拟空间,也可以是硬件架构。具体地,将存储集群中的存储空间根据理节点的数目划分为预设数目虚拟节点,以虚拟节点为单位进行N副本复制,从而得到N组基础数据。虚拟节点与物理节点是对应的,即虚拟节点与物理节点的映射关系为1:N,具体可以通过虚拟节点与物理节点的映射关系表反映二者的对应关系。值得说明的是,在本实施例中,涉及基础数据较多,处理的机器性能有限,作为一种优选方式,本实施例N为3,即三副本,可以理解地,对于三副本存储集群,三份中的两份应用成功为应用成功,所以允许坏一副本;如果是两副本存储集群,两份中的多于半数的机器为整数二,所以两份都应用成功才算成功,不允许坏机器;如果是四副本存储集群,四份中的三份应用成功为应用成功,也是只允许坏一副本;如此,五副本允许坏二副本,六副本允许坏二副本,七副本允许坏三副本等。因此,奇数个副本相比于偶数个副本,省存储空间,并且能保证相同的容错能力,因此优先选用奇数副本。对于三副本、五副本、七副本之间的选择问题,副本越多,副本之间同步数据时间越长,响应用户请求越慢,因此,选择三副本,能够提高基础数据可靠性、存储集群实用性,降低存储集群的应用成本。Among them, replica replication refers to the replication of basic data, specifically by synchronizing the basic data on multiple physical nodes. A virtual node refers to a pre-set virtual space, or it can be a hardware architecture. Specifically, the storage space in the storage cluster is divided into a preset number of virtual nodes according to the number of management nodes, and N copies are replicated in units of virtual nodes, so as to obtain N sets of basic data. The virtual node and the physical node are corresponding, that is, the mapping relationship between the virtual node and the physical node is 1:N. Specifically, the corresponding relationship between the virtual node and the physical node can be reflected by the mapping relationship table between the virtual node and the physical node. It is worth noting that in this embodiment, more basic data is involved, and the performance of the machine to be processed is limited. As a preferred method, N is 3 in this embodiment, that is, three copies. Understandably, for a three-copy storage cluster, The successful application of two copies of the three copies is the application success, so one copy is allowed to be broken; if it is a two copy storage cluster, more than half of the machines in the two copies are the integer two, so the application of both copies is successful. Bad machines are allowed; if it is a four-copy storage cluster, three of the four applications are successful, and only one bad copy is allowed; so, five copies allow two bad copies, six copies allow two bad copies, and seven copies allow bad applications Three copies and so on. Therefore, compared with even-numbered copies, odd-numbered copies save storage space and guarantee the same fault tolerance. Therefore, odd-numbered copies are preferred. Regarding the choice between three copies, five copies, and seven copies, the more copies, the longer the data synchronization time between the copies, and the slower the response to user requests. Therefore, choosing three copies can improve the reliability of basic data and the practicality of storage clusters. Performance, reducing the application cost of storage clusters.
具体地,通过哈希算法将基础数据分配至虚拟节点上。在一具体实施方式中,将基础数据进行分片处理,例如,以64M大小为一片,为每片文件进行编号,将数据存储地址与分片编号进行组合,通过MurmurHash(一致性哈希)算法生成64位字符串,作为分片文件的哈希值,将该哈希值对虚拟节点的数目即步骤S10中的预设数目进行取余操作,从而确定该分片文件落在哪个虚拟节点。通过查找映射关系表,将分片数据存储于N(如N=3)个物理节点,通过建立虚拟节点并将基础数据映射到物理节点,提高了基础数据的一致性和存储集群的可用性。Specifically, the basic data is distributed to the virtual nodes through a hash algorithm. In a specific embodiment, the basic data is divided into pieces, for example, a piece of 64M is used to number each piece of file, and the data storage address and the piece number are combined, and the MurmurHash (consistent hash) algorithm is used. A 64-bit character string is generated as the hash value of the fragment file, and the hash value is subjected to a remainder operation on the number of virtual nodes, that is, the preset number in step S10, so as to determine which virtual node the fragment file falls on. By looking up the mapping table, the fragmented data is stored in N (such as N=3) physical nodes, and by establishing virtual nodes and mapping the basic data to the physical nodes, the consistency of the basic data and the availability of the storage cluster are improved.
本实施例中,在对存储集群进行部署时,根据存储集群中包含的物理节点的数目,选取预设数目的虚拟节点,分别对每个物理节点上的基础数据进行N副本复制,得到每一虚拟节点对应的N组基础数据,并生成虚拟节点与物理节点的映射关系表;通过哈希算法将基础数据分配至虚拟节点上,并通过映射关系表,将映射到虚拟节点的N组基础数据存储在对应的物理节点,提高了基础数据的一致性和存储集群的可用性。In this embodiment, when the storage cluster is deployed, a preset number of virtual nodes are selected according to the number of physical nodes included in the storage cluster, and N copies of the basic data on each physical node are replicated to obtain each N groups of basic data corresponding to the virtual node, and generate a mapping relationship table between virtual nodes and physical nodes; distribute the basic data to the virtual node through a hash algorithm, and map the N groups of basic data to the virtual node through the mapping relationship table Stored in the corresponding physical node, improving the consistency of basic data and the availability of storage clusters.
在一实施例中,如图3所示,步骤S80中,通过哈希算法将基础数据分配至虚拟节点上,具体包括如下步骤。In an embodiment, as shown in FIG. 3, in step S80, the basic data is distributed to the virtual nodes through a hash algorithm, which specifically includes the following steps.
S81:基于预设的内存大小,对基础数据进行分片处理,得到分片数据,并对每个分片数据进行顺序编号。S81: Based on the preset memory size, perform fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data.
S82:对虚拟节点进行顺序编号,针对每个分片数据,使用分片数据的顺序编号对虚拟节点的数量进行取余运算,得到该分片数据的编号模。S82: Perform sequential numbering on the virtual nodes, and for each piece of data, use the sequential number of the piece of data to perform a remainder operation on the number of virtual nodes to obtain the numbering modulus of the piece of data.
S83:将编号模相同的分片数据分入同一个分片集合中,并将每个分片集合保存到与编号模一致的顺序编号对应的虚拟节点上。S83: Divide the fragment data with the same number modulus into the same fragment set, and save each fragment set on the virtual node corresponding to the sequence number consistent with the number modulus.
在这个实施例中,首先,预设的内存大小,如64M,对基础数据进行分片处理,得到分片数据,并对每个分片数据进行顺序编号;然后,对虚拟节点进行顺序编号,针对每个分片数据,使用分片数据的顺序编号对虚拟节点的数量进行取余运算,得到该分片数据的编号模;最后,将编号模相同的分片数据分入同一个分片集合中,并将每个分片集合保存到与编号模一致的顺序编号对应的虚拟节点上,通过一致性哈希算法提高了基础数据的一致性。In this embodiment, first, a preset memory size, such as 64M, performs fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data; then, sequentially number the virtual nodes, For each piece of data, use the sequential number of the piece of data to perform the remainder operation on the number of virtual nodes to obtain the number modulus of the piece of data; finally, divide the piece data with the same number mod into the same piece set , And save each shard set to the virtual node corresponding to the sequential number that is consistent with the numbering modulus, and the consistency of the basic data is improved through the consistent hash algorithm.
在一实施例中,如图4所示,在初始迁入节点满足预设限制条件的情况下,则将迁出数据迁入到初始迁入节点中,以实现负载均衡之后,还包括如下步骤。In one embodiment, as shown in FIG. 4, when the initial migration node meets the preset restriction conditions, the migration data is migrated to the initial migration node to achieve load balancing, and the following steps are further included .
S90:确定每个虚拟节点对应的N组基础数据的角色标签,角色标签包括领导者角色和跟随者角色。S90: Determine the role labels of the N groups of basic data corresponding to each virtual node, the role labels include the leader role and the follower role.
S100:针对每个物理节点,根据物理节点上基础数据的组数和N的比值确定迁移阈值。S100: For each physical node, determine the migration threshold according to the ratio of the number of groups of basic data on the physical node and N.
S110:根据角色标签为领导者角色的基础数据的组数、角色标签为跟随者角色的基础数据组数以及每个物理节点对应的迁移阈值,进行角色标签转换。S110: Perform role label conversion according to the number of groups of basic data whose role label is the leader role, the number of basic data groups whose role label is the follower role, and the migration threshold corresponding to each physical node.
其中,角色标签用于标识存储集群中物理节点的IO(input/output),领导者角色用于对外接收读写请求,跟随者角色用于同步领导者角色对应的基础数据,以实现对数据同步,提高数据安全性。具体地,当存储集群中任意一个物理节点的IO达到预设阈值时,自动触发IO均衡操作。IO均衡,反映到存储集群中,即为角色标签转换。在虚拟节点中未存储任何数据时,虚拟节点的N组基础数据之间互相竞争,通过Raft算法从N组基础数据中选举出基础数据作为领导者角色,剩余的基础数据的角色标签为跟随者角色。对于N副本基础数据,每个物理节点上的领导者角色为其承载基础数据组数的N分之一,以此作为迁移阈值,根据角色标签为领导者角色的基础数据的组数、角色标签为跟随者角色的基础数据组数以及每个物理节点对应的迁移阈值,进行角色标签转换,执行角色标签为领导者角色的基础数据的迁移,使得物理节点上的IO均匀分布,从而进一步实现负载均衡。Among them, the role tag is used to identify the IO (input/output) of the physical node in the storage cluster, the leader role is used to receive read and write requests, and the follower role is used to synchronize the basic data corresponding to the leader role to achieve data synchronization , Improve data security. Specifically, when the IO of any physical node in the storage cluster reaches a preset threshold, the IO balancing operation is automatically triggered. IO balance, reflected in the storage cluster, is the role label conversion. When no data is stored in the virtual node, the N groups of basic data of the virtual node compete with each other, and the basic data is elected from the N groups of basic data through the Raft algorithm as the leader role, and the role label of the remaining basic data is the follower Role. For N replicas of basic data, the leader role on each physical node is one-Nth of the number of basic data groups that carry it. This is used as the migration threshold. According to the role label, the number of groups and role label of the basic data of the leader role Perform role label conversion for the number of basic data groups of the follower role and the migration threshold corresponding to each physical node, and perform the migration of the basic data whose role label is the leader role, so that the IO on the physical node is evenly distributed, thereby further realizing the load balanced.
在一实施例中,如图5所示,步骤S110中,根据角色标签为领导者角色的基础数据的组数、角色标签为跟随者角色的基础数据组数以及每个物理节点对应的迁移阈值,进行角色标签转换,具体包括如下步骤。In one embodiment, as shown in FIG. 5, in step S110, according to the number of basic data groups whose role label is the leader role, the number of basic data groups whose role label is the follower role, and the migration threshold corresponding to each physical node , Perform role label conversion, specifically including the following steps.
S111:当角色标签为领导者角色的基础数据的组数大于迁移阈值时,则将超出迁移阈值的角色标签为领导者角色的基础数据的角色标签转换为跟随者角色,并在物理节点的基础数据中选择一个基础数据并将其角色标签设置为领导者角色。S111: When the number of groups of basic data whose role label is the leader role is greater than the migration threshold, convert the role label that exceeds the migration threshold into the role label of the basic data of the leader role into a follower role, and set it on the basis of the physical node Select a basic data in the data and set its role label as the leader role.
S112:当角色标签为领导者角色的基础数据的组数小于迁移阈值时,将角色标签为领导者角色的基础数据转移到物理节点上,并将该物理节点中角色标签为领导者角色的基础数据转换为跟随者角色,直到该物理节点中的角色标签为领导者角色的基础数据的组数满足迁移阈值为止。S112: When the number of groups of basic data with the role label as the leader role is less than the migration threshold, transfer the basic data with the role label as the leader role to the physical node, and label the role in the physical node as the basis of the leader role The data is converted into a follower role until the number of groups of basic data whose role label is the leader role in the physical node meets the migration threshold.
在这个实施例中,通过比较角色标签为领导者角色的基础数据的组数与迁移阈值,进行不同的角色标签转换,并根据转换后的角色标签进行基础数据的迁移,保证了物理节点上的IO均匀分布,从而达到负载均衡。可以理解地,通过根据角色标签对基础数据进行迁移,避免了对物理节点的读写请求进行分离,即,用户写入数据到机器1,则从机器1读取数据,从而保证了数据一致性。In this embodiment, by comparing the number of groups of basic data with the role label as the leader role and the migration threshold, different role label conversions are performed, and the basic data is migrated according to the converted role labels, which ensures that the physical node IO is evenly distributed to achieve load balancing. Understandably, by migrating the basic data according to the role tag, the separation of the read and write requests of the physical node is avoided, that is, the user writes data to the machine 1, and then reads the data from the machine 1, thereby ensuring data consistency .
在一实施例中,如图6所示,步骤S90中,确定每个虚拟节点对应的N组基础数据的角色标签,角色标签包括领导者角色和跟随者角色,具体包括如下步骤。In an embodiment, as shown in FIG. 6, in step S90, the role tags of the N sets of basic data corresponding to each virtual node are determined. The role tags include the leader role and the follower role, which specifically includes the following steps.
S91:向存储集群中的物理节点发送投票请求。S91: Send a voting request to the physical node in the storage cluster.
S92:接收与投票请求对应的物理节点返回的投票结果。S92: Receive the voting result returned by the physical node corresponding to the voting request.
S93:根据投票结果,从物理节点对应的虚拟节点的N组基础数据中,选举出1组基础数据的角色标签确定为领导者角色,N-1组基础数据的角色标签确定为跟随者角色。S93: According to the voting result, from the N groups of basic data of the virtual node corresponding to the physical node, the role label of one group of basic data is selected and determined as the leader role, and the role label of the N-1 group of basic data is determined as the follower role.
在这个实施例中,通过Raft算法,即根据存储集群中的物理节点发送投票请求对应的投票结果对每个虚拟节点对应的N组基础数据的角色标签进行确定,进而领导者角色将自身的基础数据同步到跟随者角色对应的基础数据,可以保证在领导者角色宕机之后,虚拟节点中的另外N-1组基础数据重新选举出一个领导者角色和N-2个跟随者角色,使得新的领导者角色与之前的领导者角色的基础数据一致,保证了数据不丢失。并且实现IO均衡可以使存储集群中所有物理节点的性能发挥到最大,提高整个存储集群的负载能力与响应速度。In this embodiment, the Raft algorithm is used to determine the role labels of the N sets of basic data corresponding to each virtual node according to the voting results corresponding to the voting request sent by the physical nodes in the storage cluster, and then the leader role is based on itself The data is synchronized to the basic data corresponding to the follower role, which can ensure that after the leader role is down, the other N-1 groups of basic data in the virtual node re-elect a leader role and N-2 follower roles, making the new The role of the leader is consistent with the basic data of the previous leader role, ensuring that data is not lost. And achieving IO balance can maximize the performance of all physical nodes in the storage cluster, and improve the load capacity and response speed of the entire storage cluster.
在一实施例中,如图7所示,在初始迁入节点满足预设限制条件的情况下,则将迁出数据迁入到初始迁入节点中,以实现负载均衡之后,还包括如下步骤。In one embodiment, as shown in FIG. 7, when the initial migration node meets the preset restriction conditions, the migration data is migrated to the initial migration node to achieve load balancing, and the following steps are further included .
S120:对存储集群中所有物理节点进行遍历。S120: Traverse all physical nodes in the storage cluster.
S130:当物理节点中不存在迁出数据时,确定存储集群的负载达到均衡状态。S130: When there is no migration data in the physical node, it is determined that the load of the storage cluster reaches a balanced state.
在这个实施例中,对存储集群中的所有物理节点进行遍历,当所有要迁出数据中的基础数据均找不到要初始迁入节点时,确定负载均衡完成,从而更进一步地保证了存储集群负载均衡。In this embodiment, all physical nodes in the storage cluster are traversed. When all the basic data in the data to be migrated out cannot find the node to be initially migrated, it is determined that the load balancing is completed, thereby further ensuring the storage Cluster load balancing.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
在一实施例中,提供一种存储集群的负载均衡装置,该存储集群的负载均衡装置与上述实施例中存储集群的负载均衡方法一一对应。如图8所示,该存储集群的负载均衡装置包括均值计算模块10、迁出组数确定模块20、迁出数据确定模块30、迁入节点获取模块40、迁入节点检测模块50和负载均衡模块60。各功能模块详细说明如下。In one embodiment, a load balancing device for a storage cluster is provided, and the load balancing device for the storage cluster corresponds to the load balancing method for the storage cluster in the foregoing embodiment one-to-one. As shown in FIG. 8, the load balancing device of the storage cluster includes an average value calculation module 10, a migration group number determination module 20, a migration data determination module 30, a migration node acquisition module 40, a migration node detection module 50, and load balancing. Module 60. The detailed description of each function module is as follows.
均值计算模块10,用于当接收到负载均衡指令时,计算所述存储集群中所有物理节点的所述基础数据的组数均值。The average value calculation module 10 is configured to calculate the average value of the group number of the basic data of all physical nodes in the storage cluster when a load balancing instruction is received.
迁出组数确定模块20,用于根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数。The migration group number determining module 20 is configured to determine the migration group number of the basic data in each physical node according to the average value of the group number and the group number of the basic data in each physical node.
迁出数据确定模块30,用于针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据。The migration data determining module 30 is configured to determine the migration data in the basic data according to the number of migration groups for each physical node.
迁入节点获取模块40,用于对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点。The migration node acquisition module 40 is configured to compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node.
迁入节点检测模块50,用于对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤。The migration node detection module 50 is configured to detect the initial migration node and determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, exclude the Initial migration node, obtain the updated initial migration node, and perform the comparison of the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as Steps for initial migration into the node.
负载均衡模块60,用于在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡。The load balancing module 60 is configured to migrate the migration data into the initial migration node when the basic data in the initial migration node is different, so as to achieve load balancing.
具体地,该存储集群的负载均衡装置还包括副本复制模块和数据分配模块。Specifically, the load balancing device of the storage cluster further includes a copy replication module and a data distribution module.
副本复制模块,用于在对存储集群进行部署时,根据所述存储集群中包含的物理节点的数目,选取预设数目的虚拟节点,分别对每个所述物理节点上的基础数据进行N副本复制,得到每一虚拟节点对应的N组基础数据,并生成虚拟节点与物理节点的映射关系表,其中,N为大于1的正整数。The copy replication module is used to select a preset number of virtual nodes according to the number of physical nodes included in the storage cluster when the storage cluster is deployed, and respectively perform N copies of the basic data on each physical node Copy to obtain N groups of basic data corresponding to each virtual node, and generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1.
数据分配模块,用于通过哈希算法将所述基础数据分配至所述虚拟节点上,并通过所述映射关系表,将映射到所述虚拟节点的所述N组基础数据存储在对应的物理节点。The data distribution module is configured to distribute the basic data to the virtual node through a hash algorithm, and store the N groups of basic data mapped to the virtual node in the corresponding physical node through the mapping relationship table. node.
具体地,数据分配模块包括数据分片单元、编号模计算单元和数据保存单元。Specifically, the data distribution module includes a data slicing unit, a number modulus calculation unit, and a data storage unit.
数据分片单元,用于基于预设的内存大小,对所述基础数据进行分片处理,得到分片数据,并对每个所述分片数据进行顺序编号。The data fragmentation unit is configured to perform fragmentation processing on the basic data based on a preset memory size to obtain fragmented data, and sequentially number each fragmented data.
编号模计算单元,用于对所述虚拟节点进行顺序编号,针对每个所述分片数据,使用分片数据的顺序编号对所述虚拟节点的数量进行取余运算,得到该分片数据的编号模。The numbering modulus calculation unit is configured to sequentially number the virtual nodes, and for each of the fragmented data, use the serial number of the fragmented data to perform a remainder operation on the number of the virtual nodes to obtain the value of the fragmented data Numbering mode.
数据保存单元,用于将编号模相同的分片数据分入同一个分片集合中,并将每个所述分片集合保存到与编号模一致的顺序编号对应的虚拟节点上。The data storage unit is configured to divide the fragment data with the same serial number module into the same fragment set, and save each of the fragment sets on the virtual node corresponding to the sequence number consistent with the serial number modulus.
具体地,该存储集群的负载均衡装置还包括角色确定模块、阈值确定模块和角色转换模块。Specifically, the load balancing device of the storage cluster further includes a role determination module, a threshold determination module, and a role conversion module.
角色确定模块,用于确定所述每个虚拟节点对应的N组所述基础数据的角色标签,所述角色标签包括领导者角色和跟随者角色。The role determination module is configured to determine the role tags of the N groups of the basic data corresponding to each virtual node, and the role tags include a leader role and a follower role.
阈值确定模块,用于针对每个所述物理节点,根据物理节点上基础数据的组数和N的比值确定迁移阈值。The threshold determination module is configured to determine the migration threshold according to the ratio of the number of groups of basic data on the physical node and N for each physical node.
角色转换模块,用于根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换。The role conversion module is configured to perform according to the number of groups of the basic data whose role label is a leader role, the number of groups of basic data whose role label is a follower role, and the migration threshold corresponding to each physical node Role label conversion.
具体地,角色转换模块包括第一转换单元和第二转换单元。Specifically, the role conversion module includes a first conversion unit and a second conversion unit.
第一转换单元,用于当角色标签为领导者角色的所述基础数据的组数大于所述迁移阈值时,则将超出所述迁移阈值的角色标签为领导者角色的基础数据的角色标签转换为跟随者角色,并在所述物理节点的基础数据中选择一个基础数据并将其角色标签设置为领导者角色。The first conversion unit is configured to convert the role label that exceeds the migration threshold into the role label of the basic data of the leader role when the number of groups of the basic data whose role label is the leader role is greater than the migration threshold It is a follower role, and one basic data is selected from the basic data of the physical node and its role label is set as the leader role.
第二转换单元,用于当角色标签为领导者角色的所述基础数据的组数小于所述迁移阈值时,将角色标签为领导者角色的基础数据转移到所述物理节点上,并将该物理节点中角色标签为领导者角色的基础数据转换为跟随者角色,直到该物理节点中的角色标签为领导者角色的所述基础数据的组数满足所述迁移阈值为止。The second conversion unit is configured to transfer the basic data whose role is labeled as the leader role to the physical node when the number of groups of the basic data whose role is labeled as the leader role is less than the migration threshold. The basic data whose role label is the leader role in the physical node is converted into the follower role until the number of groups of the basic data whose role label is the leader role in the physical node meets the migration threshold.
具体地,角色确定模块包括请求发送单元、结果接收单元和角色确定单元。Specifically, the role determination module includes a request sending unit, a result receiving unit, and a role determination unit.
请求发送单元,用于向所述存储集群中的物理节点发送投票请求。The request sending unit is configured to send a voting request to the physical nodes in the storage cluster.
结果接收单元,用于接收与所述投票请求对应的所述物理节点返回的投票结果。The result receiving unit is configured to receive the voting result returned by the physical node corresponding to the voting request.
角色确定单元,用于根据所述投票结果,从所述物理节点对应的虚拟节点的N组基础数据中,选举出1组基础数据的角色标签确定为领导者角色,N-1组基础数据的角色标签确定为跟随者角色。The role determination unit is configured to select, from the N sets of basic data of the virtual node corresponding to the physical node, the role label of one set of basic data to determine the role of the leader according to the voting result, and the N-1 sets of basic data The role tag is determined as the follower role.
具体地,该存储集群的负载均衡装置还包括节点遍历模块和负载均衡模块。Specifically, the load balancing device of the storage cluster further includes a node traversal module and a load balancing module.
节点遍历模块,用于对所述存储集群中所有物理节点进行遍历。The node traversal module is used to traverse all physical nodes in the storage cluster.
负载均衡模块,用于当所述物理节点中不存在迁出数据时,确定所述存储集群的负载达到均衡状态。The load balancing module is configured to determine that the load of the storage cluster reaches a balanced state when there is no migration data in the physical node.
关于存储集群的负载均衡装置的具体限定可以参见上文中对于存储集群的负载均衡方法的限定,在此不再赘述。上述存储集群的负载均衡装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the load balancing device of the storage cluster, please refer to the above limitation of the load balancing method of the storage cluster, which will not be repeated here. The various modules in the load balancing device of the storage cluster can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储物理节点和基础数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种存储集群的负载均衡方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 9. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The computer equipment database is used to store physical nodes and basic data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize a load balancing method of the storage cluster.
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述实施例存储集群的负载均衡方法的步骤,例如图1所示的步骤S10至步骤S60。或者,处理器执行计算机程序时实现上述实施例存储集群的负载均衡装置的各模块/单元的功能,例如图8所示的模块10至模块60。为避免重复,这里不再赘述。In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The processor executes the computer program to implement the load balancing method of the storage cluster in the foregoing embodiment. , For example, step S10 to step S60 shown in FIG. 1. Or, when the processor executes the computer program, the function of each module/unit of the load balancing apparatus of the storage cluster in the foregoing embodiment is realized, for example, the module 10 to the module 60 shown in FIG. 8. To avoid repetition, I won’t repeat them here.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述实施例存储集群的负载均衡方法的步骤,或者,计算机程序被处理器执行时实现上述实施例存储集群的负载均衡装置的各模块/单元的功能,为避免重复,这里不再赘述。In one embodiment, a computer-readable storage medium is provided, and a computer program is stored thereon. When the computer program is executed by a processor, the steps of the load balancing method of the storage cluster in the foregoing embodiment are implemented, or the computer program is executed by the processor. The functions of the modules/units of the load balancing device of the storage cluster of the foregoing embodiment are realized during execution. In order to avoid repetition, details are not described herein again.
可选的,本申请涉及的存储介质如计算机可读存储介质可以是非易失性的,也可以是易失性的。Optionally, the storage medium involved in this application, such as a computer-readable storage medium, may be non-volatile or volatile.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still compare the previous embodiments. The recorded technical solutions are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and shall be included in the application Within the scope of protection.

Claims (20)

  1. 一种存储集群的负载均衡方法,其中,所述存储集群中包括多个物理节点,每个物理节点包含多组基础数据,所述存储集群的负载均衡方法包括: A load balancing method for a storage cluster, wherein the storage cluster includes a plurality of physical nodes, and each physical node contains multiple sets of basic data, and the load balancing method for the storage cluster includes:
    当接收到负载均衡指令时,计算所述存储集群中所有物理节点的所述基础数据的组数均值;When a load balancing instruction is received, calculate the average number of groups of the basic data of all physical nodes in the storage cluster;
    根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;Determine the number of migration groups of the basic data in each physical node according to the average value of the number of groups and the number of groups of the basic data in each physical node;
    针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;For each physical node, determine the migration data in the basic data according to the number of migration groups;
    对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;Comparing the number of groups of basic data corresponding to all physical nodes of the storage cluster, and using the physical node with the smallest number of groups of basic data as the initial migration node;
    对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;The initial migration node is detected to determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, the initial migration node is excluded, and the updated Initially migrate the node, and execute the step of comparing the group numbers of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest group number of basic data as the initial migration node;
    在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡。When the basic data in the initial migration node is different, the migration data is migrated to the initial migration node to achieve load balancing.
  2. 如权利要求1所述的存储集群的负载均衡方法,其中,所述方法还包括: The load balancing method of a storage cluster according to claim 1, wherein the method further comprises:
    在对存储集群进行部署时,根据所述存储集群中包含的物理节点的数目,选取预设数目的虚拟节点,分别对每个所述物理节点上的基础数据进行N副本复制,得到每一虚拟节点对应的N组基础数据,并生成虚拟节点与物理节点的映射关系表,其中,N为大于1的正整数;When the storage cluster is deployed, a preset number of virtual nodes are selected according to the number of physical nodes included in the storage cluster, and N copies of the basic data on each physical node are replicated to obtain each virtual node. N sets of basic data corresponding to the node, and generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1;
    通过哈希算法将所述基础数据分配至所述虚拟节点上,并通过所述映射关系表,将映射到所述虚拟节点的所述N组基础数据存储在对应的物理节点。The basic data is allocated to the virtual node through a hash algorithm, and the N groups of basic data mapped to the virtual node are stored in a corresponding physical node through the mapping relationship table.
  3. 如权利要求2所述的存储集群的负载均衡方法,其中,所述通过哈希算法将所述基础数据分配至所述虚拟节点上,包括: 3. The load balancing method of a storage cluster according to claim 2, wherein the distributing the basic data to the virtual node through a hash algorithm comprises:
    基于预设的内存大小,对所述基础数据进行分片处理,得到分片数据,并对每个所述分片数据进行顺序编号;Based on a preset memory size, perform fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data;
    对所述虚拟节点进行顺序编号,针对每个所述分片数据,使用分片数据的顺序编号对所述虚拟节点的数量进行取余运算,得到该分片数据的编号模;Sequentially number the virtual nodes, and for each of the fragmented data, use the serial number of the fragmented data to perform a remainder operation on the number of the virtual nodes to obtain the numbering modulus of the fragmented data;
    将编号模相同的分片数据分入同一个分片集合中,并将每个所述分片集合保存到与编号模一致的顺序编号对应的虚拟节点上。The segment data with the same numbering modulus is divided into the same segmentation set, and each of the segmentation sets is saved on the virtual node corresponding to the sequence number consistent with the numbering model.
  4. 如权利要求2所述的存储集群的负载均衡方法,其中,在所述初始迁入节点满足预设限制条件的情况下,则将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡之后,还包括: 3. The load balancing method of a storage cluster according to claim 2, wherein when the initial migration-in node meets a preset restriction condition, the migration data is migrated to the initial migration-in node, After achieving load balancing, it also includes:
    确定所述每个虚拟节点对应的N组所述基础数据的角色标签,所述角色标签包括领导者角色和跟随者角色;Determining the role tags of the N groups of the basic data corresponding to each virtual node, where the role tags include a leader role and a follower role;
    针对每个所述物理节点,根据物理节点上基础数据的组数和N的比值确定迁移阈值;For each of the physical nodes, the migration threshold is determined according to the ratio of the number of groups of basic data on the physical node and N;
    根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换。Perform role label conversion according to the number of groups of the basic data whose role label is a leader role, the number of basic data groups whose role label is a follower role, and the migration threshold corresponding to each of the physical nodes.
  5. 如权利要求4所述的存储集群的负载均衡方法,其中,所述根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换,包括: The load balancing method of a storage cluster according to claim 4, wherein the number of groups of the basic data whose role label is a leader role, the number of groups of basic data whose role label is a follower role, and each Performing role label conversion on the migration threshold corresponding to the physical node includes:
    当角色标签为领导者角色的所述基础数据的组数大于所述迁移阈值时,则将超出所述迁移阈值的角色标签为领导者角色的基础数据的角色标签转换为跟随者角色,并在所述物理节点的基础数据中选择一个基础数据并将其角色标签设置为领导者角色;When the number of groups of the basic data whose role label is the leader role is greater than the migration threshold, the role label that exceeds the migration threshold is converted to the role label of the basic data of the leader role into a follower role, and Selecting one of the basic data of the physical node and setting its role tag as the leader role;
    当角色标签为领导者角色的所述基础数据的组数小于所述迁移阈值时,将角色标签为领导者角色的基础数据转移到所述物理节点上,并将该物理节点中角色标签为领导者角色的基础数据转换为跟随者角色,直到该物理节点中的角色标签为领导者角色的所述基础数据的组数满足所述迁移阈值为止。When the number of groups of the basic data whose role label is the leader role is less than the migration threshold, the basic data whose role label is the leader role is transferred to the physical node, and the role label in the physical node is the leader The basic data of the leader role is converted into the follower role until the number of groups of the basic data whose role label is the leader role in the physical node meets the migration threshold.
  6. 如权利要求4所述的存储集群的负载均衡方法,其中,所述确定所述每一虚拟节点对应的N组所述基础数据的角色标签,所述角色标签包括领导者角色和跟随者角色,包括: 5. The load balancing method of a storage cluster according to claim 4, wherein said determining the role tags of the N groups of the basic data corresponding to each virtual node, the role tags including a leader role and a follower role, include:
    向所述存储集群中的物理节点发送投票请求;Sending a voting request to the physical nodes in the storage cluster;
    接收与所述投票请求对应的所述物理节点返回的投票结果;Receiving the voting result returned by the physical node corresponding to the voting request;
    根据所述投票结果,从所述物理节点对应的虚拟节点的N组基础数据中,选举出1组基础数据的角色标签确定为领导者角色,N-1组基础数据的角色标签确定为跟随者角色。According to the voting result, from the N sets of basic data of the virtual node corresponding to the physical node, the role label of one set of basic data is determined to be the leader role, and the role label of the N-1 set of basic data is determined to be the follower Role.
  7. 如权利要求1所述的存储集群的负载均衡方法,其中,在所述在初始迁入节点满足预设限制条件的情况下,则将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡之后,还包括:The load balancing method of a storage cluster according to claim 1, wherein, when the initial migration-in node satisfies a preset restriction condition, the migration data is migrated to the initial migration-in node , To achieve load balancing, it also includes:
    对所述存储集群中所有物理节点进行遍历;Traverse all physical nodes in the storage cluster;
    当所述物理节点中不存在迁出数据时,确定所述存储集群的负载达到均衡状态。When there is no migration data in the physical node, it is determined that the load of the storage cluster reaches a balanced state.
  8. 一种存储集群的负载均衡装置,所述存储集群中包括多个物理节点,每个物理节点包含多组基础数据,其中,所述存储集群的负载均衡装置包括: A load balancing device for a storage cluster. The storage cluster includes a plurality of physical nodes, and each physical node contains multiple sets of basic data. The load balancing device for the storage cluster includes:
    均值计算模块,用于当接收到负载均衡指令时,计算所述存储集群中所有物理节点的所述基础数据的组数均值;An average value calculation module, configured to calculate an average value of the group number of the basic data of all physical nodes in the storage cluster when a load balancing instruction is received;
    迁出组数确定模块,用于根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;A migration group number determination module, configured to determine the migration group number of the basic data in each physical node according to the average value of the group number and the group number of the basic data in each physical node;
    迁出数据确定模块,用于针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;A migration data determination module, configured to determine migration data in the basic data according to the number of migration groups for each physical node;
    迁入节点获取模块,用于对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;A migration node acquisition module, configured to compare the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial migration node;
    迁入节点检测模块,用于对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;The migration node detection module is used to detect the initial migration node and determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, exclude the initial migration node. Migrate the node to obtain the updated initial migration node, and perform the comparison of the number of groups of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest number of groups of basic data as the initial Steps to move into the node;
    负载均衡模块,用于在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡,其中,所述预设限制条件为所述初始迁入节点中的基础数据不同。The load balancing module is configured to migrate the migration data into the initial migration node when the basic data in the initial migration node is different, so as to achieve load balancing, wherein the preset restriction condition The basic data in the initial migration node is different.
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现以下步骤: A computer device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    当接收到负载均衡指令时,计算存储集群中所有物理节点的基础数据的组数均值,所述存储集群中包括多个物理节点,每个物理节点包含多组基础数据;When a load balancing instruction is received, calculating an average value of the number of groups of basic data of all physical nodes in the storage cluster, the storage cluster includes multiple physical nodes, and each physical node contains multiple sets of basic data;
    根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;Determine the number of migration groups of the basic data in each physical node according to the average value of the number of groups and the number of groups of the basic data in each physical node;
    针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;For each physical node, determine the migration data in the basic data according to the number of migration groups;
    对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;Comparing the number of groups of basic data corresponding to all physical nodes of the storage cluster, and using the physical node with the smallest number of groups of basic data as the initial migration node;
    对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;The initial migration node is detected to determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, the initial migration node is excluded, and the updated Initially migrate the node, and execute the step of comparing the group numbers of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest group number of basic data as the initial migration node;
    在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中。When the basic data in the initial migration-in node is different, the migration-out data is migrated to the initial migration-in node.
  10. 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时还实现以下步骤: 9. The computer device according to claim 9, wherein the processor further implements the following steps when executing the computer program:
    在对存储集群进行部署时,根据所述存储集群中包含的物理节点的数目,选取预设数目的虚拟节点,分别对每个所述物理节点上的基础数据进行N副本复制,得到每一虚拟节点对应的N组基础数据,并生成虚拟节点与物理节点的映射关系表,其中,N为大于1的正整数;When the storage cluster is deployed, a preset number of virtual nodes are selected according to the number of physical nodes included in the storage cluster, and N copies of the basic data on each physical node are replicated to obtain each virtual node. N sets of basic data corresponding to the node, and generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1;
    通过哈希算法将所述基础数据分配至所述虚拟节点上,并通过所述映射关系表,将映射到所述虚拟节点的所述N组基础数据存储在对应的物理节点。The basic data is allocated to the virtual node through a hash algorithm, and the N groups of basic data mapped to the virtual node are stored in a corresponding physical node through the mapping relationship table.
  11. 如权利要求10所述的计算机设备,其中,所述通过哈希算法将所述基础数据分配至所述虚拟节点上时,具体实现以下步骤: 10. The computer device according to claim 10, wherein when the basic data is allocated to the virtual node through a hash algorithm, the following steps are specifically implemented:
    基于预设的内存大小,对所述基础数据进行分片处理,得到分片数据,并对每个所述分片数据进行顺序编号;Based on a preset memory size, perform fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data;
    对所述虚拟节点进行顺序编号,针对每个所述分片数据,使用分片数据的顺序编号对所述虚拟节点的数量进行取余运算,得到该分片数据的编号模;Sequentially number the virtual nodes, and for each of the fragmented data, use the serial number of the fragmented data to perform a remainder operation on the number of the virtual nodes to obtain the numbering modulus of the fragmented data;
    将编号模相同的分片数据分入同一个分片集合中,并将每个所述分片集合保存到与编号模一致的顺序编号对应的虚拟节点上。The segment data with the same numbering modulus is divided into the same segmentation set, and each of the segmentation sets is saved on the virtual node corresponding to the sequence number consistent with the numbering model.
  12. 如权利要求10所述的计算机设备,其中,在所述初始迁入节点满足预设限制条件的情况下,则将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡之后,所述处理器执行所述计算机程序时还实现以下步骤: The computer device according to claim 10, wherein, when the initial migration-in node satisfies a preset restriction condition, the migration-out data is migrated to the initial migration-in node to achieve load balancing After that, the processor further implements the following steps when executing the computer program:
    确定所述每个虚拟节点对应的N组所述基础数据的角色标签,所述角色标签包括领导者角色和跟随者角色;Determining the role tags of the N groups of the basic data corresponding to each virtual node, where the role tags include a leader role and a follower role;
    针对每个所述物理节点,根据物理节点上基础数据的组数和N的比值确定迁移阈值;For each of the physical nodes, the migration threshold is determined according to the ratio of the number of groups of basic data on the physical node and N;
    根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换。Perform role label conversion according to the number of groups of the basic data whose role label is a leader role, the number of basic data groups whose role label is a follower role, and the migration threshold corresponding to each of the physical nodes.
  13. 如权利要求12所述的计算机设备,其中,所述根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换时,具体实现以下步骤: The computer device according to claim 12, wherein the number of groups of the basic data whose role label is a leader role, the number of groups of basic data whose role label is a follower role, and each of the physical nodes Corresponding to the migration threshold, when performing role label conversion, the following steps are specifically implemented:
    当角色标签为领导者角色的所述基础数据的组数大于所述迁移阈值时,则将超出所述迁移阈值的角色标签为领导者角色的基础数据的角色标签转换为跟随者角色,并在所述物理节点的基础数据中选择一个基础数据并将其角色标签设置为领导者角色;When the number of groups of the basic data whose role label is the leader role is greater than the migration threshold, the role label that exceeds the migration threshold is converted to the role label of the basic data of the leader role into a follower role, and Selecting one of the basic data of the physical node and setting its role tag as the leader role;
    当角色标签为领导者角色的所述基础数据的组数小于所述迁移阈值时,将角色标签为领导者角色的基础数据转移到所述物理节点上,并将该物理节点中角色标签为领导者角色的基础数据转换为跟随者角色,直到该物理节点中的角色标签为领导者角色的所述基础数据的组数满足所述迁移阈值为止。When the number of groups of the basic data whose role label is the leader role is less than the migration threshold, the basic data whose role label is the leader role is transferred to the physical node, and the role label in the physical node is the leader The basic data of the leader role is converted into the follower role until the number of groups of the basic data whose role label is the leader role in the physical node meets the migration threshold.
  14. 如权利要求12所述的计算机设备,其中,所述确定所述每一虚拟节点对应的N组所述基础数据的角色标签,所述角色标签包括领导者角色和跟随者角色时,具体实现以下步骤: The computer device according to claim 12, wherein when the role tags of the N sets of the basic data corresponding to each virtual node are determined, and the role tags include a leader role and a follower role, the following is specifically implemented step:
    向所述存储集群中的物理节点发送投票请求;Sending a voting request to the physical nodes in the storage cluster;
    接收与所述投票请求对应的所述物理节点返回的投票结果;Receiving the voting result returned by the physical node corresponding to the voting request;
    根据所述投票结果,从所述物理节点对应的虚拟节点的N组基础数据中,选举出1组基础数据的角色标签确定为领导者角色,N-1组基础数据的角色标签确定为跟随者角色。According to the voting result, from the N sets of basic data of the virtual node corresponding to the physical node, the role label of one set of basic data is determined to be the leader role, and the role label of the N-1 set of basic data is determined to be the follower Role.
  15. 如权利要求9所述的计算机设备,其中,在所述在初始迁入节点满足预设限制条件的情况下,则将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡之后,所述处理器执行所述计算机程序时还实现以下步骤:The computer device according to claim 9, wherein, in the case that the initial migration-in node satisfies a preset restriction condition, the migration-out data is migrated to the initial migration-in node to realize the load After the equalization, the processor further implements the following steps when executing the computer program:
    对所述存储集群中所有物理节点进行遍历;Traverse all physical nodes in the storage cluster;
    当所述物理节点中不存在迁出数据时,确定所述存储集群的负载达到均衡状态。When there is no migration data in the physical node, it is determined that the load of the storage cluster reaches a balanced state.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现以下步骤: A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
    当接收到负载均衡指令时,计算存储集群中所有物理节点的基础数据的组数均值,所述存储集群中包括多个物理节点,每个物理节点包含多组基础数据;When a load balancing instruction is received, calculating an average value of the number of groups of basic data of all physical nodes in the storage cluster, the storage cluster includes multiple physical nodes, and each physical node contains multiple sets of basic data;
    根据所述组数均值和每个所述物理节点中的所述基础数据的组数,确定每个物理节点中所述基础数据的迁出组数;Determine the number of migration groups of the basic data in each physical node according to the average value of the number of groups and the number of groups of the basic data in each physical node;
    针对每个物理节点,根据所述迁出组数在所述基础数据中确定迁出数据;For each physical node, determine the migration data in the basic data according to the number of migration groups;
    对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点;Comparing the number of groups of basic data corresponding to all physical nodes of the storage cluster, and using the physical node with the smallest number of groups of basic data as the initial migration node;
    对所述初始迁入节点进行检测,判断所述初始迁入节点中的基础数据是否相同,在所述初始迁入节点中的基础数据相同时,排除所述初始迁入节点,得到更新后的初始迁入节点,并执行所述对所述存储集群的所有物理节点对应的基础数据的组数进行比较,将基础数据的组数最小的所述物理节点作为初始迁入节点的步骤;The initial migration node is detected to determine whether the basic data in the initial migration node is the same. When the basic data in the initial migration node is the same, the initial migration node is excluded, and the updated Initially migrate the node, and execute the step of comparing the group numbers of basic data corresponding to all physical nodes of the storage cluster, and use the physical node with the smallest group number of basic data as the initial migration node;
    在所述初始迁入节点中的基础数据不同时,将所述迁出数据迁入到所述初始迁入节点中。When the basic data in the initial migration-in node is different, the migration-out data is migrated to the initial migration-in node.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现以下步骤: 15. The computer-readable storage medium of claim 16, wherein the computer program further implements the following steps when being executed by the processor:
    在对存储集群进行部署时,根据所述存储集群中包含的物理节点的数目,选取预设数目的虚拟节点,分别对每个所述物理节点上的基础数据进行N副本复制,得到每一虚拟节点对应的N组基础数据,并生成虚拟节点与物理节点的映射关系表,其中,N为大于1的正整数;When the storage cluster is deployed, a preset number of virtual nodes are selected according to the number of physical nodes included in the storage cluster, and N copies of the basic data on each physical node are replicated to obtain each virtual node. N sets of basic data corresponding to the node, and generate a mapping relationship table between virtual nodes and physical nodes, where N is a positive integer greater than 1;
    通过哈希算法将所述基础数据分配至所述虚拟节点上,并通过所述映射关系表,将映射到所述虚拟节点的所述N组基础数据存储在对应的物理节点。The basic data is allocated to the virtual node through a hash algorithm, and the N groups of basic data mapped to the virtual node are stored in a corresponding physical node through the mapping relationship table.
  18. 如权利要求17所述的计算机可读存储介质,其中,所述通过哈希算法将所述基础数据分配至所述虚拟节点上时,具体实现以下步骤:17. The computer-readable storage medium of claim 17, wherein when the basic data is distributed to the virtual node through a hash algorithm, the following steps are specifically implemented:
    基于预设的内存大小,对所述基础数据进行分片处理,得到分片数据,并对每个所述分片数据进行顺序编号;Based on a preset memory size, perform fragmentation processing on the basic data to obtain fragmented data, and sequentially number each fragmented data;
    对所述虚拟节点进行顺序编号,针对每个所述分片数据,使用分片数据的顺序编号对所述虚拟节点的数量进行取余运算,得到该分片数据的编号模;Sequentially number the virtual nodes, and for each of the fragmented data, use the serial number of the fragmented data to perform a remainder operation on the number of the virtual nodes to obtain the numbering modulus of the fragmented data;
    将编号模相同的分片数据分入同一个分片集合中,并将每个所述分片集合保存到与编号模一致的顺序编号对应的虚拟节点上。The segment data with the same numbering modulus is divided into the same segmentation set, and each of the segmentation sets is saved on the virtual node corresponding to the sequence number consistent with the numbering model.
  19. 如权利要求17所述的计算机可读存储介质,其中,在所述初始迁入节点满足预设限制条件的情况下,则将所述迁出数据迁入到所述初始迁入节点中,以实现负载均衡之后,所述计算机程序被处理器执行时还实现以下步骤: The computer-readable storage medium according to claim 17, wherein when the initial migration-in node meets a preset restriction condition, the migration-out data is migrated to the initial migration-in node to After the load balancing is implemented, the following steps are also implemented when the computer program is executed by the processor:
    确定所述每个虚拟节点对应的N组所述基础数据的角色标签,所述角色标签包括领导者角色和跟随者角色;Determining the role tags of the N groups of the basic data corresponding to each virtual node, where the role tags include a leader role and a follower role;
    针对每个所述物理节点,根据物理节点上基础数据的组数和N的比值确定迁移阈值;For each of the physical nodes, the migration threshold is determined according to the ratio of the number of groups of basic data on the physical node and N;
    根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换。Perform role label conversion according to the number of groups of the basic data whose role label is a leader role, the number of basic data groups whose role label is a follower role, and the migration threshold corresponding to each of the physical nodes.
  20. 如权利要求19所述的计算机可读存储介质,其中,所述根据角色标签为领导者角色的所述基础数据的组数、角色标签为跟随者角色的所述基础数据组数以及每个所述物理节点对应的所述迁移阈值,进行角色标签转换时,具体实现以下步骤: The computer-readable storage medium according to claim 19, wherein the number of groups of the basic data whose role label is a leader role, the number of groups of basic data whose role label is a follower role, and each When performing role label conversion for the migration threshold corresponding to the physical node, the following steps are specifically implemented:
    当角色标签为领导者角色的所述基础数据的组数大于所述迁移阈值时,则将超出所述迁移阈值的角色标签为领导者角色的基础数据的角色标签转换为跟随者角色,并在所述物理节点的基础数据中选择一个基础数据并将其角色标签设置为领导者角色;When the number of groups of the basic data whose role label is the leader role is greater than the migration threshold, the role label that exceeds the migration threshold is converted to the role label of the basic data of the leader role into a follower role, and Selecting one of the basic data of the physical node and setting its role tag as the leader role;
    当角色标签为领导者角色的所述基础数据的组数小于所述迁移阈值时,将角色标签为领导者角色的基础数据转移到所述物理节点上,并将该物理节点中角色标签为领导者角色的基础数据转换为跟随者角色,直到该物理节点中的角色标签为领导者角色的所述基础数据的组数满足所述迁移阈值为止。When the number of groups of the basic data whose role label is the leader role is less than the migration threshold, the basic data whose role label is the leader role is transferred to the physical node, and the role label in the physical node is the leader The basic data of the leader role is converted into the follower role until the number of groups of the basic data whose role label is the leader role in the physical node meets the migration threshold.
PCT/CN2020/099309 2020-04-29 2020-06-30 Load balancing method and apparatus for storage cluster, computer device, and storage medium WO2021217864A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010355344.X 2020-04-29
CN202010355344.XA CN111580963B (en) 2020-04-29 2020-04-29 Load balancing method and device for storage cluster, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021217864A1 true WO2021217864A1 (en) 2021-11-04

Family

ID=72126285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099309 WO2021217864A1 (en) 2020-04-29 2020-06-30 Load balancing method and apparatus for storage cluster, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN111580963B (en)
WO (1) WO2021217864A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116155910A (en) * 2023-03-29 2023-05-23 新华三技术有限公司 Equipment management method and device
CN117873709A (en) * 2023-12-21 2024-04-12 云和恩墨(北京)信息技术有限公司 PG copy balancing method, device, equipment and storage medium based on database

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118314B (en) * 2020-09-18 2023-05-05 北京百度网讯科技有限公司 Load balancing method and device
CN112463050A (en) * 2020-11-26 2021-03-09 新华三技术有限公司成都分公司 Storage system capacity expansion method, device, equipment and machine-readable storage medium
CN112416264A (en) * 2020-12-11 2021-02-26 中国建设银行股份有限公司 Data storage method and device and computer storage medium
CN113382040B (en) * 2021-05-08 2022-09-13 深圳市科思科技股份有限公司 Load balancing method, electronic device and computer readable storage medium
CN114895849A (en) * 2022-04-29 2022-08-12 重庆紫光华山智安科技有限公司 Data migration and storage method and device and management node

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571986A (en) * 2012-02-27 2012-07-11 浙江大学 Load balancing method based on vector mapping
US20120254131A1 (en) * 2011-03-30 2012-10-04 International Business Machines Corporation Virtual machine image co-migration
CN105227645A (en) * 2015-09-15 2016-01-06 齐鲁工业大学 A kind of cloud data migration method
CN106897116A (en) * 2017-02-27 2017-06-27 郑州云海信息技术有限公司 A kind of virtual machine migration method and device
CN107766159A (en) * 2017-11-13 2018-03-06 郑州云海信息技术有限公司 A kind of metadata management method, device and computer-readable recording medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8370473B2 (en) * 2009-12-16 2013-02-05 International Business Machines Corporation Live multi-hop VM remote-migration over long distance
CN110134495B (en) * 2019-05-21 2022-08-12 山东大学 Container cross-host online migration method, storage medium and terminal equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120254131A1 (en) * 2011-03-30 2012-10-04 International Business Machines Corporation Virtual machine image co-migration
CN102571986A (en) * 2012-02-27 2012-07-11 浙江大学 Load balancing method based on vector mapping
CN105227645A (en) * 2015-09-15 2016-01-06 齐鲁工业大学 A kind of cloud data migration method
CN106897116A (en) * 2017-02-27 2017-06-27 郑州云海信息技术有限公司 A kind of virtual machine migration method and device
CN107766159A (en) * 2017-11-13 2018-03-06 郑州云海信息技术有限公司 A kind of metadata management method, device and computer-readable recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116155910A (en) * 2023-03-29 2023-05-23 新华三技术有限公司 Equipment management method and device
CN117873709A (en) * 2023-12-21 2024-04-12 云和恩墨(北京)信息技术有限公司 PG copy balancing method, device, equipment and storage medium based on database
CN117873709B (en) * 2023-12-21 2024-07-09 云和恩墨(北京)信息技术有限公司 PG copy balancing method, device, equipment and storage medium based on database

Also Published As

Publication number Publication date
CN111580963B (en) 2023-07-11
CN111580963A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
WO2021217864A1 (en) Load balancing method and apparatus for storage cluster, computer device, and storage medium
US20220158953A1 (en) Distributed stream-based database triggers
US10592159B2 (en) Processing device configured for data integrity testing utilizing replicated test metadata file
US9052824B2 (en) Content addressable stores based on sibling groups
US8838595B2 (en) Operating on objects stored in a distributed database
US10534547B2 (en) Consistent transition from asynchronous to synchronous replication in hash-based storage systems
US11093468B1 (en) Advanced metadata management
US20230087447A1 (en) Data migration method and device
US11544226B2 (en) Metadata control in a load-balanced distributed storage system
CN110147407B (en) Data processing method and device and database management server
CN110413685B (en) Database service switching method, device, readable storage medium and computer equipment
US20200356282A1 (en) Distributed Storage System, Data Processing Method, and Storage Node
CN110188084B (en) Distributed file storage system and file storage method
CN112799841B (en) Method and device for data object storage management
US20190303491A1 (en) Storage system with loopback replication process providing unique identifiers for collision-free object pairing
TW201738781A (en) Method and device for joining tables
CN107133228A (en) A kind of method and device of fast resampling
WO2019243892A2 (en) Gpu based server in a distributed file system
CN107948229B (en) Distributed storage method, device and system
US11269855B2 (en) On-demand remote snapshot creation for a synchronous replication session in automatic recovery
WO2020083106A1 (en) Node expansion method in storage system and storage system
CN104219163A (en) Load balancing method for node dynamic forward based on dynamic replication method and virtual node method
Beineke et al. High throughput log-based replication for many small in-memory objects
WO2015165351A1 (en) Data storage method and device
US20190095106A1 (en) Low-latency lightweight distributed storage system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20933446

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20933446

Country of ref document: EP

Kind code of ref document: A1