CN106789287A - Front end load balanced device, back-end server and register method - Google Patents

Front end load balanced device, back-end server and register method Download PDF

Info

Publication number
CN106789287A
CN106789287A CN201611239682.7A CN201611239682A CN106789287A CN 106789287 A CN106789287 A CN 106789287A CN 201611239682 A CN201611239682 A CN 201611239682A CN 106789287 A CN106789287 A CN 106789287A
Authority
CN
China
Prior art keywords
multicast
balanced device
load balanced
server
end load
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
Application number
CN201611239682.7A
Other languages
Chinese (zh)
Other versions
CN106789287B (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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611239682.7A priority Critical patent/CN106789287B/en
Publication of CN106789287A publication Critical patent/CN106789287A/en
Application granted granted Critical
Publication of CN106789287B publication Critical patent/CN106789287B/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
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the present invention discloses a kind of front end load balanced device, back-end server and register method, and the register method is comprised the following steps:Front end load balanced device sends IGMP general query messages to the back-end server multicast in multicast group, and the multicast address field of the message carries the unicast address of front end load balanced device;Front end load balanced device all back-end servers in default port snoop multicast group respond the message respectively with the declaration message of unicast transmission, the source address field of wherein declaration message includes the unicast address of the back-end server for sending declaration message, and default port is the nonsystematic port of preassigned front end load balanced device;Front end load balanced device parsing declaration Receive message unicast address;When unicast address is not recorded in available server list, front end load balanced device records in available server list unicast address, so as to complete registration.By such scheme, without manual configuration front end load balanced device, administrative convenience can be effectively improved.

Description

Front end load balanced device, back-end server and register method
Technical field
The present invention relates to IT technical fields, more particularly to a kind of front end load balanced device, back-end server and register method.
Background technology
Under cloud computing scene, existing load balancing back-end services find that mode is matched somebody with somebody manually typically by static Put, by taking HAProxy as an example, HAProxy be famous software TCP (four layers)/HTTP (seven layers) load equalizers increased income and Agent software, may operate in the systems such as Linux, Solaris and FreeBSD.HAProxy the most frequently used purposes be by Distribute load between multiple servers (such as web server, application, database) to improve a performance for server system And reliability.At present, HAProxy is used by many major companies, including GitHub, Imgur, Instagram, and Twitter etc..It is one to be needed in front end load balancing equipment manual configuration backend, backend when using HAProxy Group receives the IP address of the back-end server of the request of forwarding, by the good backend of network manager's manual configuration come after the completion of The registration process of server forward end load equalizer is held, after the registration is finished, load-balancing device is according to rule request point It is dealt into back-end server.
Therefore in existing technology, to needed for one back-end server member of increase in a load balancing cluster or registration The operation done is typically:The explicitly information of manual configuration back-end server on front end load balancing equipment, so as to will be new Back-end server is added to the available server list of oneself and is managed.
Because the addition or registration of the back-end server of prior art are not intelligent enough, when needing to increase a back-end services newly During device, mode that can only be manually explicitly configures newly-increased back-end services in the configuration file on front end load balanced device The address of device completes registration, and this mode is especially cumbersome in current cloud computing environment, and due to the development of Intel Virtualization Technology, Back-end server can be deployed in virtual machine or container so that back-end server scale is often very big, up to a hundred to thousands of It is likely to.And the dynamic change of business also requires that load balancing cluster dynamic capacity-expanding, the registration of new back-end server will It is regular operation, if the configuration file also continually manually on change front end load balanced device registers rear end Server, manages very inconvenient.
The content of the invention
The embodiment of the present invention provides a kind of front end load balanced device, back-end server and register method, and front end load is balanced Device can be registered to back-end server automatically, so as to improve the convenience of management.
In a first aspect, the application provides a kind of register method, the method is applied to front end load balanced device, and front end load is equal Weighing apparatus and at least one back-end server are arranged in a multicast group, front end load balanced device and rear end in same multicast group Server is provided with identical multicast address, and front end load balanced device is provided with available server list, available server row Table is used to record the unicast address of the back-end server for succeeding in registration, when the unicast address of back-end server is recorded in front end load During the available server list of balanced device, represent that back-end server just completes registration on front end load balanced device, the registration Method is specifically included:
Front end load balanced device sends IGMP general query messages to the back-end server multicast in multicast group, its The multicast address field of middle IGMP general query messages carries the unicast address of front end load balanced device;
Front end load balanced device all back-end server response IGMP general in default port snoop multicast group The declaration message that the difference unicast of query messages sends, wherein the destination address field (DAF) of declaration message includes front end load balanced device Unicast address, destination interface includes default port, and source address field includes the unicast of the back-end server for sending declaration message Address, default port is the nonsystematic port of preassigned front end load balanced device, due to declaring the destination address word of message Section and destination interface point to front end load balanced device, therefore front end load balanced device can receive institute in multicast group in predetermined port There is the declaration message that back-end server sends;
The parsing of front end load balanced device declares message to obtain the unicast address of the back-end server of source address field carrying;
It is preceding when the unicast address of the back-end server carried in source address field is not recorded in available server list The unicast address of the back-end server that end load equalizer carries source address field is recorded in available server list, so that complete Into registration.
By implementing above-described embodiment, front end load balanced device can be from declaration Receive message to the unicast address of back-end services And it is added into available server list, so that registration is completed, thus it is whole without be matched somebody with somebody manually on front end load balanced device Put, administrative convenience can be effectively improved.
In a kind of possible implementation of first aspect, each unicast address recorded in available server list is equal One heartbeat timer of correspondence, the unicast address record of the back-end server for carrying source address field in front end load balanced device exists After the step of available server list, the method also includes:
Front end load balanced device is that the unicast address of the back-end server that source address field is carried sets heartbeat timer simultaneously Start timing.
In a kind of possible implementation of first aspect, the method also includes:
The unicast address of the back-end server that front end load balanced device is carried in source address field is recorded in available server When in list, the corresponding heartbeat timer reclocking of unicast address of the back-end server that control source address field is carried.
In a kind of possible implementation of first aspect, the method also includes:
The timing of the corresponding heartbeat timer of unicast address that front end load balanced device is recorded in available server list When value is beyond predetermined amount of time, control heartbeat timer reclocking, and add up the expired times of heartbeat timer, at overtime time When number is beyond pre-determined number, unicast address corresponding with heartbeat timer is removed from available server list.
By implementing above-described embodiment, the register method that the embodiment of the present invention is disclosed can be chartered with regular monitoring The real-time status of back-end server, the back-end server that multicast group is will move out automatically is unregistered, therefore in back-end server When quantity will carry out dynamic dilatation or capacity reducing, without manual configuration front end load balanced device, therefore management can be further lifted Convenience.
In a kind of possible implementation of first aspect, front end load balanced device sends IGMP to multicast in multicast group The step of general query messages, specifically includes:
Back-end server multicast of the front end load balanced device in multicast group sends IGMP general query messages When start timing;
The rear end of IGMP general query messages is initially received in front end load equalizer input to multicast group Server responds IGMP general query messages and is reported to the IGMP membership response that multicast group multicast sends Wen Shi, front end load balanced device confirms multicast group effectively according to IGMP membership response messages, and in clocking value More than continue after predetermined period in multicast group back-end server multicast send IGMP general query messages;
When front end load balanced device is not received by IGMP membership response messages, front end load is balanced Device confirms multicast group failure, stops continuing to be sent to the back-end server multicast in multicast group after clocking value exceedes predetermined period IGMP general query messages.
By implementing above-described embodiment, it is ensured that when multicast group is effective, front end load balanced device can be obtained also in multicast The declaration message that back-end server in group sends, the healthy shape of the back-end server in multicast group is known according to declaration message State, and when multicast group fails, abandon safeguarding the multicast group.
In a kind of possible implementation of first aspect, declaration message is UDP messages.
Second aspect, the application provides a kind of register method, and the method is applied to back-end server, back-end server with it is preceding End load equalizer is arranged in same multicast group, and the front end load balanced device and back-end server in same multicast group are all provided with Identical multicast address is equipped with, the method includes:
Back-end server receiving front-end load equalizer is reported to the IGMP general query that multicast in multicast group sends The multicast address field of text, wherein IGMP general query messages carries the unicast address of front end load balanced device;
Back-end server response IGMP general query message forward end load equalizers unicast sends declaration message, The destination address field (DAF) of wherein declaration message includes the unicast address of front end load balanced device, and destination interface includes default port, Source address field includes the unicast address of back-end server, and default port is the nonsystematic end of the front end load balanced device specified Mouthful.
By implementing above-described embodiment, the register method that the embodiment of the present invention is disclosed can be chartered with regular monitoring The real-time status of back-end server, the back-end server that multicast group is will move out automatically is unregistered, therefore in back-end server When quantity will carry out dynamic dilatation or capacity reducing, without manual configuration front end load balanced device, therefore management can be further lifted Convenience.
In a kind of possible implementation of second aspect, in back-end server receiving front-end load equalizer periodically After in multicast group the step of the IGMP general query messages of multicast transmission, the method also includes:
Back-end server responds IGMP general query messages and sends IGMP membership to multicast in multicast group Response messages, and if multicast receives group before sending IGMP membership response messages in multicast group The IGMP membership response messages that another back-end server sends to multicast group multicast in group are broadcast, is then cancelled to group Broadcast multicast in group and send IGMP membership response messages.
In a kind of possible implementation of second aspect, declaration message is UDP messages.
The third aspect, the application provides a kind of front end load balanced device, and front end load balanced device and at least one rear end take Business device is arranged in a multicast group, and the front end load balanced device and back-end server in same multicast group are provided with identical Multicast address, front end load balanced device is provided with available server list, and available server list is used to record what is succeeded in registration The unicast address of back-end server, front end load balanced device includes:
Multicast address setup module, for setting and the back-end server identical multicast address in multicast group;
Multicast inquiry sending module, for sending IGMP general query to the back-end server multicast in multicast group The multicast address field of message, wherein IGMP general query messages carries the unicast address of front end load balanced device;
Unicast reception module, IGMP is sent for all back-end server responses in default port snoop multicast group The declaration message that the difference unicast of general query messages sends, wherein the destination address field (DAF) of declaration message is negative including front end The unicast address of balanced device is carried, destination interface includes default port, and source address field includes sending the back-end services of declaration message The unicast address of device, default port is the nonsystematic port of the front end load balanced device specified;
Packet parsing module, for the unicast ground for parsing declaration message to obtain the back-end server of source address field carrying Location;
Registering modules, the unicast address of the back-end server carried in source address field is not recorded in available server row When in table, the unicast address of the back-end server that source address field is carried is recorded in available server list.
By implementing above-described embodiment, the register method that the embodiment of the present invention is disclosed can be chartered with regular monitoring The real-time status of back-end server, the back-end server that multicast group is will move out automatically is unregistered, therefore in back-end server When quantity will carry out dynamic dilatation or capacity reducing, without manual configuration front end load balanced device, therefore management can be further lifted Convenience.
In a kind of possible implementation of the third aspect, front end load balanced device also includes heartbeat timer and timing Device setup module, timer setup module, for being corresponded to for each described unicast address recorded in available server list One heartbeat timer is set, and for the unicast address of the back-end server of source address field carrying sets heartbeat timer and controls Heartbeat timer starts timing.
In a kind of possible implementation of the third aspect, Registering modules are additionally operable to:
When the unicast address record of the back-end server of source address field carrying is determined in available server list, The corresponding heartbeat timer reclocking of unicast address of the back-end server that control source address field is carried.
In a kind of possible implementation of the third aspect, timer setup module is additionally operable to:
The clocking value of the corresponding heartbeat timer of unicast address recorded in available server list exceeds the scheduled time The expired times of Duan Shi, control heartbeat timer reclocking, and accumulative heartbeat timer, pre-determined number is exceeded in expired times When, unicast address corresponding with heartbeat timer is removed from available server list.
By implementing above-described embodiment, the register method that the embodiment of the present invention is disclosed can be chartered with regular monitoring The real-time status of back-end server, the back-end server that multicast group is will move out automatically is unregistered, therefore in back-end server When quantity will carry out dynamic dilatation or capacity reducing, without manual configuration front end load balanced device, therefore management can be further lifted Convenience.
In a kind of possible implementation of the third aspect, front end load balanced device also includes that multicast response receives mould Block,
Multicast inquiry sending module, is additionally operable to be opened when multicast sends IGMP general query messages in multicast group Beginning timing;
Multicast response receiver module, for receiving and be initially received in multicast group IGMP general query messages after The IGMP membership response that end server response IGMP general query messages send to multicast group multicast Message;
Wherein, received in multicast response receiver module and be initially received in multicast group IGMP general query messages The IGMP membership that are sent to multicast group multicast of back-end server response IGMP general query messages During response messages, multicast inquiry sending module confirms that multicast group has according to IGMP membership response messages Effect, and continue to send IGMP general to the back-end server multicast in multicast group after clocking value exceedes predetermined period Query messages;When multicast response receiver module is not received by IGMP membership response messages, multicast inquiry Sending module confirms multicast group failure, stops continuing to the back-end server group in multicast group after clocking value exceedes predetermined period Broadcast and send IGMP general query messages.
By implementing above-described embodiment, the register method that the embodiment of the present invention is disclosed can be chartered with regular monitoring The real-time status of back-end server, the back-end server that multicast group is will move out automatically is unregistered, therefore in back-end server When quantity will carry out dynamic dilatation or capacity reducing, without manual configuration front end load balanced device, therefore management can be further lifted Convenience.
In a kind of possible implementation of the third aspect, declaration message is UDP messages.
Fourth aspect, the application provides a kind of back-end server, including:
Multicast address setup module, multicast address setup module is used to set and front end load balanced device identical multicast ground Location;
Multicast inquiry receiver module, for the IGMP that receiving front-end load equalizer sends to multicast in multicast group periodically The multicast address field of general query messages, wherein IGMP general query messages carries front end load balanced device Unicast address;
Unicast sending module, a surname is sent for responding the unicast of IGMP general query message forward end load equalizers Message is accused, wherein the destination address field (DAF) of declaration message includes the unicast address of front end load balanced device, destination interface includes pre- If port, source address field includes the unicast address of back-end server, and default port is the non-system that multicast group unanimously sets in advance System port.
In a kind of possible implementation of fourth aspect, declaration message is UDP messages.
In a kind of possible implementation of fourth aspect, back-end server also includes multicast response sending module,
Multicast response sending module, IGMP is sent for responding IGMP general query messages to multicast in multicast group Membership response messages, and sending module is sent to multicast transmission IGMP in multicast group in multicast response If multicast inquiry receiver module receives in multicast group another back-end server to group before membership response messages The IGMP membership response messages that group multicast sends are broadcast, then multicast response sending module is cancelled to group in multicast group Broadcast and send IGMP membership response messages.
5th aspect, the application provides a kind of front end load balanced device, including memory, processor, network interface and total Line, memory, network interface, processor are connected with bus respectively, and front end load balanced device sets with least one back-end server It is placed in a multicast group, the front end load balanced device and back-end server in same multicast group are provided with identical multicast ground Location, memory storage has programmed instruction and available server list, and available server list is used to record the rear end succeeded in registration The unicast address of server, programmed instruction in computing device memory is performing step:
Set and the back-end server identical multicast address in multicast group;
Controlling network interface sends IGMP general query messages to the back-end server multicast in multicast group, wherein The multicast address field of IGMP general query messages carries the unicast address of front end load balanced device;
IGMP general are sent in all back-end server responses in default port snoop multicast group of controlling network interface The declaration message that the difference unicast of query messages sends, wherein the destination address field (DAF) of declaration message includes front end load balanced device Unicast address, destination interface includes default port, and source address field includes the unicast of the back-end server for sending declaration message Address, default port is the nonsystematic port of the front end load balanced device specified;
Parsing declares message to obtain the unicast address of the back-end server of source address field carrying;
When the unicast address of the back-end server carried in source address field is not recorded in available server list, will The unicast address of the back-end server that source address field is carried is recorded in available server list.
By implementing above-described embodiment, front end load balanced device can be from declaration Receive message to the unicast address of back-end services And it is added into available server list, so that registration is completed, thus it is whole without be matched somebody with somebody manually on front end load balanced device Put, administrative convenience can be effectively improved.
6th aspect, there is provided a kind of back-end server, including memory, processor, network interface and bus, memory, Network interface, processor are connected with bus respectively, and back-end server is arranged in same multicast group with front end load balanced device, Front end load balanced device and back-end server in same multicast group are provided with identical multicast address, memory storage has Programmed instruction, programmed instruction in computing device memory is performing step:
The IGMP general query that controlling network interface front end load balanced device sends to multicast in multicast group The multicast address field of message, wherein IGMP general query messages carries the unicast address of front end load balanced device;
The response IGMP general query message forward end load equalizers unicast of controlling network interface sends declaration report Text, wherein the destination address field (DAF) of declaration message includes the unicast address of front end load balanced device, destination interface includes default end Mouthful, source address field includes the unicast address of back-end server, and default port is the nonsystematic of the front end load balanced device specified Port.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for the embodiment of the present invention Accompanying drawing is briefly described, it should be apparent that, drawings described below is only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is the system architecture schematic diagram according to the embodiment of the present invention;
Fig. 2 is the data form schematic diagram of the heading of the IGMP messages of version 1 according to embodiments of the present invention;
Fig. 3 is message interaction figure according to embodiments of the present invention;
Fig. 4 is a kind of system architecture schematic diagram of route topological framework according to embodiments of the present invention;
Fig. 5 is the system architecture schematic diagram of another route topological framework according to embodiments of the present invention;
Fig. 6 is the data form schematic diagram of the IP messages for being packaged with UDP messages according to embodiments of the present invention;
Fig. 7 be it is according to embodiments of the present invention embody the unicast address registered in heartbeat timer and available service list it Between corresponding relation schematic diagram;
Fig. 8 is the apparatus structure schematic diagram of front end load balanced device according to embodiments of the present invention;
Fig. 9 is the apparatus structure schematic diagram of back-end server according to embodiments of the present invention;
Figure 10 is another apparatus structure schematic diagram of front end load balanced device according to embodiments of the present invention;
Figure 11 is another apparatus structure schematic diagram of back-end server according to embodiments of the present invention.
Specific embodiment
Referring firstly to Fig. 1, Fig. 1 is the system architecture schematic diagram according to the embodiment of the present invention, as shown in figure 1, client 111st, 112,113 respectively with the network connection of front end load balanced device 100, back-end server 101,102,103 is negative with front end respectively Carry the network connection of balanced device 100.
It is worth noting that, in embodiments of the present invention, client 111,112,113 specifically can be by wired and/or nothing Gauze network respectively with the network connection of front end load balanced device 100, back-end server 101,102,103 specifically can by it is wired and/ Or wireless network respectively with the network connection of front end load balanced device 100.
Also, the quantity of above-mentioned client and back-end server is merely illustrative, its particular number can be single or plural number It is individual, can specifically set according to actual needs.
Alternatively, at least one multicast router is provided with above-mentioned wired or wireless network, multicast router is supported Multicast functionality, for use as path computing, the multicast of message, forwarding and/or duplication.
In Fig. 1, client 111,112 or 113 produces network request and sends to front end load balanced device 100, front end The network request is forwarded to back-end server 101,102 or 103 by load equalizer 100 according to the registration scenarios of back-end server Processed.
I.e.:Back-end server 101,102 and 103 needs first to be registered on front end load balanced device 100, and front end is born Balanced device 100 is carried the request that client 111,112 or 113 is produced could to be sent to corresponding back-end server to be located Reason.
Specifically, in embodiments of the present invention, front end load balanced device 100 is provided with available server list, and this can use Server list have recorded the unicast address of the back-end server for succeeding in registration, as long as the unicast address record of back-end server exists In the available service list of front end load balanced device, front end load balanced device 100 just will be considered that back-end server in front end load Balanced device succeeds in registration, so as to the network request for sending client is sent to the back-end server for succeeding in registration.If rear end takes The unicast address of business device is not recorded in the available service list of front end load balanced device 100, and front end load balanced device 100 is not Network request to the back-end server can be sent.
Therefore, " registration " described in the embodiment of the present invention refer to:The unicast address record of back-end server is born in front end In the available service list of load balanced device.
In embodiments of the present invention, front end load balanced device 100 is by the group periodically of multicast group where back-end server Broadcast and send IGMP messages and realize registration and cancellation to back-end server, wherein IGMP messages can be existing version 1, version Sheet 2 or version 3.
Now illustrated by taking the IGMP messages of version 1 as an example, and version 2 and 3 similar with version 1, do not repeated in this.
Referring to Fig. 2, Fig. 2 is that the data form of the heading of the IGMP messages of version 1 according to embodiments of the present invention is illustrated Figure, as shown in Fig. 2 the heading of the IGMP messages of version 1 includes 8 version number fields, 8 unused fields, 16 bit checks With field, 32 multicast address (group address) fields.
In embodiments of the present invention, message front page of the front end load balanced device 100 in IGMP general query messages (0x11 represents that the type of multicast message is IGMP general query messages to this number field write-in 0x11, and it is multicast protocol Regulation), 32 unicast address of multicast address field write-in front end load balanced device 100.
Back-end server in multicast group is received after IGMP general query messages, can broadcast ground from 32 hytes Location field obtains the unicast address of front end load balanced device 100, and the unicast address of forward end load equalizer 100 sends itself Unicast address so that complete front end load balanced device complete register.
In order to further clearly illustrate, Fig. 3 is referred to, Fig. 3 is message interaction figure according to embodiments of the present invention.In Fig. 3 In multicast address and unicast address are indicated with the actual network address, it is notable that multicast address and list that Fig. 3 is marked The concrete numerical value for broadcasting address is merely illustrative, and the embodiment of the present invention can't be restricted.
As shown in figure 3, the multicast address of front end load balanced device 100 is 224.0.1.1, unicast address is 192.168.1.100;Back-end server 101 is not provided with multicast address, and unicast address is 192.168.1.101;Back-end services Device 102 is not provided with multicast address, and unicast address is 192.168.1.102;Back-end server is not provided with multicast address, unicast Address is 192.168.1.102;Back-end server 103 is not provided with multicast address, and unicast address is 192.168.1.103.
In some instances, back-end server 101-103 may also set up other multicast address different from 224.0.1.1 (therefore back-end server 101-103 and front end load balanced device 100 be not in a multicast group).
Because back-end server 101,102,103 is not provided with multicast address, front end load balanced device 100 is if desired added Place multicast group, back-end server 101,102,103 need to each set itself multicast address and be allowed to and front end load balanced device 100 Unanimously.Therefore in step 1 need on back-end server 101 manually or script mode configuration multicast address be 224.0.1.1 (consistent with front end load balanced device 100).Similarly, the multicast address of back-end server 102 is configured in step 2 224.0.1.1, itself multicast address is configured to 224.0.1.1 in the server 103 of end after step 3.
In step 4 to 6, front end load balanced device 100 sends IGMP general query messages to multicast group multicast And starting timing, it is notable that front end load balanced device 100 only need to be to one IGMP general of transmission in multicast group Query messages, the IGMP general query messages are replicated by the multicast router in network, and are respectively sent to Each back-end server in multicast group.
Under this kind of implementation, replicate and distribute because multicast router is performed, therefore 100, front end load balanced device An IGMP general query message need to be sent, it is possible to ensure that the IGMP general query messages are sent to multicast In group in all back-end servers 101,102,103, the upstream bandwidth of front end load balanced device 100 can be greatly saved.
Alternatively, front end load balanced device 100 can integrated multicast router function, replicate IGMP general query Message is respectively sent to each back-end server in multicast group.
Because the function of multicast router is integrated by front end load balanced device 100, therefore be can be applied in the implementation It is not provided with the LAN of multicast router.
In order to make it easy to understand, referring to Fig. 4 and Fig. 5, it is situated between with performing the process for replicating and distributing to multicast router Continue, wherein Fig. 4 is a kind of system architecture schematic diagram of route topological framework according to embodiments of the present invention, and Fig. 5 is according to this hair Another system architecture schematic diagram of the route topological framework of bright embodiment.
In fig. 4, front end load balanced device 100 sends an IGMP general query and reports to multicast in multicast group Text, multicast router 121 (network latency between the multicast router 121 and front end load balanced device 100 is most short) connects The IGMP general query messages are received, and copies three identical IGMP general query messages and be respectively sent to Back-end server 101,102,103 in multicast group.
And in Figure 5, front end load balanced device 100 sends an IGMP general query and reports to multicast in multicast group Text, multicast router 122 receives the IGMP general query messages, and copies two identical IGMP general Query messages are respectively sent to back-end server 101 and multicast router 123 in multicast group, and multicast router 123 replicates two Individual identical IGMP general query messages are respectively sent to back-end server 102 and back-end server in multicast group 103。
It is worth noting that, be only shown in above-mentioned Fig. 4 and Fig. 5 in the embodiment of the present invention two kinds of multicast router be capable of achieving Connected mode, and the embodiment of the present invention be not limited to it is above-mentioned shown in.
Because multicast router can replicate IGMP general query messages and send to each in multicast group Back-end server, therefore the upstream bandwidth for taking front end load balanced device 100 can be reduced.
And in certain embodiments, front end load balanced device 100 also can integrated multicast router message copy function, directly Connect and IGMP general query messages are replicated and sent to different back-end servers.
Also, in step 4-6, front end load balanced device 100 sends IGMP general query to multicast group multicast Message and start timing be in order to when multicast group is survived ensure IGMP general query messages can send periodically (in Introduce in detail below).
And continuing with referring to Fig. 3, in step 7, the preset monitored port of front end load balanced device 100, the default port is The nonsystematic port of the front end load balanced device specified, such as port 2000.
It is worth noting that, each multicast group can arrange a nonsystematic port, the He of front end load balanced device 100 Back-end server 101,102,103 in multicast group knows the nonsystematic port, and it is realized by making an appointment, different Multicast address can be corresponded to arranges different default ports, so that the compatibility between promoting network system.
In step 8, it is assumed that the back-end server 101 in multicast group is initially received IGMP general query messages (assuming that data transmission period is most short between back-end server 101 and front end load balanced device 100), is advised in itself based on IGMP agreements Fixed, back-end server 101 need to respond IGMP general query messages and send an IGMP to multicast group multicast Membership response messages (its data form as shown in Fig. 2 compared with IGMP general query messages, (0x16 represents that the type of multicast message is IGMP to the heading version number field write-in 0x16 of IGMP message formats Membership response report message, and it is multicast protocol regulation, and multicast address field is 224.0.1.1).Through multicast Front end load balanced device 100 that router (as shown in figure 4 above or 5) is replicated and sent to multicast group, back-end server 102 with And back-end server 103.
Back-end server 102 and back-end server 103 are receiving front end load balanced device 100 to multicast in multicast group After the IGMP general query messages of transmission, IGMP general query messages need to be equally responded to multicast group multicast Send an IGMP membership response message.But back-end server 102 and back-end server 103 are at this moment The IGMP membership response messages that back-end server 101 sends to multicast group multicast are further received, is based on IGMP agreements, back-end server 102 and back-end server 103 can suppress to send IGMP membership to multicast group multicast Response messages, therefore back-end server 102 and back-end server 103 multicast in multicast group send IGMP If receiving another back-end server 101 in multicast group before membership response messages to be sent to multicast group multicast IGMP membership response messages, then cancel and send IGMP membership to multicast in multicast group Response messages.
Step 8 is to 10 being the response based on IGMP protocol realization IGMP general query messages, back-end server 101 IGMP membership response messages are sent to multicast group by multicast, may be such that front end load balanced device 100 is known At least there is a back-end server 101 in multicast group 224.0.1.1, know that the multicast group is also survived (i.e. effective), so that Can continue periodically to send IGMP general query messages to the multicast group.
Specifically, front end load balanced device 100 confirms that multicast group has according to IGMP membership response messages Effect, after confirming that multicast group is effective, continues to multicast group after clocking value (starting timing in step 4-6) exceedes predetermined period Interior back-end server multicast sends IGMP general query messages (see below the step of 18-19).
In certain embodiments, when front end load equalizer 100 is not received by IGMP membership response During message, illustrate that all back-end servers are away from multicast group in multicast group, front end load balanced device 100 confirms that multicast group is lost Effect, then stop continuing to send IGMP general to the back-end server multicast in multicast group after clocking value exceedes predetermined period Query messages.
In a step 11, back-end server 101 is sending the IGMP membership response messages described in step 8 Afterwards, the default port 2000 of forward end load equalizer 100 sends declaration message 1, wherein the destination address word of declaration message 1 Section includes the unicast address 192.168.1.100 of front end load balanced device 100, and destination interface field includes default port 2000, Source address field includes the unicast address 192.168.1.101 of back-end server 101.
For example, declaration message can be UDP messages, and the UDP messages are encapsulated in IP messages, refer to Fig. 6, Fig. 6 It is the data form schematic diagram of the IP messages for being packaged with UDP messages according to embodiments of the present invention.As shown in fig. 6, being packaged in IP The UDP messages of message include source address field, destination address field (DAF), source port field, destination interface field.
In embodiments of the present invention, the source address field of the UDP messages (declaring message 1) that back-end server 101 sends The unicast address 192.168.1.101 of back-end server 101 is write, destination address field (DAF) write-in front end load balanced device 100 Unicast address 192.168.1.100, the default port 2000 of destination interface field write-in.
Significantly, since front end load balanced device 100 only needs the unicast address according to back-end server 101 192.168.1.101 it can be registered, and the source port of back-end server 101 need not be known, therefore back-end server The source port field of the 101 UDP messages for sending can arbitrarily set a nonsystematic port, and the embodiment of the present invention is not restricted to it.
It is without carrying out link setup action thus small with resource consumption because UDP messages are not belonging to connecting-type agreement, treatment Fireballing advantage.
Alternatively, declaration message can also be realized with TCP message, and TCP message is set up by three-way handshake and connected, though More, but safer reliability is taken compared with UDP messages.
In step 12, front end load balanced device 100 receives declaration message 1, parsing declaration report in default port 2000 Text 1, the unicast address 192.168.1.101 of back-end server 101 is obtained from the source address field of declaration message 1, by unicast ground Location 192.168.1.101 is recorded in available server list 40, and it is corresponding with unicast address 192.168.1.101 to set one Heartbeat timer 1, control heartbeat timer 1 starts timing.
In step 13, back-end server 102 is receiving the reports of the IGMP membership response described in step 9 After text, the default port 2000 of forward end load equalizer 100 sends declaration message 2, wherein the destination address of declaration message 2 Field includes the unicast address 192.168.1.100 of front end load balanced device 100, and destination interface field includes default port 2000, source address field includes the unicast address 192.168.1.102 of back-end server 102.
At step 14, front end load balanced device 100 receives declaration message 2, parsing declaration report in default port 2000 Text 2, the unicast address 192.168.1.102 of back-end server 102 is obtained from the source address field of declaration message 2, by unicast ground Location 192.168.1.102 is recorded in available server list 40, and it is corresponding with unicast address 192.168.1.102 to set one Heartbeat timer 2, control heartbeat timer 2 starts timing.
In step 15, back-end server 102 is receiving the IGMP membership response described in step 10 After message, the default port 2000 of forward end load equalizer 100 sends declaration message 3, wherein the destination of declaration message 3 Location field includes the unicast address 192.168.1.100 of front end load balanced device 100, and destination interface field includes default port 2000, source address field includes the unicast address 192.168.1.103 of back-end server 103.
In step 16, front end load balanced device 100 receives declaration message 3, parsing declaration report in default port 2000 Text 3, the unicast address 192.168.1.103 of back-end server 103 is obtained from the source address field of declaration message 3, by unicast ground Location 192.168.1.103 is recorded in available server list 40, and it is corresponding with unicast address 192.168.1.102 to set one Heartbeat timer 3, control heartbeat timer 3 starts timing.
During available server list 40 now is as shown in fig. 7, wherein Fig. 7 shows heartbeat timer and available service list Corresponding relation between the unicast address of registration.
In this, front end load balanced device 100 automatically get back-end server 101,102,103 unicast address and by its Available server list 40 is added, so as to complete registration.Therefore in embodiments of the present invention, back-end server 101,102,103 exists Local terminal completes registration by the place multicast group of front end load balanced device 100 is added by changing itself multicast address, in front end It is whole without being configured manually on load equalizer 100, the administrative convenience of front end load balanced device 100 can be effectively improved.
In step 17, it is assumed that back-end server 102 needs the cancel register in front-end server 100, now only need to be Back-end server 102 manually or script configuration mode remove back-end server 102 multicast address 224.0.1.1 ( In some embodiments, it is also possible to be configured to other multicast address different from multicast address 224.0.1.1), so as to exit multicast Group 224.0.1.1.
In step 18 and 19, front end load balanced device 100 sends IGMP general query and reports to multicast group multicast Text, wherein front end load balanced device 100 are before 32 multicast address fields of the IGMP general query messages are written with The multicast address 224.0.1.1 of load equalizer 100 is held, due to the multicast address 224.0.1.1 of back-end server 101 and 103 It is consistent with front end load balanced device 100, therefore back-end server 101 and 103 is respectively received IGMP general query reports Text, and back-end server 102 so as to exit multicast group 224.0.1.1, therefore does not receive IGMP because removing multicast address General query messages.
IGMP general query messages are initially received in this hypothesis back-end server 103, then in step 20, Back-end server 103 responds IGMP general query messages and sends IGMP membership to multicast in multicast group Response messages, and back-end server 101 receives the IGMP of the multicast of back-end server 103 transmission in step 21 After membership response messages, suppress to send IGMP membership response messages to multicast group multicast.
Therefore front end load balanced device 100 can upon receipt hold the IGMP membership that the multicast of server 103 sends Multicast group 224.0.1.1 survivals where being learnt after response messages.
In step 22, back-end server 103 sends IGMP membership response and reports to multicast in multicast group After text, declaration message 3 to the default port 2000 of front end load balanced device 100 is sent, wherein declaration message 3 can be with step 15 Shown in it is consistent.
In step 23, front end load balanced device 100 receives declaration message 3, parsing declaration report in default port 2000 Text 3, the unicast address 192.168.1.103 of back-end server 103 is obtained from the source address field of declaration message 3, judges unicast Whether address 192.168.1.103 is recorded in available server list 40, and due to unicast address in step 16 192.168.1.103 available server list 40 is reported in, therefore front end load balanced device 100 can determine whether unicast address 192.168.1.103 it is already recorded in available server list 40, the now control of front end load balanced device 100 heartbeat timer 3 reclockings.
In step 24, back-end server 101 receives the IGMP that back-end server 103 sends to multicast in multicast group After membership response messages, declaration message 1 to the default port 2000 of front end load balanced device 100, a surname are sent Accusing message 1 can be consistent with shown in step 11.
In step 25, front end load balanced device 100 receives declaration message 1, parsing declaration report in default port 2000 Text 1, the unicast address 192.168.1.101 of back-end server 101 is obtained from the source address field of declaration message 1, judges unicast Whether address 192.168.1.101 is recorded in available server list 40, and due to unicast address in step 12 192.168.1.101 available server list 40 is reported in, therefore front end load balanced device 100 can determine whether unicast address 192.168.1.101 it is already recorded in available server list 40, now this front end load equalizer 100 control heartbeat timing The reclocking of device 1.
In step 26, front end load balanced device 100 judges heartbeat timer 1, heartbeat timer 2, heartbeat timer 3 Whether timing time exceeds predetermined amount of time, and reclocking, therefore heartbeat timer are come because heartbeat timer 2 does not reset 2 are judged as time-out.
In this, it is notable that in embodiments of the present invention, front end load balanced device 100 is periodically to multicast group Interior multicast sends IGMP general query messages, between step 4 to step 18 is a predetermined period (referring to step 8 To 10), the predetermined period is set to than above-mentioned scheduled time segment length, therefore, in a predetermined period, there is no reclocking Heartbeat timer will necessarily exceed predetermined amount of time.
In step 26, can more add up the expired times of heartbeat timer 2, when in multiple cycles heartbeat timer 2 it is super When number of times when being accumulated to beyond predetermined value, you can it is to exit the group to determine the corresponding back-end server 102 of heartbeat timer 2 Group is broadcast, front end load balanced device 100 arranges the corresponding unicast address 192.168.1.102 of heartbeat timer 2 from available server Removed in table 40.
For example, predetermined amount of time can be 2 seconds, and the cycle is 1 second, and expired times are 10.
In the present embodiment, it is that expired times are the reason for setting predetermined value:If back-end server 102 is not clear Except multicast network address, and it is to maintain and stays in multicast group 224.0.1.1, but due to unstable networks, front end load is balanced Device 100 sends declaration message 2 in not receiving certain several cycle by back-end server 102, if but to be nullified with regard to this judgement Back-end server 102 can then produce the risk of erroneous judgement.Therefore predetermined value is set to expired times in this, beyond predetermined number Back-end server 102 is nullified during value again, so as to prevent the generation of erroneous judgement.
Certainly, in the case of network is completely reliable, it is also possible to which expired times are set into 1.
To sum up, by the way that with upper type, the register method that the embodiment of the present invention is disclosed can be chartered with regular monitoring The real-time status of back-end server, the back-end server that multicast group is will move out automatically is unregistered, therefore in back-end server When quantity will carry out dynamic dilatation or capacity reducing, without manual configuration front end load balanced device 100, therefore management can be further lifted Convenience.
Fig. 8 is referred to, Fig. 8 is the apparatus structure schematic diagram of front end load balanced device 100 according to embodiments of the present invention, such as Shown in Fig. 8, front end load balanced device 100 includes:
Multicast address setup module 201, for setting and the back-end server identical multicast address in multicast group;
Multicast inquiry sending module 202, for sending IGMP general to the back-end server multicast in multicast group The multicast address field of query messages, wherein IGMP general query messages carries the unicast of front end load balanced device 100 Address;
Unicast reception module 203, IGMP is sent for all back-end server responses in default port snoop multicast group The declaration message that the difference unicast of general query messages sends, wherein the destination address field (DAF) of declaration message is negative including front end The unicast address of balanced device 100 is carried, destination interface includes default port, and source address field includes sending the rear end clothes of declaration message The unicast address of business device, default port is the nonsystematic port of the front end load balanced device 100 specified;
Packet parsing module 204, for the list for parsing declaration message to obtain the back-end server of source address field carrying Broadcast address;
Registering modules 205, the unicast address of the back-end server carried in source address field is not recorded in available service When in device list 40, the unicast address of the back-end server that source address field is carried is recorded in available server list 40.
Alternatively, front end load balanced device 100 also includes heartbeat timer and timer setup module 206, and timer sets Module 206 is put, for being correspondingly arranged a heartbeat timing for each described unicast address recorded in available server list 40 Device, and for the unicast address of the back-end server of source address field carrying sets heartbeat timer and controls heartbeat timer to start Timing.
Alternatively, Registering modules 205 are additionally operable to:
Recorded in available server list 40 in the unicast address of the back-end server for determining source address field carrying When, the corresponding heartbeat timer reclocking of unicast address of the back-end server that control source address field is carried.
Alternatively, timer setup module 206 is additionally operable to:
The clocking value of the corresponding heartbeat timer of unicast address recorded in available server list 40 is beyond pre- timing Between section when, control heartbeat timer reclocking, and accumulative heartbeat timer expired times, in expired times beyond predetermined time During number, unicast address corresponding with heartbeat timer is removed from available server list 40.
Alternatively, front end load balanced device 100 also includes multicast response receiver module 207,
Multicast inquiry sending module 202, is additionally operable to the multicast in multicast group and sends IGMP general query messages When start timing;
Multicast response receiver module 207, be initially received in multicast group IGMP general query messages for receiving The IGMP membership that are sent to multicast group multicast of back-end server response IGMP general query messages Response messages;
Wherein, received in multicast response receiver module 207 and be initially received in multicast group IGMP general query The IGMP membership that the back-end server response IGMP general query messages of message send to multicast group multicast During response messages, multicast inquiry sending module 202 confirms multicast group according to IGMP membership response messages Effectively, and after clocking value exceedes predetermined period continue to send IGMP general to the back-end server multicast in multicast group Query messages;When multicast response receiver module 207 is not received by IGMP membership response messages, multicast Inquiry sending module 202 confirms multicast group failure, stops continuing to the rear end in multicast group after clocking value exceedes predetermined period Server group is broadcast and send IGMP general query messages.
Alternatively, declaration message is UDP messages.
Fig. 9 is referred to, Fig. 9 is the apparatus structure schematic diagram of back-end server according to embodiments of the present invention, such as Fig. 9 institutes Show, back-end server 300 may be, for example, any one in the back-end server 101,102,103 shown in Fig. 1, back-end server 300 include:
Multicast address setup module 301, for setting and front end load balanced device identical multicast address;
Multicast inquiry receiver module 302, sends to multicast in multicast group periodically for receiving front-end load equalizer It is equal that the multicast address field of IGMP general query messages, wherein IGMP general query messages carries front end load The unicast address of weighing apparatus;
Unicast sending module 303, for responding IGMP general query message forward end load equalizers unicast hair Declaration message is sent, wherein the destination address field (DAF) of declaration message includes the unicast address of front end load balanced device, destination interface bag Default port is included, source address field includes the unicast address of back-end server, and default port is what multicast group unanimously set in advance Nonsystematic port.
Alternatively, declaration message is UDP messages.
Alternatively, back-end server also includes multicast response sending module 304, and multicast response sending module 304 is used to ring IGMP general query messages are answered to send IGMP membership response messages to multicast in multicast group, and in group If broadcasting multicast inquiry before response sending module 303 sends IGMP membership response messages to multicast in multicast group Receiver module 302 receives the IGMP membership that another back-end server sends to multicast group multicast in multicast group Response messages, then multicast response sending module 304 cancel and send IGMP membership to multicast in multicast group Response messages.
Figure 10 is referred to, Figure 10 is that another apparatus structure of front end load balanced device according to embodiments of the present invention is illustrated Figure.As shown in Figure 10, front end load balanced device 100 includes memory 402, processor 401, network interface 403 and bus 404, Memory 402, network interface 403, processor 401 are connected with bus 404 respectively, and memory storage has programmed instruction and available clothes Business device list 40 (as shown in Figure 7), available server list 40 is used to record the unicast address of the back-end server for succeeding in registration, Programmed instruction in computing device memory is performing the step performed by the front end load balanced device 100 shown in Fig. 3.It is worth It is noted that send being completed by processing the programmed instruction controlling network interface 403 in execution memory with reception message.
Figure 11 is referred to, Figure 11 is another apparatus structure schematic diagram of back-end server according to embodiments of the present invention, such as Shown in Figure 11, back-end server 300 can be any one of back-end server 101-103 shown in Fig. 1, back-end server 300 include memory 502, processor 501, network interface 503 and bus 504, memory 502, network interface 503, processor 501 are connected with bus 504 respectively, and memory 502 has program stored therein instruction, and the program that processor 501 is performed in memory 502 refers to Make performing the step performed by the back-end server 101,102 or 103 shown in Fig. 3.
It should be noted that, any device embodiment described above is all only schematical, wherein described as separation The unit of part description can be or may not be it is physically separate, the part shown as unit can be or Can not be physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Some or all of module therein is selected the need for border to realize the purpose of this embodiment scheme.In addition, what the present invention was provided In device embodiment accompanying drawing, the annexation between module represents between them there is communication connection, specifically can be implemented as one Bar or a plurality of communication bus or holding wire.Those of ordinary skill in the art are without creative efforts, you can with Understand and implement.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can be borrowed Software is helped to add the mode of required common hardware to realize, naturally it is also possible to include application specific integrated circuit, specially by specialized hardware Realized with CPU, private memory, special components and parts etc..Generally, all functions of being completed by computer program can Easily realized with corresponding hardware, and, the particular hardware structure for realizing same function can also be various many Sample, such as analog circuit, digital circuit or special circuit etc..But, it is more for the purpose of the present invention in the case of software program reality It is now more preferably implementation method.Based on such understanding, technical scheme is substantially made to prior art in other words The part of contribution can be embodied in the form of software product, and the computer software product is stored in the storage medium that can read In, such as the floppy disk of computer, USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), magnetic disc or CD etc., including some instructions are used to so that a computer sets Standby (can be personal computer, server, or network equipment etc.) performs the method described in each embodiment of the invention.
It is apparent to those skilled in the art that, the specific work of the system, device or unit of foregoing description Make process, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (20)

1. a kind of register method, it is characterised in that methods described is applied to front end load balanced device, the front end load balanced device It is arranged in a multicast group with least one back-end server, the front end load balanced device in same multicast group and described Back-end server is provided with identical multicast address, and the front end load balanced device is provided with available server list, described Available server list is used to record the unicast address of the back-end server for succeeding in registration, and methods described includes:
The front end load balanced device sends IGMP general query and reports to the back-end server multicast in the multicast group Text, wherein the multicast address field of the IGMP general query messages carries the unicast ground of the front end load balanced device Location;
The front end load balanced device all back-end servers in multicast group described in default port snoop respond the IGMP The declaration message that the difference unicast of general query messages sends, wherein the destination address field (DAF) of the declaration message includes institute The unicast address of front end load balanced device is stated, destination interface includes the default port, and source address field includes sending a surname The unicast address of the back-end server of message is accused, the default port is the non-system of the preassigned front end load balanced device System port;
The front end load balanced device parsing is described to declare message to obtain the back-end server that the source address field is carried Unicast address;
In the unicast address of the back-end server that the source address field is carried is not recorded in the available server list When, the unicast address record of the back-end server that the front end load balanced device carries the source address field is used described Server list.
2. method according to claim 1, it is characterised in that each described list recorded in the available server list Broadcast address and correspond to a heartbeat timer, in the back-end server that the front end load balanced device carries the source address field Unicast address record the step of the available server list after, methods described also includes:
The front end load balanced device is that the unicast address of the back-end server that the source address field is carried sets heartbeat timing Device simultaneously starts timing.
3. method according to claim 2, it is characterised in that methods described also includes:
The back-end server that the front end load balanced device is carried in the source address field unicast address record it is described can During with server list, the corresponding heartbeat timer of unicast address of the back-end server of the source address field carrying is controlled Reclocking.
4. according to the method in claim 2 or 3, it is characterised in that methods described also includes:
The corresponding heartbeat timer of unicast address that the front end load balanced device is recorded in the available server list When clocking value exceeds predetermined amount of time, the heartbeat timer reclocking is controlled, and add up the time-out of the heartbeat timer Number of times, when the expired times exceed pre-determined number, unicast address corresponding with the heartbeat timer is used from described Removed in server list.
5. the method according to any one of Claims 1-4, it is characterised in that the front end load balanced device is to described group Broadcast the step of the back-end server multicast in group sends IGMP general query messages and specifically include:
Back-end server multicast of the front end load balanced device in the multicast group sends the IGMP general Start timing during query messages;
The IGMP general query reports are initially received in the front end load equalizer input to the multicast group The back-end server of text responds the IGMP that the IGMP general query messages send to the multicast group multicast During membership response messages, the front end load balanced device is according to the IGMP membership response Message confirms the multicast group effectively, and continues to the back-end server in the multicast group after clocking value exceedes predetermined period Multicast sends IGMP general query messages;
When the front end load balanced device is not received by the IGMP membership response messages, the front end Load equalizer confirms the multicast group failure, stops continuing to the multicast after the clocking value exceedes the predetermined period Back-end server multicast in group sends IGMP general query messages.
6. the method according to any one of claim 1 to 5, it is characterised in that the declaration message is UDP messages.
7. a kind of register method, it is characterised in that methods described is applied to back-end server, the back-end server is born with front end Carry balanced device to be arranged in same multicast group, the front end load balanced device and the back-end server in same multicast group Identical multicast address is provided with, methods described includes:
The back-end server receives the IGMP general that the front end load balanced device sends to multicast in the multicast group Query messages, wherein the multicast address field of the IGMP general query messages carries the front end load balanced device Unicast address;
The back-end server responds the IGMP general query messages and is sent to the front end load balanced device unicast Declaration message, wherein the destination address field (DAF) of the declaration message includes the unicast address of the front end load balanced device, purpose Port includes the default port, and source address field includes the unicast address of the back-end server, the default port It is the nonsystematic port of the specified front end load balanced device.
8. method according to claim 7, it is characterised in that hold server to receive the front end load in the rear balanced Device periodically in multicast group multicast send IGMP general query messages the step of after, methods described also includes:
The back-end server responds the IGMP general query messages and sends IGMP to multicast in the multicast group Membership response messages, and multicast sends IGMP membership response reports in the multicast group If receiving the IGMP membership that another back-end server sends to the multicast group multicast in the multicast group before text Response messages, then cancel and send IGMP membership response messages to multicast in the multicast group.
9. the method according to claim 7 or 8, it is characterised in that the declaration message is UDP messages.
10. a kind of front end load balanced device, the front end load balanced device and at least one back-end server are arranged at a group Broadcast in group, the front end load balanced device and the back-end server in same multicast group are provided with identical multicast ground Location, the front end load balanced device is provided with available server list, and the available server list is succeeded in registration for record Back-end server unicast address, the front end load balanced device includes:
Multicast address setup module, for setting and the back-end server identical multicast address in the multicast group;
Multicast inquiry sending module, for sending IGMP general query to the back-end server multicast in the multicast group Message, wherein the multicast address field of the IGMP general query messages carries the unicast of the front end load balanced device Address;
Unicast reception module, for sending IGMP described in all back-end servers responses in the multicast group described in default port snoop The declaration message that the difference unicast of general query messages sends, wherein the destination address field (DAF) of the declaration message includes institute The unicast address of front end load balanced device is stated, destination interface includes the default port, and source address field includes sending a surname The unicast address of the back-end server of message is accused, the default port is the nonsystematic end of the front end load balanced device specified Mouthful;
Packet parsing module, for parsing the declaration message to obtain the list of the back-end server that the source address field is carried Broadcast address;
Registering modules, the unicast address of the back-end server carried in the source address field is not recorded in the available service When in device list, the unicast address record of the back-end server that the source address field is carried is in available server row Table.
11. front end load balanced devices according to claim 10, it is characterised in that also including heartbeat timer and timer Setup module,
The timer setup module, for being corresponded to for each described unicast address recorded in the available server list One heartbeat timer is set, and for the unicast address of the back-end server of source address field carrying sets heartbeat timer simultaneously The heartbeat timer is controlled to start timing.
12. front end load balanced devices according to claim 11, it is characterised in that the Registering modules are additionally operable to:
Recorded in the available server list in the unicast address for determining the back-end server that the source address field is carried When middle, the corresponding heartbeat timer reclocking of unicast address of the back-end server of the source address field carrying is controlled.
The 13. front end load balanced device according to claim 11 or 12, it is characterised in that the timer setup module is also For:
The clocking value of the corresponding heartbeat timer of unicast address recorded in the available server list exceeds the scheduled time Duan Shi, the control heartbeat timer reclocking, and add up the expired times of the heartbeat timer, in the expired times During beyond pre-determined number, unicast address corresponding with the heartbeat timer is removed from the available server list.
The 14. front end load balanced device according to any one of claim 11 to 13, it is characterised in that also including multicast response Receiver module,
The multicast inquiry sending module, is additionally operable to the multicast in the multicast group and sends IGMP general query messages When start timing;
The multicast response receiver module, the IGMP general query are initially received for receiving in the multicast group The back-end server of message responds the IGMP that the IGMP general query messages send to the multicast group multicast Membership response messages;
Wherein, received in the multicast response receiver module and the IGMP general are initially received in the multicast group The back-end server of query messages responds the IGMP that the IGMP general query messages send to the multicast group multicast During membership response messages, the multicast inquiry sending module is according to the IGMP membership Response messages confirm the multicast group effectively, and after continuing in the multicast group after clocking value exceedes predetermined period End server group is broadcast and send IGMP general query messages;It is not received by the multicast response receiver module described During IGMP membership response messages, the multicast inquiry sending module confirms the multicast group failure, described Clocking value stops continuing sending IGMP to the back-end server multicast in the multicast group after exceeding the predetermined period General query messages.
The 15. front end load balanced device according to any one of claim 11 to 14, it is characterised in that the declaration message is UDP messages.
A kind of 16. back-end servers, including:
Multicast address setup module, the multicast address setup module is used to set and front end load balanced device identical multicast ground Location;
Multicast inquiry receiver module, for receiving the IGMP that the front end load balanced device sends to multicast in multicast group periodically General query messages, wherein the multicast address field of the IGMP general query messages carries the front end bearing Carry the unicast address of balanced device;
Unicast sending module, sends out for responding the IGMP general query messages to the front end load balanced device unicast Declaration message is sent, wherein the destination address field (DAF) of the declaration message includes the unicast address of the front end load balanced device, mesh Port include the default port, the unicast address of source address field including the back-end server, the default port is The nonsystematic port that the multicast group unanimously sets in advance.
17. back-end servers according to claim 16, it is characterised in that the declaration message is UDP messages.
18. back-end server according to claim 16 or 17, it is characterised in that also including multicast response sending module,
The multicast response sending module, for responding the IGMP general query messages to multicast in the multicast group IGMP membership response messages are sent, and sending module is sent to group in the multicast group in the multicast response If broadcast sending the multicast inquiry receiver module before IGMP membership response messages to receive the multicast group The IGMP membership response messages that interior another back-end server sends to the multicast group multicast, the then multicast Response sending module is cancelled to multicast transmission IGMP membership response messages in the multicast group.
19. a kind of front end load balanced devices, it is characterised in that described to deposit including memory, processor, network interface and bus Reservoir, the network interface, the processor are connected with the bus respectively, after the front end load balanced device and at least one End server is arranged in a multicast group, and the front end load balanced device and the back-end server in same multicast group are equal Identical multicast address is provided with, the memory storage has programmed instruction and available server list, the available server List is used to record the unicast address of the back-end server for succeeding in registration, and the program in memory described in the computing device refers to Make performing step:
Set and the back-end server identical multicast address in the multicast group;
The network interface is controlled to send IGMP general query messages to the back-end server multicast in the multicast group, The multicast address field of wherein described IGMP general query messages carries the unicast address of the front end load balanced device;
The network interface is controlled to send IGMP described in all back-end servers responses in the multicast group described in default port snoop The declaration message that the difference unicast of general query messages sends, wherein the destination address field (DAF) of the declaration message includes institute The unicast address of front end load balanced device is stated, destination interface includes the default port, and source address field includes sending a surname The unicast address of the back-end server of message is accused, the default port is the nonsystematic end of the front end load balanced device specified Mouthful;
Parsing is described to declare message to obtain the unicast address of the back-end server that the source address field is carried;
In the unicast address of the back-end server that the source address field is carried is not recorded in the available server list When, the unicast address of the back-end server that the source address field is carried is recorded in the available server list.
20. a kind of back-end servers, it is characterised in that including memory, processor, network interface and bus, the memory, The network interface, the processor are connected with the bus respectively, and the back-end server is set with front end load balanced device In in same multicast group, the front end load balanced device and the back-end server in same multicast group are provided with identical Multicast address, the memory storage has programmed instruction, and the programmed instruction in memory described in the computing device is holding Row step:
The network interface is controlled to receive the IGMP general that the front end load balanced device sends to multicast in multicast group Query messages, wherein the multicast address field of the IGMP general query messages carries the front end load balanced device Unicast address;
Control the network interface to respond the IGMP general query messages to be sent out to the front end load balanced device unicast Declaration message is sent, wherein the destination address field (DAF) of the declaration message includes the unicast address of the front end load balanced device, mesh Port include the default port, the unicast address of source address field including the back-end server, the default end Mouth is the nonsystematic port of the front end load balanced device specified.
CN201611239682.7A 2016-12-28 2016-12-28 Front-end load balancer, back-end server and registration method Active CN106789287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611239682.7A CN106789287B (en) 2016-12-28 2016-12-28 Front-end load balancer, back-end server and registration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611239682.7A CN106789287B (en) 2016-12-28 2016-12-28 Front-end load balancer, back-end server and registration method

Publications (2)

Publication Number Publication Date
CN106789287A true CN106789287A (en) 2017-05-31
CN106789287B CN106789287B (en) 2020-04-03

Family

ID=58923219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611239682.7A Active CN106789287B (en) 2016-12-28 2016-12-28 Front-end load balancer, back-end server and registration method

Country Status (1)

Country Link
CN (1) CN106789287B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222544A (en) * 2017-06-14 2017-09-29 千寻位置网络有限公司 High availability method and system based on multilayer service architecture
CN107635002A (en) * 2017-09-21 2018-01-26 浪潮软件股份有限公司 A kind of access method and device of containerization application
CN109753403A (en) * 2017-11-06 2019-05-14 阿里巴巴集团控股有限公司 Server operation method, apparatus, equipment and system
CN115134227A (en) * 2022-06-17 2022-09-30 京东科技信息技术有限公司 Method and apparatus for maintaining server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465746B (en) * 2007-12-17 2011-02-16 华为技术有限公司 Method and system for converging multicast network and multicast forwarding device
CN102437960B (en) * 2011-12-21 2014-08-27 福建星网锐捷网络有限公司 Detection processing method and system of cluster mode, and network equipment
CN103780503B (en) * 2012-10-18 2017-12-29 新华三技术有限公司 The implementation method and equipment of a kind of load balancing
CN105306356B (en) * 2014-07-30 2019-04-30 上海博达数据通信有限公司 A kind of method that Multicast Routing realizes active-standby switch in distributed system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222544A (en) * 2017-06-14 2017-09-29 千寻位置网络有限公司 High availability method and system based on multilayer service architecture
CN107635002A (en) * 2017-09-21 2018-01-26 浪潮软件股份有限公司 A kind of access method and device of containerization application
CN109753403A (en) * 2017-11-06 2019-05-14 阿里巴巴集团控股有限公司 Server operation method, apparatus, equipment and system
CN109753403B (en) * 2017-11-06 2022-09-23 阿里巴巴集团控股有限公司 Server operation method, device, equipment and system
CN115134227A (en) * 2022-06-17 2022-09-30 京东科技信息技术有限公司 Method and apparatus for maintaining server

Also Published As

Publication number Publication date
CN106789287B (en) 2020-04-03

Similar Documents

Publication Publication Date Title
EP2347563B1 (en) Distributed master election
EP3226132B1 (en) Method and apparatus for deploying virtual machine instances in a nfv architecture
WO2022033121A1 (en) Method and system for resource exposure in kubernetes, and device and medium
CN103125102B (en) For providing the system and method for the Ethernet virtual concentrator scalability based on infinite bandwidth in middleware machine environment
JP3989969B2 (en) Communication system for client-server data processing system
CN105610632B (en) Virtual network equipment and related method
CN102291455B (en) Distributed cluster processing system and message processing method thereof
CN106789287A (en) Front end load balanced device, back-end server and register method
US20190028435A1 (en) Enhanced network processing of virtual node data packets
US11075980B2 (en) Method for operating a node cluster system in a network and node cluster system
DE102014117460A1 (en) Programmable distributed networking
JP2015534320A (en) System and method for providing policy-based data center network automation
US10348683B2 (en) Network packet filtering via media access control (MAC) address learning
CN106657330A (en) User data migration method and user data backup method, device and system
JP6272190B2 (en) Computer system, computer, load balancing method and program thereof
US7864703B2 (en) Packet communication device
CN105993161A (en) Scalable address resolution
CN106357542B (en) The method and software defined network controller of multicast service are provided
CN115086250B (en) Network target range distributed flow generation system and method
US20210176172A1 (en) Packet forwarding method, device and apparatus, and storage medium
CN108737217A (en) A kind of packet snapping method and device
CN114080785A (en) Highly scalable, software defined intra-network multicasting of load statistics
US20240089352A1 (en) Udp message distribution method, udp message distribution apparatus, electronic device and computer readable storage medium
WO2024119751A1 (en) Information exchange method for plurality of ethernet switches, and related apparatus
CN107465582B (en) Data sending method, device and system, physical home gateway and access node

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220225

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right