CN108055338B - ISCSI access load balancing method - Google Patents

ISCSI access load balancing method Download PDF

Info

Publication number
CN108055338B
CN108055338B CN201711402414.7A CN201711402414A CN108055338B CN 108055338 B CN108055338 B CN 108055338B CN 201711402414 A CN201711402414 A CN 201711402414A CN 108055338 B CN108055338 B CN 108055338B
Authority
CN
China
Prior art keywords
node
load
network card
storage device
connection
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711402414.7A
Other languages
Chinese (zh)
Other versions
CN108055338A (en
Inventor
杨飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Innovation Technology Co ltd
Original Assignee
Innovation Technology Co ltd
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 Innovation Technology Co ltd filed Critical Innovation Technology Co ltd
Priority to CN201711402414.7A priority Critical patent/CN108055338B/en
Publication of CN108055338A publication Critical patent/CN108055338A/en
Application granted granted Critical
Publication of CN108055338B publication Critical patent/CN108055338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The application discloses an ISCSI access load balancing method, which comprises the following steps: each node monitors the load of each network card in the node, and when an access request of a client is received, the network card with the minimum load in the node is used for establishing connection with the client by using an ISCSI redirection function; when the node monitors that the network card load in the node exceeds a threshold value, selecting a connection meeting a balance adjustment condition from the connections on the network card, and disconnecting the connection; the balance adjustment condition is that the sum of the load corresponding to the connection and the load of the network card with the minimum load in the node is less than a threshold value; if the selection fails, selecting a node from the system as a resource migration target node, selecting a storage device from the storage devices of the node, disconnecting the connection for accessing the storage device, and migrating the selected storage device to the resource migration target node. The invention can improve the resource utilization rate while realizing the system load balance, and is easy to realize.

Description

ISCSI access load balancing method
Technical Field
The invention relates to a distributed storage technology, in particular to an Internet Small Computer System Interface (ISCSI) access load balancing method.
Background
The load of the network card is influenced by the hardware equipment to be kept in a fixed range, the distributed storage system is composed of a plurality of nodes, each node is generally provided with a plurality of network cards (the speed of different network cards may be different), if the load of each network card is different, even if part of the network cards have very high load and part of the network cards are idle, the network card with high load can become a network bottleneck in the distributed storage system, and the overall performance of the system is influenced.
In order to solve the above problems of the distributed storage system, the current solution is to use a hardware load balancer or use a plurality of network cards for binding. The scheme of using the hardware load balancer to carry out load balancing needs to purchase professional equipment, the equipment is generally expensive and has single-point faults, and more cost is increased by adopting dual-machine mutual backup, so that the limitation of high cost exists. The scheme for realizing load balancing by using multi-network card binding can only realize load balancing in nodes and cannot realize load balancing among nodes, so that the scheme has the problem that network resources among nodes cannot be fully utilized.
Therefore, the existing load balancing scheme of the distributed storage system has the problems of high cost or incapability of fully utilizing system resources.
Disclosure of Invention
In view of the above, the main objective of the present invention is to provide an ISCSI access load balancing method, which can improve the utilization rate of storage resources while effectively achieving load balancing of a distributed storage system, and is easy to implement.
In order to achieve the purpose, the technical scheme provided by the invention is as follows:
an ISCSI access load balancing method, comprising:
each node of the distributed storage system monitors the load of each network card in the node, and when an access request of a client is received, the network card with the minimum load in the node is used for establishing connection with the client by using an ISCSI redirection function;
when the node monitors that the network card load in the node exceeds a preset threshold value, selecting a connection meeting a preset balance adjustment condition from the connections on the network card, and disconnecting the selected connection; the balance adjustment condition comprises that the sum of the load of the connection corresponding to the network card with the minimum load in the node is less than the threshold value;
if the selection fails, the node selects a node from the system as a resource migration target node according to the load condition of each node in the system, selects a storage device from the storage devices of the node, disconnects the connection for accessing the storage device, and migrates the selected storage device to the resource migration target node.
In summary, the ISCSI access load balancing method provided by the present invention achieves network load balancing within and among nodes, thereby improving ISCSI storage performance in a distributed system to the maximum extent, and meanwhile, the scheme does not have a single point of failure, achieving high availability, and therefore, the present invention improves storage resource utilization while effectively achieving load balancing of a distributed storage system, and is easy to implement.
Drawings
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention;
fig. 2 to 7 are dynamic diagrams illustrating the implementation of load balancing in a specific application scenario.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The core idea of the invention is as follows: each node selects a network card with the minimum load to establish connection for a client requesting access, when the load of the network card is monitored to be overhigh, an idle network card is preferentially selected from the node, dynamic load balance in the node is realized by using the idle network card, if the selection fails, a node with lower load is selected from the system, and the dynamic load balance among the nodes is realized by using the network card resource on the selected node in a storage device migration mode. Therefore, each node is a load balancing node, no single point fault exists, and the utilization rate and the storage performance of system resources are improved to the maximum extent.
Fig. 1 is a schematic flow chart of an ISCSI access load balancing method according to an embodiment of the present invention, as shown in fig. 1, the embodiment mainly includes:
step 101, each node of the distributed storage system monitors the load of each network card in the node, and when receiving an access request of a client, the network card with the minimum load in the node is used for establishing connection with the client by using an ISCSI redirection function.
This step is used to implement real-time load balancing, and when the client is connected to the server (i.e. the node where the resource requested by the client in the distributed storage system is located, i.e. the node providing service to the client in the system), the server may unconditionally select the network card with the minimum load in the node, no matter whether the network card is overloaded or not. Therefore, the server establishes connection for the client requesting service by preferentially utilizing the network card with the minimum load in the node, and can realize real-time load balance in the node.
In practical applications, for each of the network cards, the load of the network card can be obtained by calculating the sum of the access speeds of all the clients connected to the network card. Preferably, the non-service network overhead existing in the actual application may be considered, and the load of the network card may be slightly larger than the sum of the access speeds of all the clients thereon, for example, the load of the network card may be calculated according to Z ═ a × S, where a is a preset adjustment coefficient, a value range of which may be 1 ≦ a < 2, S is the sum of the access speeds of all the clients on the network card, and Z is the load of the network card.
Specifically, if the load of each network card in the node is the same (as in initial operation), any network card may be selected for connection.
102, when the node monitors that the network card load in the node exceeds a preset threshold value, selecting a connection meeting a preset balance adjustment condition from the connections on the network card, and disconnecting the selected connection; the balance adjustment condition comprises that the sum of the load of the connection corresponding to the network card with the minimum load in the node is less than the threshold value; if the selection fails, the node selects a node from the system as a resource migration target node according to the load condition of each node in the system, selects a storage device from the storage devices of the node, disconnects the connection for accessing the storage device, and migrates the selected storage device to the resource migration target node.
The step is used for realizing dynamic load balancing, namely monitoring the actual load condition of each network card of each node in the system, triggering load adjustment in the node firstly when a certain network card is overloaded (namely the load exceeds a preset threshold), and triggering load adjustment among the system nodes again when the adjustment in the node is unsuccessful. For the load adjustment in the node, a certain connection on the overload network card is disconnected to trigger a client corresponding to the connection to re-request to connect into the system, so that the load on a single node is prevented from being concentrated on a certain network card as much as possible by the execution of the step 101; for the load adjustment among the system nodes, the load adjustment needs to be realized by triggering the migration of a certain storage resource of the node where the overload network card is located, so that the node resources in the system are fully utilized, and the load balance among the nodes of the whole system is realized.
Here, when selecting a connection to be disconnected from the overloaded network card, a balance adjustment condition needs to be satisfied, that is, the sum of the load corresponding to the connection and the load of the network card with the smallest load in the node is smaller than the threshold value, so that, when the corresponding client re-requests access after the connection is disconnected, the network card with the smallest load in the node is connected according to the technical characteristics in step 101, and the network card with the smallest load in the node is overloaded due to the re-established connection through the satisfaction of the balance adjustment condition, so that the effectiveness of the load balancing operation in the node can be ensured.
When the connection meeting the balance adjustment condition cannot be selected from the overload network card to be disconnected, the storage resource of the node where the overload network card is located needs to be considered to be migrated to other nodes with the load lighter than that of the node, so as to reduce the load of the node where the overload network card is located, and then the load balance of the node can be realized through the load adjustment in the node.
Preferably, in this step, the following method may be adopted to select a node from the system as the current resource migration target node:
the node acquires the current load data of each node in the system from the management node of the system, and selects the node with the minimum load as the current resource migration target node from other nodes in the system according to the load data.
In the method for selecting the resource migration target node, the node with the minimum current load is selected from other nodes except the node where the current overload network card is located in the system as the resource migration target node, so that the load difference among the nodes can be reduced, the load balance among the nodes of the whole system can be better realized, the available storage resources in the system can be increased to the greatest extent, and the utilization rate of the storage resources can be further improved.
Further, in practical application, each node in the system may report the load information of the node to a management node of the system when the load of the node changes, so that the management node of the system can accurately grasp the load condition of each node in the system, and perform real-time maintenance on the load data of each node. Therefore, each node in the system can acquire the real-time load data of each node from the management node when resource migration is needed, so that a target node suitable for resource migration can be accurately selected.
Specifically, the management node itself may be a certain node in the system, and the management node may be specified in advance.
In order to facilitate that the node where the overload network card is located can accurately screen out the nodes capable of carrying out resource migration according to the load data of each node in the system, the load information acquired from the management node at least comprises the load size and the load allowance of the node.
Preferably, the selecting one storage device from the storage devices of the node includes:
calculating the load value of each storage device in the node;
determining storage equipment meeting the migration condition in the storage equipment of the node; the migration condition is that the load value of the storage device is smaller than the load allowance of the resource migration target node, the load allowance is the sum of the residual loads of all network cards on the resource migration target node, and the residual load of each network card is the difference value between the threshold value and the load of the network card;
and taking the storage device with the minimum connection number in the determined storage devices as the selected storage device.
The threshold is used to determine whether the load of the network card is overloaded, and if the load is greater than the threshold, it indicates that the network card is overloaded, and specifically, a suitable value may be set by a person skilled in the art according to actual needs.
The above embodiments show that the present invention realizes load balancing of a distributed system by the following aspects:
1. and (4) carrying out real-time load balancing in the node, selecting a network card with the minimum load, and using an ISCSI redirection function to realize the real-time load balancing in the node on the client connection.
2. And (2) dynamic load balancing in the nodes, selecting a proper connection (the other network card cannot be overloaded after reconnection) if a certain network card is overloaded and a relatively idle network card exists in the nodes in the operation process, disconnecting the connection, automatically initiating reconnection by the ISCSI client, and realizing dynamic load balancing adjustment in the nodes according to the real-time load balancing in the node 1, wherein the network card with the minimum network load can be connected by the client.
3. And (3) dynamic load balancing among the nodes, searching network loads of all the nodes when the network card in the node cannot be found in the step (2) for load balancing, finding a node with lower load, transferring the storage device to the node, and repeating the step (1) and the step (2) to realize the dynamic load among the nodes.
4. Each node in the method is a load balancing node, and no single point of failure exists, so that high availability is realized.
The invention realizes the network load balance in and among the nodes, improves the ISCSI storage performance in the distributed system to the maximum extent, and simultaneously, the scheme has no single-point failure and no expense caused by mutual backup of two computers, thereby realizing high availability. In short, the invention can effectively realize the load balance of the distributed storage system and simultaneously improve the utilization rate of the storage resources through the real-time load balance and the dynamic load balance, and is easy to realize. The implementation of the present invention is further illustrated by a specific application scenario.
It is assumed that storage resources Target1, Target2, and Target3 are present and are generated by data volume 1, data volume 2, and data volume 3, respectively. VIP is a virtual IP in a distributed system that can drift between nodes, but always exists on only one node. When the client is initially connected to the Target end, the speed is always 0, and all the network cards are gigabit network cards (the actual speed is only 95% of the ideal speed, and then the actual speed is 1000Mbit/s 95%/8 ≈ 118 MB/s). The present example uses the simplest case to illustrate the workflow, assuming that the current VIP is on node 1.
Suppose now that there are two nodes configured as follows
And the node 1: and configuring the network card 1 and the network card 2, and simultaneously, the nodes have Target1 and Target 2.
And (3) the node 2: network card 3 and network card 4 are configured, and Target3 exists in the node.
All network card configurations are the same.
The network card load calculation formula is as follows: (network card sending rate + network card receiving rate) 100/network card ideal rate, and the rate unit is KB/s.
As shown in fig. 2, 1, real-time load is present in the node, and when the client 1 wants to access Target1, and all the network cards are in an idle state, network card 1 or network card 2 of node 1 is randomly selected, and it is assumed that network card 1 is selected, as shown in fig. 3.
2. And (3) dynamically loading in the node, and selecting the network card 2 when the client 2 wants to access Target1 and the network card 2 is in an idle state, as shown in fig. 4.
To access Target2, client 3 finally selects network card 2 according to the load balancing algorithm of the present invention, as shown in fig. 5.
At this time, if the load of the network card 2 is too high and the network card 1 is still idle, the load is more balanced after the client 2 is migrated to the network card 1 by calculation, the client 2 is disconnected, the client 2 is automatically reconnected, and the network card 1 is redirected according to the real-time load balance in the node 1. As shown in fig. 6.
3. Load balancing among the nodes, the read-write speed of the client 2 is increased to 50MB/s, at the moment, the loads of all network cards of the node 1 are higher, the connection of the client 3 on the Target2 can be disconnected through calculation, the Target2 is migrated to the node 2, at the moment, the client 3 can automatically reconnect the Target2, the node 2 can repeat 1-node real-time load balancing assumption to select the network card 3, meanwhile, the node 1 can also perform intra-node load balancing, and the final result is shown in fig. 7.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (4)

1. An ISCSI access load balancing method, comprising:
each node of the distributed storage system monitors the load of each network card in the node, and when an access request of a client is received, the network card with the minimum load in the node is used for establishing connection with the client by using an ISCSI redirection function;
when the node monitors that the network card load in the node exceeds a preset threshold value, selecting a connection meeting a preset balance adjustment condition from the connections on the network card, and disconnecting the selected connection; the balance adjustment condition comprises that the sum of the load of the connection corresponding to the network card with the minimum load in the node is less than the threshold value;
if the selection fails, the node selects a node from the system as a resource migration target node according to the load condition of each node in the system, selects a storage device from the storage devices of the node, disconnects the connection for accessing the storage device, and migrates the selected storage device to the resource migration target node; wherein the selecting one storage device from the storage devices of the node includes:
calculating the load value of each storage device in the node;
determining storage equipment meeting the migration condition in the storage equipment of the node; the migration condition is that the load value of the storage device is smaller than the load allowance of the resource migration target node, the load allowance is the sum of the residual loads of all network cards on the resource migration target node, and the residual load of each network card is the difference value between the threshold value and the load of the network card;
and taking the storage device with the minimum connection number in the determined storage devices as the selected storage device.
2. The method of claim 1, wherein the node selecting a node from the system as a current resource migration target node comprises:
the node acquires the current load data of each node in the system from the management node of the system, and selects the node with the minimum load as the current resource migration target node from other nodes in the system according to the load data.
3. The method of claim 2, further comprising:
when the load of each node in the system changes, reporting the load information of the node to a management node of the system, wherein the management node is a node in the system, and the load information at least comprises the load size and the load allowance of the node.
4. The method of claim 1, further comprising:
for each network card, the load of the network card is the sum of the access speeds of all the clients connected with the network card.
CN201711402414.7A 2017-12-22 2017-12-22 ISCSI access load balancing method Active CN108055338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711402414.7A CN108055338B (en) 2017-12-22 2017-12-22 ISCSI access load balancing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711402414.7A CN108055338B (en) 2017-12-22 2017-12-22 ISCSI access load balancing method

Publications (2)

Publication Number Publication Date
CN108055338A CN108055338A (en) 2018-05-18
CN108055338B true CN108055338B (en) 2021-04-09

Family

ID=62131508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711402414.7A Active CN108055338B (en) 2017-12-22 2017-12-22 ISCSI access load balancing method

Country Status (1)

Country Link
CN (1) CN108055338B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762924A (en) * 2018-05-28 2018-11-06 郑州云海信息技术有限公司 A kind of method, apparatus and computer readable storage medium of load balancing
CN110611622B (en) * 2018-06-15 2023-05-09 伊姆西Ip控股有限责任公司 Method for load balancing, network interface card and computer readable medium
CN109474700B (en) * 2018-12-18 2021-09-24 创新科技术有限公司 Access method of iSCSI client, storage medium, client and storage node
CN111209108A (en) * 2019-12-26 2020-05-29 天津中科曙光存储科技有限公司 Load balancing method and device for storage device end of iSCSI (Internet small computer system interface)
CN111752624B (en) * 2020-05-18 2023-09-05 深圳市东微智能科技股份有限公司 Centralized control method and system for multiple devices and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123179A (en) * 2011-03-28 2011-07-13 中国人民解放军国防科学技术大学 Load balancing method and system applied to distributed application system
CN107592370A (en) * 2017-10-31 2018-01-16 郑州云海信息技术有限公司 A kind of network load balancing method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100389392C (en) * 2006-05-29 2008-05-21 杭州华三通信技术有限公司 Method for realizing load uniform in clustering system, system and storage controller
US8024426B2 (en) * 2007-05-11 2011-09-20 Texas Memory Systems, Inc. Non-disruptive data path upgrade using target mobility
US8874459B1 (en) * 2008-07-31 2014-10-28 American Airlines, Inc. System and method for providing flight data services
CN101488918B (en) * 2009-01-09 2012-02-08 杭州华三通信技术有限公司 Multi-network card server access method and system
US8588082B2 (en) * 2009-09-23 2013-11-19 Ixia Network testing using control plane and data plane convergence
EP2510455B1 (en) * 2009-12-09 2019-07-31 Scality, SA Probabilistic offload engine for distributed hierarchical object storage devices
CN103220354A (en) * 2013-04-18 2013-07-24 广东宜通世纪科技股份有限公司 Method for achieving load balancing of server cluster
CN103596290A (en) * 2013-10-24 2014-02-19 西南交通大学 Wireless multi-network integration method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123179A (en) * 2011-03-28 2011-07-13 中国人民解放军国防科学技术大学 Load balancing method and system applied to distributed application system
CN107592370A (en) * 2017-10-31 2018-01-16 郑州云海信息技术有限公司 A kind of network load balancing method and device

Also Published As

Publication number Publication date
CN108055338A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN108055338B (en) ISCSI access load balancing method
US11005762B2 (en) Application delivery controller and global server load balancer
US11070625B2 (en) Server connection capacity management
CN109274707B (en) Load scheduling method and device
US8914521B2 (en) System and method for providing active-passive routing in a traffic director environment
JP4961146B2 (en) Load balancing method and system
CN102281190B (en) Networking method for load balancing apparatus, server and client access method
JP2013506908A (en) Dynamic load balancing and scaling of allocated cloud resources within the corporate network
US20060200469A1 (en) Global session identifiers in a multi-node system
CN103227754A (en) Dynamic load balancing method of high-availability cluster system, and node equipment
CN107682442B (en) Web connection method and device
CN109474700B (en) Access method of iSCSI client, storage medium, client and storage node
US20230069240A1 (en) Dynamic cloning of application infrastructures
US9600307B1 (en) Dynamic policy based placement of virtual machines within and across multiple data centers
US11706298B2 (en) Multichannel virtual internet protocol address affinity
KR101402367B1 (en) Efficient and cost-effective distributed call admission control
US10645183B2 (en) Redirection of client requests to multiple endpoints
CN111209108A (en) Load balancing method and device for storage device end of iSCSI (Internet small computer system interface)
CN112839081A (en) Load balancing method of cloud cluster
CN113766013B (en) Session creation method, device, equipment and storage medium
CN115378962B (en) High-availability communication method and system for storage cluster based on iSCSI protocol
Kontogiannis et al. ALBL: an adaptive load balancing algorithm for distributed web systems
CN112866394B (en) Load balancing method, device, system, computer equipment and storage medium
KR101869925B1 (en) Method for connecting web servers and web application servers and was admin server using the same
CN103037031A (en) Internet protocol (IP) address administration method of internet small computer system interface (ISCSI) target device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 505, Taixing Building, 11 Garden East Road, Haidian District, Beijing, 100191

Applicant after: Innovation Technology Co., Ltd.

Address before: Room 0801-0805, 51 College Road, Haidian District, Beijing, 100191

Applicant before: Innovation and Technology Storage Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant