CN106375131A - Uplink load balancing method of virtual network - Google Patents
Uplink load balancing method of virtual network Download PDFInfo
- Publication number
- CN106375131A CN106375131A CN201610913667.XA CN201610913667A CN106375131A CN 106375131 A CN106375131 A CN 106375131A CN 201610913667 A CN201610913667 A CN 201610913667A CN 106375131 A CN106375131 A CN 106375131A
- 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.)
- Granted
Links
Classifications
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0896—Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
Abstract
The invention relates to an uplink load balancing method of a virtual network. According to the method, a load counter, a load balancer and a load container are arranged; the load counter and the load container are connected to the load balancer; and the load balancer is connected to all physical network cards. On the basis of an accumulation value of the number of messages collected by the load counter as well as the number of the physical network cards collected by the load capacitor, the load balancer carries out calculation to select one physical network card to send a next message out; sending functions of all physical network cards are invoked to realize message sending. With the method, on the basis of the simplest logic algorithm, adjacent messages are sent out by different physical network cards, thereby avoiding occupation of lots of CPU resources. The method is simple and can be realized efficiently and easily; load balancing can be realized between the physical network cards bound to the uplink; and the uplink bandwidths of the physical network cards can be utilized to the greatest extent.
Description
Technical field
The present invention relates to virtualization network design technical field, particularly to a kind of virtualization network uplink load all
Weighing apparatus method.
Background technology
The world today developing rapidly in the Internet, cloud computing, big data, the network throughput of server is also at full speed therewith
Increase, can quickly and provide more service it is necessary to more flows can be carried.But if in order to improve some handling capacities,
And purchase higher level network card equipment, upgraded, server use cost necessarily will improve;Meanwhile, with server itself
Performance limits the network card equipment that can be supported by and also has limitation.
The heart, generally by being held together polylith physical network card, forms a uplink being aggregating in the server
Road, to reach the purpose expanding bandwidth.If polylith physical network card is bound together the up-link forming a bigger bandwidth,
When there being message will send it is necessary to a strategy is allowed to send from different network interface cards, to reach the effect of load balancing;And
If simply redundancy, bandwidth cannot increase.Using the strategy of load balancing, bandwidth can not only be increased, equally have
The effect of redundancy.
There is certain defect in virtualization Network Load Balance algorithm at present, can not really be evenly distributed to packet each
Individual physical network card.As famous openvswitch provide three kinds of load-balancing method: balance-slb, balance-tcp,
Active-backup, active-backup pattern can only redundancy it is impossible to load balancing;And balance-slb and balance-
Although tcp both patterns can carry out load balancing according to l2, l3 and l4 layer, both algorithms are after calculating, fixing
The stream of feature will only be sent from certain network interface card, when only one flow or have several stream features identical when all will be from certain
One network interface card sends, and has certain defect.
Based on above-mentioned situation, in order to balancing flow to different network interface cards, effectively solving the problems referred to above, the present invention proposes
A kind of virtualization network uplink load-balancing method.
Content of the invention
The present invention is in order to make up the defect of prior art, there is provided one kind simply efficiently virtualizes network uplink and bears
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: build up-link and send message logic knot
Structure, described up-link sends message logical structure and includes load counter, load equalizer and load container, described load meter
Number device and load container are all connected to load equalizer, and described load equalizer is connected to each physical network card;Described load meter
Number devices to each message enter load equalizer before add up, when up-link physical network card composition change when pair
Load counter is zeroed out;Described load container record uplink physical network interface card number, when uplink physical network interface card group
When becoming to change, carry out real-time change;Described load equalizer utilizes load counter and the data of load container collection, passes through
Calculate and select physical network card to send next message, and call the function that sends of each physical network card to realize sending out of message
Send.
The initial value of described load counter is 0, whenever message will increase by 1 when this up-link is sent out message;
The initial value of described load container is also 0, increases by 1 when often increasing a physical network card, subtracts 1 when often reducing by a physical network card;
Described load equalizer sends function to each physical network card and is numbered n successively, and n is natural number, and according to algorithms selection phase
The physical network card answered sends function, and message is sent, and numbering is the corresponding function that sends of physical network card of n is ethn_tx.
When reaching a message, will pass, through load counter count=count+1;Message enters load
Equalizer module, load equalizer obtains message number aggregate-value count and physics respectively from load counter and load container
Network interface card number m, by algorithm: select=(count%m)+1;
When select is equal to n, then calls transmission function ethn_tx to send message, send function ethn_tx and correspond to up-link
Numbering is the physical network card of n.
The invention has the beneficial effects as follows: this virtualization network uplink load-balancing method, using simplest logic
Algorithm, makes adjacent message send by different physical network cards respectively, it is to avoid take a large amount of cpu resources, and method is succinctly efficient
Easily realize, load balancing can be reached between the physical network card of up-link binding, up using physical network card to greatest extent
Bandwidth.
Brief description
Accompanying drawing 1 sends message logical construction schematic diagram for up-link of the present invention.
Specific embodiment
In order that the technical problem to be solved, technical scheme and beneficial effect become more apparent, below tie
Close drawings and Examples, 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.
This virtualization network uplink load-balancing method, builds a up-link first and sends message logic knot
Structure, described up-link sends message logical structure and includes load counter, load equalizer and load container, described load meter
Number device and load container are all connected to load equalizer, and described load equalizer is connected to each physical network card;Described load meter
Number devices to each message enter load equalizer before add up, when up-link physical network card composition change when pair
Load counter is zeroed out;Described load container record uplink physical network interface card number, when uplink physical network interface card group
When becoming to change, carry out real-time change;Described load equalizer utilizes load counter and the data of load container collection, passes through
Calculate and select physical network card to send next message, and call the function that sends of each physical network card to realize sending out of message
Send.
The initial value of described load counter is 0, whenever message will increase by 1 when this up-link is sent out message;
The initial value of described load container is also 0, increases by 1 when often increasing a physical network card, subtracts 1 when often reducing by a physical network card;
Described load equalizer sends function to each physical network card and is numbered 1,2,3 successively ..., and ..n, n are natural number, and according to
The corresponding physical network card of algorithms selection sends function, message is sent, numbering is the physical network card corresponding transmission function of n
For ethn_tx.
Specific computational methods are as follows:
When reaching a message, will pass, through load counter count=count+1;Message enters load balancing
Device module, load equalizer obtains message number aggregate-value count and physical network card respectively from load counter and load container
Number m, by algorithm: select=(count%m)+1;
If selcet is equal to 1, calls eth1_tx to send function and send message;If select=2, call sending out of eth2_tx
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 corresponds to the physical network card that uplink number is 1,2, n respectively.
This virtualization network uplink load-balancing method is it is adaptable to the various band network such as linux, window, unix
Operating system, the message that server is sent by up-link, successively up-link binding physical network card it
Between carry out rotation send, make each network interface card send message number reach equilibrium thus reaching flow equalization.Although message has greatly
Have little, but this has no effect on the equilibrium of flow.And because each application program of upper strata is sent out message, when needing to obtain cpu
Between piece, therefore each application program is also to be sent out message by turns, send those timeslices in, message size is basic
Consistent.And when flow reaches network interface card maximum ability to take the burden, for a transmission 1g/s flow, message interval is less than
0.0014 millisecond, if there being 2 physical network cards to send bag in turn successively, being equivalent to and whole flow is sampled for 0.0028 second.Right
This two groups samplings obtaining in this two physical network cards, mean value error, less than one thousandth, therefore says the power of this flow equalization
Degree has been able to reach real equilibrium.
Claims (3)
1. a kind of virtualization network uplink load-balancing method it is characterised in that: build up-link and send message logic
Structure, described up-link sends message logical structure and includes load counter, load equalizer and load container, described load
Enumerator and load container are all connected to load equalizer, and described load equalizer is connected to each physical network card;Described load
Enumerator added up before entering load equalizer to each message, when the physical network card composition of up-link changes
Load counter is zeroed out;Described load container record uplink physical network interface card number, when uplink physical network interface card
When composition changes, carry out real-time change;Described load equalizer utilizes load counter and the data of load container collection, leads to
Crossing calculating selects physical network card to send next message, and calls the function that sends of each physical network card to realize message
Send.
2. according to claim 1 virtualization network uplink load-balancing method it is characterised in that: described load meter
The initial value of number device is 0, whenever message will increase by 1 when this up-link is sent out message;Described load container initial
Value is also 0, increases by 1 when often increasing a physical network card, subtracts 1 when often reducing by a physical network card;Described load equalizer is to every
Individual physical network card sends function and is numbered n successively, and n is natural number, and sends letter according to the corresponding physical network card of algorithms selection
Number, message is sent, and numbering is the corresponding function that sends of physical network card of n is ethn_tx.
3. according to claim 1 and 2 virtualization network uplink load-balancing method it is characterised in that: work as arrival
One message, will pass, through load counter count=count+1;Message enters load balancer module, load
Equalizer obtains message number aggregate-value count and physical network card number m respectively from load counter and load container, by calculating
Method: select=(count%m)+1;
When select is equal to n, then calls transmission function ethn_tx to send message, send function ethn_tx and correspond to up-link
Numbering is the physical network card of n.
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 true CN106375131A (en) | 2017-02-01 |
CN106375131B 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) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109347656A (en) * | 2018-09-11 | 2019-02-15 | 郑州云海信息技术有限公司 | A kind of method and system of fictitious host computer uplink network card configuration |
CN110557340A (en) * | 2018-06-04 | 2019-12-10 | 中兴通讯股份有限公司 | Load balancing method, system and input device |
CN110611622A (en) * | 2018-06-15 | 2019-12-24 | 伊姆西Ip控股有限责任公司 | Method for load balancing, network interface card and computer program product |
CN113765816A (en) * | 2021-08-02 | 2021-12-07 | 阿里巴巴新加坡控股有限公司 | Flow control method, system, equipment and medium based on service grid |
Citations (9)
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 |
CN101610283A (en) * | 2009-07-17 | 2009-12-23 | 浪潮电子信息产业股份有限公司 | A kind of method of dynamically balancing received load under network card binding state |
US20120230194A1 (en) * | 2011-03-11 | 2012-09-13 | Broadcom Corporation | Hash-Based Load Balancing in Large Multi-Hop Networks with Randomized Seed Selection |
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 |
-
2016
- 2016-10-20 CN CN201610913667.XA patent/CN106375131B/en active Active
Patent Citations (9)
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 |
CN101610283A (en) * | 2009-07-17 | 2009-12-23 | 浪潮电子信息产业股份有限公司 | A kind of method of dynamically balancing received load under network card binding state |
US20120230194A1 (en) * | 2011-03-11 | 2012-09-13 | Broadcom Corporation | Hash-Based Load Balancing in Large Multi-Hop Networks with Randomized Seed Selection |
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)
Title |
---|
彭海云; 李亚: ""基于Linux的多网卡负载均衡技术"", 《实验室研究与探索》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110557340A (en) * | 2018-06-04 | 2019-12-10 | 中兴通讯股份有限公司 | Load balancing method, system and input device |
CN110557340B (en) * | 2018-06-04 | 2023-04-07 | 中兴通讯股份有限公司 | Load balancing method, system and input device |
CN110611622A (en) * | 2018-06-15 | 2019-12-24 | 伊姆西Ip控股有限责任公司 | Method for load balancing, network interface card and computer program product |
CN109347656A (en) * | 2018-09-11 | 2019-02-15 | 郑州云海信息技术有限公司 | A kind of method and system of fictitious host computer uplink network card configuration |
CN109347656B (en) * | 2018-09-11 | 2022-02-18 | 郑州云海信息技术有限公司 | Method and system for configuring virtual host uplink network card |
CN113765816A (en) * | 2021-08-02 | 2021-12-07 | 阿里巴巴新加坡控股有限公司 | Flow control method, system, equipment and medium based on service grid |
CN113765816B (en) * | 2021-08-02 | 2023-12-15 | 阿里巴巴新加坡控股有限公司 | Flow control method, system, equipment and medium based on service grid |
Also Published As
Publication number | Publication date |
---|---|
CN106375131B (en) | 2019-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106375131A (en) | Uplink load balancing method of virtual network | |
US9231869B2 (en) | Ensuring predictable and quantifiable networking performance | |
CN104184813B (en) | The load-balancing method and relevant device and group system of virtual machine | |
CN104902001B (en) | Web request load-balancing method based on operating system virtualization | |
CN107689925A (en) | Load balance optimization method and device based on cloud monitoring | |
EP3356935A1 (en) | Direct network traffic monitoring within vm platforms in virtual processing environments | |
CN103856337B (en) | Resources occupation rate acquisition methods, offer method, system and server | |
CN103713956A (en) | Method for intelligent weighing load balance in cloud computing virtualized management environment | |
US9161064B2 (en) | Auto-scaling management of web content | |
US9762495B1 (en) | Weighted distribution across paths of degraded quality | |
CN113411262B (en) | Method and device for setting large-scale receiving and unloading functions | |
CN102594671B (en) | A kind of method and apparatus that speed limit is carried out to user | |
CN110022269A (en) | Processing method of communication data, device and equipment | |
US11689470B2 (en) | Allocation of processors for processing packets | |
CN102932271A (en) | Method and device for realizing load balancing | |
CN107094119A (en) | A kind of control method for equalizing load and system based on cloud computing and SDN | |
CN109587072A (en) | Distributed system overall situation speed limiting system and method | |
CN105210324B (en) | Strategy and charging rule functions virtual method, apparatus and system | |
CN107832149A (en) | A kind of Receive side Scaling circuits for polycaryon processor Dynamic Packet management | |
CN105045667A (en) | Resource pool management method for vCPU scheduling of virtual machines | |
CN106791679A (en) | A kind of determination method and device of video transmission path | |
CN111694654A (en) | Software assisted hashing to improve distribution of load balancers | |
CN107968748A (en) | The method and device that a kind of multichannel run-off is sent | |
CN105992280A (en) | Method and device for data processing | |
CN103747488B (en) | carrier balancing method, device and system |
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 |