CN103944831A - Load balancing method and system - Google Patents

Load balancing method and system Download PDF

Info

Publication number
CN103944831A
CN103944831A CN201410174772.7A CN201410174772A CN103944831A CN 103944831 A CN103944831 A CN 103944831A CN 201410174772 A CN201410174772 A CN 201410174772A CN 103944831 A CN103944831 A CN 103944831A
Authority
CN
China
Prior art keywords
packet
load
load equalizer
place
address
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
Application number
CN201410174772.7A
Other languages
Chinese (zh)
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.)
Institute of Acoustics CAS
Original Assignee
Institute of Acoustics CAS
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 Institute of Acoustics CAS filed Critical Institute of Acoustics CAS
Priority to CN201410174772.7A priority Critical patent/CN103944831A/en
Publication of CN103944831A publication Critical patent/CN103944831A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a load balancing method and a system. The load balancing method comprises the steps: a router selects a first load balancer from a first load balancer group; the first load balancer receives a first data packet sent by the router and performs packaging treatment to obtain a second data packet; a load balancing manager distributes a virtual network address for a second load balancer in a second load balancer group, inquiries a first IP address and first port information of the second load balancer and sends the first IP address and first port information to the first load balancer; the first load balancer sends the second data packet to the second load balancer according to the first IP address and first port information; the second load balancer processes the second data packet to obtain a third data packet. The system comprises the router, the load balancing manager, the first load balancer and the second load balancer. The bandwidth bottleneck problem of the load balancer groups under a large-scale scene can be solved.

Description

Load-balancing method and system
Technical field
The present invention relates to computer realm, especially relate to a kind of load-balancing method and system.
Background technology
Along with the fast development of mobile Internet and cloud computing, the userbase of network application is increasingly huge, and the application of the corresponding how extendible carrying mass data of application server cluster and research have caused widely to be paid close attention to.
Load-balancing technique sets up load equalizer at server cluster front end, and application request is reasonably forwarded to corresponding server according to load-balancing algorithm, for application server cluster provides certain autgmentability.But in the face of nowadays huge userbase, single load equalizer cannot carry user's request.Therefore need one group of load equalizer carry out shared load balancing task, every load equalizer all with the application server cluster of certain scale in same subnet.Accordingly, this group load equalizer front end also needs to carry out load balancing.
If single at this group load equalizer front end hypothesis load equalizer, the link bandwidth of this load equalizer, and disposal ability will become bottleneck, cannot provide autgmentability for application server cluster.Therefore, how finding a kind of server clustering load balancing method that autgmentability can be provided under large-scale application request scene, is a current study hotspot.
Summary of the invention
The object of the invention is under large-scale consumer application scenarios, how the problem of load balancing is provided for application servers group.
For achieving the above object, the invention provides a kind of load-balancing method, it is characterized in that, described method comprises:
Router is selected the first load equalizer according to routine weight value vector from the first load equalizer group;
Described the first load equalizer receives the first packet that described router sends, and described the first packet is carried out to encapsulation process, obtains the second packet;
Load balancing manager distributes virtual network address to the second load equalizer in the second load equalizer group;
Described load balancing manager is inquired about an IP address and place first port information of described the second load equalizer, and sends to described the first load equalizer;
Described the first load equalizer is given described the second load equalizer according to a described IP address and place the first port information by described the second Packet Generation;
Described the second load equalizer is processed described the second packet, obtains the 3rd packet.
Further, described the second load equalizer is processed described the second packet specifically and is comprised: described the second load equalizer carries out network address translation by described the second packet; Or,
Described the second load equalizer compiles an IP address of described the second packet and place the first port information according to load-balancing algorithm, thereby obtains the 2nd IP address and place second port information of described application server.
Further, described the second load equalizer is given described application server according to the 2nd IP address of described application server and place the second port information by described the 3rd Packet Generation.
Described method comprises:
Application server obtains an IP address and place the first port information that the second load equalizer is corresponding;
Described application server sends the 3rd packet by a described IP address and place the first port information to described the second load equalizer;
Described the second load equalizer is local virtual network address and place the second port information distributing according to load balancing manager, described the 3rd packet is processed, thereby obtained the second packet;
Described the second load equalizer by described the second Packet Generation to router.
Further, described the second load equalizer is local virtual network address and place the second port information distributing according to load balancing manager, described the 3rd packet is processed specifically and comprised: according to described virtual network address and place the second port information, the 2nd IP address of described the 3rd packet and place the 3rd port are compiled, thereby obtain the second packet.
In addition, described system comprises: router, load balancing manager, the first load equalizer and the second load equalizer;
Described router, for selecting the first load equalizer according to routine weight value vector from the first load equalizer group;
Described load balancing manager, distributes virtual network address for the second load equalizer to the second load equalizer group; Inquire about an IP address and place first port information of described the second load equalizer, and send to described the first load equalizer;
Described the first load equalizer, the first packet sending for receiving described router, carries out encapsulation process by described the first packet, obtains the second packet; According to a described IP address and place the first port information, by described the second Packet Generation, give described the second load equalizer;
Described the second load equalizer, for described the second packet is processed, obtains the 3rd packet.
Further, described for described the second packet is processed specifically and comprised: described the second load equalizer carries out network address translation by described the second packet; Or,
Described the second load equalizer compiles an IP address of described the second packet and place the first port information according to load-balancing algorithm, thereby obtains the 2nd IP address and place second port information of described application server.
Further, described the second load equalizer is given described application server according to the 2nd IP address of described application server and place the second port information by described the 3rd Packet Generation.
Described system comprises: application server, the second load equalizer;
Described application server, for obtaining an IP address and place the first port information that the second load equalizer is corresponding; By a described IP address and place the first port information, to described the second load equalizer, send the 3rd packet;
Described the second load equalizer, for being local virtual network address and place the second port information distributing according to load balancing manager, processes described the 3rd packet, thereby obtains the second packet; And by described the second Packet Generation to router.
Further, described for according to load balancing manager being local virtual network address and place the second port information distributing, described the 3rd packet is processed specifically and comprised: according to described virtual network address and place the second port information, the 2nd IP address of described the 3rd packet and place the 3rd port are compiled, thereby obtain the second packet.
Beneficial effect of the present invention:
(1) the present invention is divided into three layers by SiteServer LBS, by corresponding router or load equalizer, realize corresponding function for every layer, utilize multipath routing protocols and distributed computing technology, make three-layer network appliance shared load balancing task, solved the bandwidth bottleneck problem of the load equalizer group under large scale scene.
(2) in the time of the 3rd layer, load equalizer directly sends data message and replys response message to user to router, thereby has reduced the forward process of packet and reduced the operating lag that user asks.
Accompanying drawing explanation
The load-balancing method flow chart that Fig. 1 provides for the embodiment of the present invention;
Another load-balancing method flow chart that Fig. 2 provides for the embodiment of the present invention;
The SiteServer LBS schematic diagram that Fig. 3 provides for the embodiment of the present invention;
Another SiteServer LBS schematic diagram that Fig. 4 provides for the embodiment of the present invention;
The SiteServer LBS application scenarios schematic diagram that Fig. 5 provides for the embodiment of the present invention.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
The load-balancing method flow chart that Fig. 1 provides for the embodiment of the present invention.As shown in Figure 1, the method comprises the following steps:
Step 101, router is selected the first load equalizer according to routine weight value vector from the first load equalizer group;
Step 102, the first packet that the first load equalizer receiving router sends, carries out encapsulation process by the first packet, obtains the second packet;
Step 103, load balancing manager distributes virtual network address to the second load equalizer in the second load equalizer group;
Step 104, load balancing manager is inquired about an IP address and place first port information of the second load equalizer, and sends to the first load equalizer;
Step 105, the first load equalizer is given the second load equalizer according to an IP address and place the first port information by the second Packet Generation;
Step 106, the second load equalizer is processed the second packet, obtains the 3rd packet.
Further, the second load equalizer is processed the second packet specifically and is comprised: the second load equalizer carries out network address translation by the second packet; Or,
The second load equalizer compiles an IP address of the second packet and place the first port information according to load-balancing algorithm, thus the 2nd IP address of the server that is applied and place the second port information.
Further, the second load equalizer according to the 2nd IP address of application server and place the second port information by the 3rd Packet Generation to application server.
Another load-balancing method flow chart that Fig. 2 provides for the embodiment of the present invention.As shown in Figure 2, the method comprises the following steps:
Step 201, application server obtains an IP address and place the first port information that the second load equalizer is corresponding;
Step 202, application server sends the 3rd packet by an IP address and place the first port information to the second load equalizer;
Step 203, the second load equalizer is local virtual network address and place the second port information distributing according to load balancing manager, the 3rd packet is processed, thereby obtained the second packet;
Step 204, the second load equalizer by the second Packet Generation to router.
Further, the second load equalizer is local virtual network address and place the second port information distributing according to load balancing manager, the 3rd packet is processed specifically and comprised: according to virtual network address and place the second port information, the 2nd IP address of the 3rd packet and place the 3rd port are compiled, thereby obtain the second packet.
The SiteServer LBS schematic diagram that Fig. 3 provides for the embodiment of the present invention.As shown in Figure 3, this system comprises: router three 1, the first load equalizer 32, the second load equalizer 33, application server 34 and load balancing manager 35.
Router three 1, for selecting the first load equalizer according to routine weight value vector from the first load equalizer group;
Load balancing manager 35, distributes virtual network address for the second load equalizer 33 to the second load equalizer group; Inquire about an IP address and place first port information of the second load equalizer 33, and send to the first load equalizer 32;
The first load equalizer 32, the first packet sending for receiving router 31, carries out encapsulation process by the first packet, obtains the second packet; According to an IP address and place the first port information, by the second Packet Generation, give the second load equalizer 33;
The second load equalizer 33, for the second packet is processed, obtains the 3rd packet.
Further, for the second packet is processed specifically and is comprised: the second load equalizer 33 carries out network address translation by the second packet; Or,
The second load equalizer 33 compiles an IP address of the second packet and place the first port information according to load-balancing algorithm, thus the 2nd IP address of the server 34 that is applied and place the second port information.
Further, the second load equalizer 33 according to the 2nd IP address of application server 34 and place the second port information by the 3rd Packet Generation to application server 34.
Another SiteServer LBS schematic diagram that Fig. 4 provides for the embodiment of the present invention.As shown in Figure 4, this system comprises: router four 1, the second load equalizer 42, application server 43 and load balancing manager 44.
Application server 43, for obtaining an IP address and place first port information of the second load equalizer 42 correspondences; By a described IP address and place the first port information, to described the second load equalizer 42, send the 3rd packet;
The second load equalizer 42, for being local virtual network address and place the second port information distributing according to load balancing manager 44, processes the 3rd packet, thereby obtains the second packet; And by the second Packet Generation to router four 1.
Further, for according to load balancing manager 44 being local virtual network address and place the second port information distributing, the 3rd packet is processed specifically and comprised: according to described virtual network address and place the second port information, the 2nd IP address of the 3rd packet and place the 3rd port are compiled, thereby obtain the second packet.
The SiteServer LBS application scenarios schematic diagram that Fig. 5 provides for the embodiment of the present invention.As shown in Figure 5, SiteServer LBS can be divided into three layers by function, and ground floor is comprised of router; The second layer is comprised of the first load equalizer, and the first load equalizer forms the first load equalizer group; The 3rd layer is comprised of the second load equalizer, and the second load equalizer forms the second load equalizer group.
The router being connected with external network is based on multipath routing protocols, and the load distribution of network layer is provided, and by routine weight value vector, from the first load equalizer group, selects the first load equalizer, and gives the first load equalizer by the first Packet Generation.The first all load equalizers all configure identical routing iinformation, keep the mapping relations one by one of virtual IP address and the second load equalizer.The first load equalizer encapsulates the second packet, thereby obtains the second packet.
Load balancing manager distributes virtual IP address to the second load equalizer, and assignment information is replied to all the first load equalizers in the first load balancing group, meanwhile, to the second load equalizer, replys response message.The first load equalizer, according to the mapping of virtual IP address and the second load equalizer, obtains an IP and first port of the second load equalizer, and gives the second load equalizer by the second Packet Generation.
The second load equalizer carries out network address translation by the second packet; Or, an IP and first port of the second packet are compiled according to load-balancing algorithm, thus the 2nd IP and second port of the server that is applied.The second load equalizer according to the 2nd IP of application server and the second port by the 3rd Packet Generation to application server.
Above-described embodiment; object of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only the specific embodiment of the present invention; the protection range being not intended to limit the present invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a load-balancing method, is characterized in that, described method comprises:
Router is selected the first load equalizer according to routine weight value vector from the first load equalizer group;
Described the first load equalizer receives the first packet that described router sends, and described the first packet is carried out to encapsulation process, obtains the second packet;
Load balancing manager distributes virtual network address to the second load equalizer in the second load equalizer group;
Described load balancing manager is inquired about an IP address and place first port information of described the second load equalizer, and sends to described the first load equalizer;
Described the first load equalizer is given described the second load equalizer according to a described IP address and place the first port information by described the second Packet Generation;
Described the second load equalizer is processed described the second packet, obtains the 3rd packet.
2. load-balancing method according to claim 1, is characterized in that, described the second load equalizer is processed described the second packet specifically and comprised: described the second load equalizer carries out network address translation by described the second packet; Or,
Described the second load equalizer compiles an IP address of described the second packet and place the first port information according to load-balancing algorithm, thereby obtains the 2nd IP address and place second port information of described application server.
3. load-balancing method according to claim 2, is characterized in that, described the second load equalizer is given described application server according to the 2nd IP address of described application server and place the second port information by described the 3rd Packet Generation.
4. a load-balancing method, is characterized in that, described method comprises:
Application server obtains an IP address and place the first port information that the second load equalizer is corresponding;
Described application server sends the 3rd packet by a described IP address and place the first port information to described the second load equalizer;
Described the second load equalizer is local virtual network address and place the second port information distributing according to load balancing manager, described the 3rd packet is processed, thereby obtained the second packet;
Described the second load equalizer by described the second Packet Generation to router.
5. load-balancing method according to claim 4, it is characterized in that, described the second load equalizer is local virtual network address and place the second port information distributing according to load balancing manager, described the 3rd packet is processed specifically and comprised: according to described virtual network address and place the second port information, the 2nd IP address of described the 3rd packet and place the 3rd port are compiled, thereby obtain the second packet.
6. a SiteServer LBS, is characterized in that, described system comprises: router, load balancing manager, the first load equalizer and the second load equalizer;
Described router, for selecting the first load equalizer according to routine weight value vector from the first load equalizer group;
Described load balancing manager, distributes virtual network address for the second load equalizer to the second load equalizer group; Inquire about an IP address and place first port information of described the second load equalizer, and send to described the first load equalizer;
Described the first load equalizer, the first packet sending for receiving described router, carries out encapsulation process by described the first packet, obtains the second packet; According to a described IP address and place the first port information, by described the second Packet Generation, give described the second load equalizer;
Described the second load equalizer, for described the second packet is processed, obtains the 3rd packet.
7. SiteServer LBS according to claim 6, is characterized in that, described for described the second packet is processed specifically and comprised: described the second load equalizer carries out network address translation by described the second packet; Or,
Described the second load equalizer compiles an IP address of described the second packet and place the first port information according to load-balancing algorithm, thereby obtains the 2nd IP address and place second port information of described application server.
8. SiteServer LBS according to claim 7, is characterized in that, described the second load equalizer is given described application server according to the 2nd IP address of described application server and place the second port information by described the 3rd Packet Generation.
9. a SiteServer LBS, is characterized in that, described system comprises: application server, the second load equalizer;
Described application server, for obtaining an IP address and place the first port information that the second load equalizer is corresponding; By a described IP address and place the first port information, to described the second load equalizer, send the 3rd packet;
Described the second load equalizer, for being local virtual network address and place the second port information distributing according to load balancing manager, processes described the 3rd packet, thereby obtains the second packet; And by described the second Packet Generation to router.
10. SiteServer LBS according to claim 9, it is characterized in that, described for according to load balancing manager being local virtual network address and place the second port information distributing, described the 3rd packet is processed specifically and comprised: according to described virtual network address and place the second port information, the 2nd IP address of described the 3rd packet and place the 3rd port are compiled, thereby obtain the second packet.
CN201410174772.7A 2014-04-29 2014-04-29 Load balancing method and system Pending CN103944831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410174772.7A CN103944831A (en) 2014-04-29 2014-04-29 Load balancing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410174772.7A CN103944831A (en) 2014-04-29 2014-04-29 Load balancing method and system

Publications (1)

Publication Number Publication Date
CN103944831A true CN103944831A (en) 2014-07-23

Family

ID=51192320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410174772.7A Pending CN103944831A (en) 2014-04-29 2014-04-29 Load balancing method and system

Country Status (1)

Country Link
CN (1) CN103944831A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515979A (en) * 2015-12-29 2016-04-20 新浪网技术(中国)有限公司 Open shortest path first (OSPF) over-network balanced forwarding method and OSPF over-network balanced forwarding system
CN106131204A (en) * 2016-07-22 2016-11-16 无锡华云数据技术服务有限公司 It is applied to message rapid distribution method and the system thereof of SiteServer LBS
CN110691139A (en) * 2019-10-11 2020-01-14 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694720A (en) * 2011-03-24 2012-09-26 日电(中国)有限公司 Addressing method, addressing device, infrastructure manager, switchboard and data routing method
CN103023797A (en) * 2011-09-23 2013-04-03 百度在线网络技术(北京)有限公司 Data center system and device and method for providing service
CN103095600A (en) * 2013-02-07 2013-05-08 杭州华三通信技术有限公司 Loading balancing method based on Trill network and routing device
CN103227838A (en) * 2013-05-10 2013-07-31 中国工商银行股份有限公司 Multi-load equalization processing device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694720A (en) * 2011-03-24 2012-09-26 日电(中国)有限公司 Addressing method, addressing device, infrastructure manager, switchboard and data routing method
CN103023797A (en) * 2011-09-23 2013-04-03 百度在线网络技术(北京)有限公司 Data center system and device and method for providing service
CN103095600A (en) * 2013-02-07 2013-05-08 杭州华三通信技术有限公司 Loading balancing method based on Trill network and routing device
CN103227838A (en) * 2013-05-10 2013-07-31 中国工商银行股份有限公司 Multi-load equalization processing device and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105515979A (en) * 2015-12-29 2016-04-20 新浪网技术(中国)有限公司 Open shortest path first (OSPF) over-network balanced forwarding method and OSPF over-network balanced forwarding system
CN105515979B (en) * 2015-12-29 2019-05-21 新浪网技术(中国)有限公司 Ospf OSPF inter-network equilibrium retransmission method and system
CN106131204A (en) * 2016-07-22 2016-11-16 无锡华云数据技术服务有限公司 It is applied to message rapid distribution method and the system thereof of SiteServer LBS
CN110691139A (en) * 2019-10-11 2020-01-14 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium
CN110691139B (en) * 2019-10-11 2022-07-15 北京字节跳动网络技术有限公司 Data transmission method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
KR102138619B1 (en) Message clustering method and load balancer based on server cluster
EP3355553B1 (en) Reliable load-balancer using segment routing and real-time application monitoring
CN103581299B (en) Service scheduling method, apparatus and system
US20190007322A1 (en) Virtual network device and related method
CN104780088A (en) Service message transmission method and equipment
CN103117947B (en) A kind of load sharing method and device
CN105519080A (en) Method and apparatus for exchanging IP packets among network layer 2 peers
CN104980361A (en) Load balancing method, device, and system
CN104301417B (en) A kind of load-balancing method and device
CN109525684B (en) Message forwarding method and device
US10693785B2 (en) Method and system for forwarding data, virtual load balancer, and readable storage medium
CN105227454A (en) Virtual flow-line system and method
WO2016095201A1 (en) Service link deployment method and device
CN104301414A (en) Server load balancing method based on network protocol stack
CN104811382A (en) Data packet processing method and device
CN103929368A (en) Load balance method and device for multiple service units
CN104980368A (en) Bandwidth guarantee method and apparatus in software defined network (SDN)
CN104780232B (en) A kind of resource allocation methods, controller and system
CN105099950A (en) Resource allocation method, message communication method and devices
CN102333027A (en) Traffic load sharing realization method based on virtual router redundancy protocol extend (VRRPE) backup group and realization apparatus thereof
CN104618243A (en) Routing method, device and system, and gateway scheduling method and device
JP2017517220A (en) OpenFlow communication method and system, control unit, and service gateway
CN104954155B (en) The network equipment with multiple business boards and multi-service plate sharing method
CN105743781B (en) A kind of VRRP load-balancing method and device
CN104301229A (en) Data packet forwarding method and device and routing table generating method and device.

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140723

RJ01 Rejection of invention patent application after publication