CN106375131B - A kind of virtualization network uplink load-balancing method - Google Patents

A kind of virtualization network uplink load-balancing method Download PDF

Info

Publication number
CN106375131B
CN106375131B CN201610913667.XA CN201610913667A CN106375131B CN 106375131 B CN106375131 B CN 106375131B CN 201610913667 A CN201610913667 A CN 201610913667A CN 106375131 B CN106375131 B CN 106375131B
Authority
CN
China
Prior art keywords
load
physical network
message
network card
uplink
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
CN201610913667.XA
Other languages
Chinese (zh)
Other versions
CN106375131A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610913667.XA priority Critical patent/CN106375131B/en
Publication of CN106375131A publication Critical patent/CN106375131A/en
Application granted granted Critical
Publication of CN106375131B publication Critical patent/CN106375131B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities

Abstract

The present invention is more particularly directed to a kind of virtualization network uplink load-balancing methods.The virtualization network uplink load-balancing method, structure include load counter, load balancer and load container, and the load counter and load container are all connected to load balancer, and the load balancer is connected to each physical network card;The load balancer is sent next message by calculating selection physical network card using the message number aggregate-value and physical network card number of load counter and load container acquisition, and calls the transmission for sending function and realizing message of each physical network card.The virtualization network uplink load-balancing method, using simplest logical algorithm, make adjacent message pass through different physical network cards respectively to issue, it avoids occupying a large amount of cpu resources, method is succinct efficiently easily to be realized, load balancing can be reached between the physical network card that uplink is bound, use physical network card upstream bandwidth to greatest extent.

Description

A kind of virtualization network uplink load-balancing method
Technical field
The present invention relates to virtualization network design technical field, in particular to a kind of virtualization network uplink load is equal Weighing apparatus method.
Background technique
In internet, the world today of cloud computing, big data rapid development, the network throughput of server is also at full speed therewith Increase, can quickly and the more services of offer are it is necessary to carry more flows.But if in order to improve some handling capacities, And more advanced network card equipment is purchased, upgraded, server use cost will necessarily improve;Meanwhile with server itself The network card equipment that performance limitation can be supported also has limitation.
The heart forms a uplink being aggregating usually by the way that muti-piece physical network card to be held together in the server Road, to achieve the purpose that expand bandwidth.If muti-piece physical network card is bound together the uplink to form a bigger bandwidth, When there is message to send, it is necessary to which a strategy is allowed to send from different network interface cards, to achieve the effect that load balancing;And If only redundancy, bandwidth cannot increase.Using the strategy of load balancing, bandwidth can not only be increased, equally had The effect of redundancy.
Data packet can not be really evenly distributed to each by virtualization Network Load Balance algorithm there are certain defect at present A physical network card.As famous openvswitch provides three kinds of load-balancing methods: balance-slb, balance-tcp, Active-backup, active-backup mode can only redundancy, be unable to load balancing;And balance-slb and balance- Although both modes of tcp can be according to L2, L3 and L4 layers of progress load balancing, both algorithms are fixed Yi Dan calculated The stream of feature will only be sent from some network interface card, when only one stream or have several stream features it is identical when all will be from certain One network interface card is sent, and has certain defect.
Based on the above situation, it effectively solves the above problems in order to balancing flow to different network interface cards, the invention proposes A kind of virtualization network uplink load-balancing method.
Summary of the invention
It is negative that in order to compensate for the shortcomings of the prior art, the present invention provides a kind of virtualization network uplinks being simple and efficient Carry equalization methods.
The present invention is achieved through the following technical solutions:
A kind of virtualization network uplink load-balancing method, it is characterised in that: building uplink sends message and patrols Volume structure, it includes load counter, load balancer and load container that the uplink, which sends message logical construction, described negative It carries counter and load container is all connected to load balancer, the load balancer is connected to each physical network card;It is described negative It carries counter and adds up before entering load balancer to each message, when the physical network card composition of uplink changes When load counter is zeroed out;The load container records uplink physical network interface card number, when uplink physical net When card composition changes, real-time change is carried out;The data that the load balancer is acquired using load counter and load container, Next message is sent by calculating selection physical network card, and the transmission function of each physical network card is called to realize message Transmission.
The initial value of the load counter is 0, when message will be sent out message from this uplink, increases by 1; The initial value of the load container is also 0, and when one physical network card of every increase increases by 1, and when one physical network card of every reduction subtracts 1; The load balancer sends function to each physical network card and n is successively numbered, and n is natural number, and according to algorithms selection phase The physical network card answered sends function, message is sent, the corresponding transmission function of the physical network card that number is n is ethn_tx.
When reaching a message, will pass, by load counter count=count+1;Message enters load ?
Weighing apparatus module, load balancer obtain message number aggregate-value count from load counter and load container respectively And object
Network interface card number m is managed, passes through algorithm: Select=(count%m)+1;
If Selcet is equal to 1, calls eth1_tx to send function and send message;If Select=2 calls eth2_tx Transmission function send message;If Select is equal to n, calls ethn_tx to send function and send message.eth1_tx,eth2_ Tx, ethn_tx respectively correspond the physical network card that uplink number is 1,2, n.
The beneficial effects of the present invention are: the virtualization network uplink load-balancing method, using simplest logic Algorithm makes adjacent message pass through different physical network cards respectively and issues, avoids occupying a large amount of cpu resources, method is succinctly efficient It easily realizes, load balancing can be reached between the physical network card that uplink is bound, use physical network card uplink to greatest extent Bandwidth.
Detailed description of the invention
Attached drawing 1 is that uplink of the present invention sends message logical construction schematic diagram.
Specific embodiment
In order to which technical problems, technical solutions and advantages to be solved are more clearly understood, tie below Drawings and examples are closed, the present invention will be described in detail.It should be noted that specific embodiment described herein is only used To explain the present invention, it is not intended to limit the present invention.
The virtualization network uplink load-balancing method constructs a uplink first and sends message logic knot Structure, it includes load counter, load balancer and load container, the load meter that the uplink, which sends message logical construction, Number device and load container are all connected to load balancer, and the load balancer is connected to each physical network card;The load meter Number devices to each message enter load balancer before add up, when uplink physical network card composition change when pair Load counter is zeroed out;The load container records uplink physical network interface card number, when uplink physical network interface card group When at changing, real-time change is carried out;The data that the load balancer is acquired using load counter and load container, pass through It calculates selection physical network card to send next message, and calls the hair for sending function and realizing message of each physical network card It send.
The initial value of the load counter is 0, when message will be sent out message from this uplink, increases by 1; The initial value of the load container is also 0, and when one physical network card of every increase increases by 1, and when one physical network card of every reduction subtracts 1; The load balancer sends function to each physical network card and is successively numbered 1,2,3 ..., and ..n, n are natural number, and according to The corresponding physical network card of algorithms selection sends function, message is sent, the corresponding transmission function of the physical network card that number is n For ethn_tx.
Specific calculation method is as follows:
When reaching a message, will pass, by load counter count=count+1;Message enters load Equalizer module, load balancer obtain message number aggregate-value count and physics from load counter and load container respectively Network interface card number m, passes through algorithm: Select=(count%m)+1;
If Selcet is equal to 1, calls eth1_tx to send function and send message;If Select=2 calls eth2_tx Transmission function send message;If Select is equal to n, calls ethn_tx to send function and send message.eth1_tx,eth2_ Tx, ethn_tx respectively correspond the physical network card that uplink number is 1,2, n.
The virtualization network uplink load-balancing method is suitable for the various band networks such as linux, window, unix Operating system, the message that server is sent by uplink, successively uplink binding physical network card it Between carry out rotation transmission, the number for making each network interface card send message reaches balanced to reach flow equalization.Although message has greatly Have small, but this has no effect on the equilibrium of flow.And since each application program in upper layer is sent out message, when needing to obtain CPU Between piece, therefore each application program is also to be sent out message by turns, those of is being sent in timeslice, message size is basic It is consistent.And when flow reaches network interface card maximum ability to take the burden, for a transmission 1G/S flow, message interval is no more than It 0.0014 millisecond, if there is 2 physical network cards successively to send packet in turn, is equivalent to and entire flow is sampled for 0.0028 second.It is right In this two groups of samplings that this two physical network cards obtain, mean value error says the power of this flow equalization less than one thousandth Degree has been able to reach real equilibrium.

Claims (1)

1. a kind of virtualization network uplink load-balancing method, it is characterised in that: building uplink sends message logic Structure, it includes load counter, load balancer and load container, the load that the uplink, which sends message logical construction, Counter and load container are all connected to load balancer, and the load balancer is connected to each physical network card;The load Counter adds up before entering load balancer to each message, when the physical network card of uplink composition changes Load counter is zeroed out;The load container records uplink physical network interface card number, when uplink physical network interface card When composition changes, real-time change is carried out;The data that the load balancer is acquired using load counter and load container, lead to It crosses calculating selection physical network card to send next message, and the function that sends of each physical network card is called to realize message It sends;
The initial value of the load counter is 0, when message will be sent out message from this uplink, increases by 1;It is described The initial value of load container is also 0, and when one physical network card of every increase increases by 1, and when one physical network card of every reduction subtracts 1;It is described Load balancer sends function to each physical network card and n is successively numbered, and n is natural number, and corresponding according to algorithms selection Physical network card sends function, message is sent, the corresponding transmission function of the physical network card that number is n is ethn_tx;
Specific calculation method is as follows:
When reaching a message, will pass, by load counter count=count+1;Message enters load balancing Device module, load balancer obtain message number aggregate-value count and physical network card from load counter and load container respectively Number m, passes through algorithm: Select=(count%m)+1;
If Selcet is equal to 1, calls eth1_tx to send function and send message;If Select=2, the hair of eth2_tx is called Function is sent to send message;If Select is equal to n, calls ethn_tx to send function and send message;eth1_tx,eth2_tx, Ethn_tx respectively corresponds the physical network card that uplink number is 1,2, n.
CN201610913667.XA 2016-10-20 2016-10-20 A kind of virtualization network uplink load-balancing method Active CN106375131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610913667.XA CN106375131B (en) 2016-10-20 2016-10-20 A kind of virtualization network uplink load-balancing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610913667.XA CN106375131B (en) 2016-10-20 2016-10-20 A kind of virtualization network uplink load-balancing method

Publications (2)

Publication Number Publication Date
CN106375131A CN106375131A (en) 2017-02-01
CN106375131B true CN106375131B (en) 2019-08-02

Family

ID=57894891

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610913667.XA Active CN106375131B (en) 2016-10-20 2016-10-20 A kind of virtualization network uplink load-balancing method

Country Status (1)

Country Link
CN (1) CN106375131B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110557340B (en) * 2018-06-04 2023-04-07 中兴通讯股份有限公司 Load balancing method, system and input device
CN110611622B (en) * 2018-06-15 2023-05-09 伊姆西Ip控股有限责任公司 Method for load balancing, network interface card and computer readable medium
CN109347656B (en) * 2018-09-11 2022-02-18 郑州云海信息技术有限公司 Method and system for configuring virtual host uplink network card
CN113765816B (en) * 2021-08-02 2023-12-15 阿里巴巴新加坡控股有限公司 Flow control method, system, equipment and medium based on service grid

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610283A (en) * 2009-07-17 2009-12-23 浪潮电子信息产业股份有限公司 A kind of method of dynamically balancing received load under network card binding state
CN103051534A (en) * 2012-11-20 2013-04-17 杭州迪普科技有限公司 Message processing method and device
CN103067976A (en) * 2013-02-07 2013-04-24 深圳市磊科实业有限公司 Load balancing method of multi-interface wireless access point and implementation device
CN103188753A (en) * 2011-12-27 2013-07-03 中国移动通信集团山东有限公司 Method and device for data transmission based on different links between heterogeneous networks
CN103384255A (en) * 2011-12-31 2013-11-06 华为数字技术(成都)有限公司 Load balancing method, server and system for virtual machine cluster
CN104079486A (en) * 2013-03-28 2014-10-01 国际商业机器公司 Gateway and method of transmitting data through gateway
CN104883264A (en) * 2014-02-27 2015-09-02 中国科学院声学研究所 Method and system of virtualizing network cards on network processing platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040024904A1 (en) * 2002-07-31 2004-02-05 Dimambro Francesco R. Load balancing packet transmission among multiple transmit rings
US20120230194A1 (en) * 2011-03-11 2012-09-13 Broadcom Corporation Hash-Based Load Balancing in Large Multi-Hop Networks with Randomized Seed Selection

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610283A (en) * 2009-07-17 2009-12-23 浪潮电子信息产业股份有限公司 A kind of method of dynamically balancing received load under network card binding state
CN103188753A (en) * 2011-12-27 2013-07-03 中国移动通信集团山东有限公司 Method and device for data transmission based on different links between heterogeneous networks
CN103384255A (en) * 2011-12-31 2013-11-06 华为数字技术(成都)有限公司 Load balancing method, server and system for virtual machine cluster
CN103051534A (en) * 2012-11-20 2013-04-17 杭州迪普科技有限公司 Message processing method and device
CN103067976A (en) * 2013-02-07 2013-04-24 深圳市磊科实业有限公司 Load balancing method of multi-interface wireless access point and implementation device
CN104079486A (en) * 2013-03-28 2014-10-01 国际商业机器公司 Gateway and method of transmitting data through gateway
CN104883264A (en) * 2014-02-27 2015-09-02 中国科学院声学研究所 Method and system of virtualizing network cards on network processing platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于Linux的多网卡负载均衡技术";彭海云; 李亚;《实验室研究与探索》;20120915;第31卷(第9期);全文 *

Also Published As

Publication number Publication date
CN106375131A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN106375131B (en) A kind of virtualization network uplink load-balancing method
CN104184813B (en) The load-balancing method and relevant device and group system of virtual machine
CN104283939B (en) For flexibly flowing the device of unloading, method and non-transitory computer-readable media
US9231869B2 (en) Ensuring predictable and quantifiable networking performance
US11394649B2 (en) Non-random flowlet-based routing
US10331590B2 (en) Graphics processing unit (GPU) as a programmable packet transfer mechanism
US9258257B2 (en) Direct memory access rate limiting in a communication device
US8429282B1 (en) System and method for avoiding system overload by maintaining an ideal request rate
US8392558B1 (en) System and method for determining overload state for service requests
US9762495B1 (en) Weighted distribution across paths of degraded quality
CN105872079B (en) A kind of link equalization method based on domain name system DNS
US20180357086A1 (en) Container virtual switching
CN104348694A (en) Network interface card with virtual switch and traffic flow policy enforcement
CN106027323A (en) Technologies for gpu assisted network traffic monitoring and analysis
US11301020B2 (en) Data center power management
CN109218216A (en) Chain polymerization traffic distribution method, device, equipment and storage medium
CN110022269A (en) Processing method of communication data, device and equipment
US20170149608A1 (en) Dynamic configuration of network features
US20220046647A1 (en) Logical channel management in a communication system
US20230300073A1 (en) Managing bandwith in fibre channel over internet protocol communication channels
da Silva et al. A Dynamic Load Balancing Algorithm for Data Plane Traffic.
CN109995818A (en) A kind of method and device of server load balancing
CN109327400A (en) A kind of data communications method and data communication network
Chen et al. Dynamic load balancing for software-defined data center networks
US9912563B2 (en) Traffic engineering of cloud services

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant