CN111245904A - Load balancing scheduling system and method for multi-network-port server cluster - Google Patents
Load balancing scheduling system and method for multi-network-port server cluster Download PDFInfo
- Publication number
- CN111245904A CN111245904A CN201911415495.3A CN201911415495A CN111245904A CN 111245904 A CN111245904 A CN 111245904A CN 201911415495 A CN201911415495 A CN 201911415495A CN 111245904 A CN111245904 A CN 111245904A
- Authority
- CN
- China
- Prior art keywords
- server
- port
- network
- load balancing
- group
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1023—Server selection for load balancing based on a hash applied to IP addresses or costs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a load balancing scheduling system and method of a multi-network-port server cluster, which can ensure that messages of the same flow are homologously and homotopically forwarded to the same server, and flow can be evenly distributed to a plurality of network ports of the server on each server, thereby greatly improving the balance and stability of load balancing scheduling.
Description
Technical Field
The invention relates to the technical field of network communication, in particular to a load balancing scheduling system and method for a multi-network-port server cluster.
Background
In a network link, there is often a cross-switch situation between a primary network device and a secondary server. The server refers to a background service processor, and is usually a real rack-mounted or blade server, and may be represented by a MAC address or an IP address. A plurality of servers form a server cluster, and each server of the cluster can have one or more internet access ports. How to design a load balancing scheduling system, the message load can be distributed to each server in the cluster in a balanced manner, and the message distributed to the same server can be shared among multiple network ports of the server, which becomes a problem to be solved urgently.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a load balancing scheduling system and method for a multi-portal server cluster, which can ensure that messages of the same flow are homologously and homotopically forwarded to the same server, and on each server, the flow can be evenly distributed to multiple portals of the server, thereby greatly improving the balance and stability of load balancing scheduling.
In order to solve the above technical problem, the present invention provides a load balancing scheduling system for a multi-portal server cluster, comprising: the parent hash scheduling module comprises a parent port group: the member ports of the parent port group are child port groups, the load balancing strategy is quintuple hash, servers in the cluster are numbered, the ID of each server group is [ 1-N ], and each server is regarded as a child port group and is used as a parent port group member;
the sub-level polling scheduling module comprises a sub-level port group: the member ports of the sub-level port group are physical network ports, the load balancing strategy is Round-Robin, a plurality of network ports on the same server are used as members of the sub-level port group and are added into the same port group, and the messages shunted to the same server are sent to each network port in turn to realize polling shunting.
Correspondingly, the load balancing scheduling method of the multi-network-port server cluster comprises the following steps:
(1) the flow of the link side is input into a first-level network device, and the device analyzes the message and extracts quintuple information;
(2) the first-level network equipment calculates a hash value according to a load balancing strategy and a load balancing algorithm, wherein the load balancing strategy is to calculate one or more quintuple information and is to hash according to a source IP or a combination of the source IP and a destination IP;
(3) searching a server group table according to the server group number and the hash value, and selecting a server from the corresponding server group; the server group table takes a server number ID + a hash value IDX as a key value, and takes the server identification, MAC or IP as a table result;
(4) reading the counter on the selected server, and performing remainder operation on the numerical value of the counter and the total number of the ports to obtain a result, namely the number of the corresponding network port on the server;
(5) and sending the message to a designated internet access on the selected server, adding 1 to the corresponding counter, and setting the counter value to be 1 if the counter value is greater than the total number of the internet accesses on the server.
Preferably, in step (1), the five-tuple information is a source IP, a destination IP, a source port number, a destination port number, and a protocol number.
The invention has the beneficial effects that: the method and the system can ensure that the messages of the same flow are homologously and homotopically forwarded to the same server, and the flow can be evenly distributed to a plurality of network ports of the server on each server, thereby greatly improving the balance and the stability of load balancing scheduling.
Drawings
FIG. 1 is a schematic process diagram of the system of the present invention.
Detailed Description
As shown in fig. 1, a load balancing scheduling system for a multi-portal server cluster includes: the parent hash scheduling module comprises a parent port group: the member ports of the parent port group are child port groups, and the load balancing strategy is five-tuple hash. The servers in the cluster are numbered, and the ID of each server group is [ 1-N ]. Each server is considered a child port group as a parent port group member.
For example: creating a parent port group 1, wherein the members are a child port group 1, a child port group 2 and a child port group 3;
the members of the sub-level port group 1 are a plurality of physical network ports of the server 1;
the members of the sub-level port group 2 are a plurality of physical network ports of the server 2;
the members of the sub-level port group 3 are a plurality of physical network ports of the server 3;
port-group1{sub-port-group1;sub-port-group2;sub-port-group3}
sub-port-group1{port1;port2;port3;port4}
port 1; port 2; port 3; port4 is 4 network ports on server 1;
and the flow which is shunted to the parent port group 1 is hashed to the child port group according to a hash strategy. And the flow shunted to the sublevel port group 1 is polled at 4 network ports.
The sub-level polling scheduling module (multi-network port polling counting) comprises a sub-level port group: the member ports of the sub-level port group are physical network ports, and the load balancing strategy is Round-Robin. And taking a plurality of network ports on the same server as members of the sub-level port group, adding the plurality of network ports into the same port group, and sending the messages shunted to the same server to each network port in turn to realize polling shunting.
The server network port information and the total number PortSum of the network ports can be issued to the network processor through configuration.
The network processor chip allocates a statistical counter for each server, and the maximum value of the counter is the total number of the network ports of the server. The counter starts counting from 1, and after the counter counts to the maximum value, the counter is reset to 1, and the process is repeated. And reading the value of the statistic counter, and shunting the packets to each port one by one.
For example:
shunting the 1 st packet to the 1 st port;
shunting the 2 nd packet to the 2 nd port;
the first portSum packets are shunted to the first portSum ports;
the (PortSum +1) th packet is shunted to the 1 st port;
and so on.
And the parent-level Hash scheduling mechanism selects a server from the server cluster according to a certain Hash algorithm, and can ensure that messages of the same flow are distributed to the same server in a homologous and homoclinic mode.
And the sub-level polling scheduling mechanism distributes the messages distributed to the same server to a plurality of network ports of the server in turn, and strictly ensures the load sharing of the plurality of network ports of the server.
A load balancing scheduling method for a multi-network-port server cluster comprises the following steps:
step S1: the flow of the link side is input into a first-level network device, the device analyzes the message and extracts quintuple information (a source IP, a destination IP, a source port number, a destination port number and a protocol number);
step S2: the first-level network equipment calculates a hash value according to a load balancing strategy and a load balancing algorithm, wherein the load balancing strategy refers to the operation of certain or a plurality of quintuple information, and can be hash according to a source IP (Internet protocol), or hash according to the combination of the source IP and a destination IP, and the like;
step S3: searching a server group table according to the server group number and the hash value, and selecting a server from the corresponding server group; the server group table takes a server number ID + a hash value IDX as a key value, and takes the server identification, MAC or IP as a table result;
step S4: on the selected server, the counter is read. And the value of the counter and the total number of the ports are subjected to remainder operation, and the obtained result is the corresponding network port number on the server. For example, the counter value of 1 corresponds to port1, the counter value of PortSum corresponds to port PortSum, and the counter value of PortSum +1 corresponds to port 1;
the corresponding network port number: PortID ═ Count% PortSum;
wherein, Count is the counter value, PortSum is the total number of network ports on the server to be distributed.
Step S5: and sending the message to a designated internet access on the selected server, and adding 1 to the corresponding counter. And if the counter value is larger than the total number of the network ports on the server, setting the counter value to be 1.
The invention can ensure that the flow of the same user is transmitted to the same server in the same source and in the same destination, and can also share the load of the flow at the network interface of each server, thereby greatly improving the balance and the stability of load balancing scheduling.
Claims (3)
1. A load balancing scheduling system of a multi-network-port server cluster is characterized by comprising:
the parent hash scheduling module comprises a parent port group: the member ports of the parent port group are child port groups, the load balancing strategy is quintuple hash, servers in the cluster are numbered, the ID of each server group is [ 1-N ], and each server is regarded as a child port group and is used as a parent port group member;
the sub-level polling scheduling module comprises a sub-level port group: the member ports of the sub-level port group are physical network ports, the load balancing strategy is Round-Robin, a plurality of network ports on the same server are used as members of the sub-level port group and are added into the same port group, and the messages shunted to the same server are sent to each network port in turn to realize polling shunting.
2. A load balancing scheduling method for a multi-network-port server cluster is characterized by comprising the following steps:
(1) the flow of the link side is input into a first-level network device, and the device analyzes the message and extracts quintuple information;
(2) the first-level network equipment calculates a hash value according to a load balancing strategy and a load balancing algorithm, wherein the load balancing strategy is to calculate one or more quintuple information and is to hash according to a source IP or a combination of the source IP and a destination IP;
(3) searching a server group table according to the server group number and the hash value, and selecting a server from the corresponding server group; the server group table takes a server number ID + a hash value IDX as a key value, and takes the server identification, MAC or IP as a table result;
(4) reading the counter on the selected server, and performing remainder operation on the numerical value of the counter and the total number of the ports to obtain a result, namely the number of the corresponding network port on the server;
(5) and sending the message to a designated internet access on the selected server, adding 1 to the corresponding counter, and setting the counter value to be 1 if the counter value is greater than the total number of the internet accesses on the server.
3. The load-balancing scheduling method of a multi-port server cluster according to claim 2, wherein in the step (1), the five-tuple information includes a source IP, a destination IP, a source port number, a destination port number, and a protocol number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911415495.3A CN111245904A (en) | 2019-12-31 | 2019-12-31 | Load balancing scheduling system and method for multi-network-port server cluster |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911415495.3A CN111245904A (en) | 2019-12-31 | 2019-12-31 | Load balancing scheduling system and method for multi-network-port server cluster |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111245904A true CN111245904A (en) | 2020-06-05 |
Family
ID=70871860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911415495.3A Pending CN111245904A (en) | 2019-12-31 | 2019-12-31 | Load balancing scheduling system and method for multi-network-port server cluster |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111245904A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113542051A (en) * | 2021-05-27 | 2021-10-22 | 贵州电网有限责任公司 | Monitoring flow load balancing method based on software defined network |
CN117978758A (en) * | 2024-03-29 | 2024-05-03 | 珠海星云智联科技有限公司 | Adaptation method for data processing unit, computer device and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102447638A (en) * | 2012-01-12 | 2012-05-09 | 中兴通讯股份有限公司 | Load balancing method and forwarding apparatus |
CN108933829A (en) * | 2018-07-10 | 2018-12-04 | 浙江数链科技有限公司 | A kind of load-balancing method and device |
CN109617986A (en) * | 2018-12-27 | 2019-04-12 | 华为技术有限公司 | A kind of load-balancing method and the network equipment |
-
2019
- 2019-12-31 CN CN201911415495.3A patent/CN111245904A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102447638A (en) * | 2012-01-12 | 2012-05-09 | 中兴通讯股份有限公司 | Load balancing method and forwarding apparatus |
CN108933829A (en) * | 2018-07-10 | 2018-12-04 | 浙江数链科技有限公司 | A kind of load-balancing method and device |
CN109617986A (en) * | 2018-12-27 | 2019-04-12 | 华为技术有限公司 | A kind of load-balancing method and the network equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113542051A (en) * | 2021-05-27 | 2021-10-22 | 贵州电网有限责任公司 | Monitoring flow load balancing method based on software defined network |
CN113542051B (en) * | 2021-05-27 | 2022-08-30 | 贵州电网有限责任公司 | Monitoring flow load balancing method based on software defined network |
CN117978758A (en) * | 2024-03-29 | 2024-05-03 | 珠海星云智联科技有限公司 | Adaptation method for data processing unit, computer device and medium |
CN117978758B (en) * | 2024-03-29 | 2024-06-07 | 珠海星云智联科技有限公司 | Adaptation method for data processing unit, computer device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3516833B1 (en) | Methods, systems, and computer readable media for discarding messages during a congestion event | |
KR101844136B1 (en) | Method, apparatus and computer program for network anomaly detection in distributed software defined networking environment | |
US20220329525A1 (en) | Load balancing method and device | |
EP2837147B1 (en) | System for performing diameter overload control | |
EP3154224B1 (en) | Systems and methods for maintaining network service levels | |
US20110211463A1 (en) | Add-on module and methods thereof | |
US9350631B2 (en) | Identifying flows causing undesirable network events | |
WO2013078579A1 (en) | Method, apparatus and system for sending message | |
CN109672711B (en) | Reverse proxy server Nginx-based http request processing method and system | |
EP3457744B1 (en) | Service traffic control method and device | |
JP2017152852A (en) | Communication system, communication apparatus, and communication control method for communication system | |
CN111245904A (en) | Load balancing scheduling system and method for multi-network-port server cluster | |
CN111726299B (en) | Flow balancing method and device | |
CN109642923A (en) | Current-dividing network data are to execute load balance | |
CN108028828A (en) | A kind of distributed denial of service ddos attack detection method and relevant device | |
CN107547425B (en) | Convergence layer data transmission method and system | |
CN112104564A (en) | Load sharing method and equipment | |
CN110290072A (en) | Flow control methods, device, the network equipment and storage medium | |
CN103346950A (en) | Sharing method and device of load between user service boards of rack-mounted wireless controller | |
EP3985927A1 (en) | Packet loss positioning method, apparatus and system, and computer storage medium | |
CN110784378B (en) | Method and device for realizing accurate flow balance by using TWAMP (two way operational amplifier) | |
US8948171B1 (en) | System and method for IP multicast | |
CN104202297B (en) | A kind of anti-attack method and equipment adapting dynamically to server performance | |
CN104580000A (en) | Flow table technology-based RapidIO switching method | |
CN114095441A (en) | Method for realizing ECMP flow load balance and electronic equipment |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200605 |
|
RJ01 | Rejection of invention patent application after publication |