CN104092751B - A kind of Operational Visit method and apparatus - Google Patents

A kind of Operational Visit method and apparatus Download PDF

Info

Publication number
CN104092751B
CN104092751B CN201410311856.0A CN201410311856A CN104092751B CN 104092751 B CN104092751 B CN 104092751B CN 201410311856 A CN201410311856 A CN 201410311856A CN 104092751 B CN104092751 B CN 104092751B
Authority
CN
China
Prior art keywords
dns
server
load
message
balancing device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410311856.0A
Other languages
Chinese (zh)
Other versions
CN104092751A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201410311856.0A priority Critical patent/CN104092751B/en
Publication of CN104092751A publication Critical patent/CN104092751A/en
Application granted granted Critical
Publication of CN104092751B publication Critical patent/CN104092751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of Operational Visit method and apparatus, this method includes:Load-balancing device utilizes the dns query message dns address table carried in the DNS request message when receiving DNS request message;If record has the domain-name information in the dns address table, server identification corresponding to domain name information is sent to terminal device;When receiving the Operational Visit message for carrying the server identification, the Operational Visit message is sent to corresponding server, and the service response message from corresponding server is sent to terminal device.In the embodiment of the present invention, load-balancing device decision-making can be enable to go out optimal ISP links, and then improve Consumer's Experience.

Description

A kind of Operational Visit method and apparatus
Technical field
The present invention relates to communication technical field, more particularly, to a kind of Operational Visit method and apparatus.
Background technology
As shown in figure 1, being the networking schematic diagram of balancing link load, the terminal device (such as PC) of corporate intranet passes through domain When name accesses the business of server on Internet, such as pass through email.sina.com.cn access Sina mailbox service, PC hairs DNS (Domain Name System, the domain name system) request message gone out, balancing equipment interception is supported, and according to matching somebody with somebody in advance The strategy put is from a plurality of ISP (Internet Service Provider, ISP, only showing two in Fig. 1) An ISP link is selected in link, it is assumed that selection ISP links 2, load-balancing device is by ISP links 2 by DNS request message The dns server 2 being sent in ISP2 networks, dns server 2 will parse DNS request message, to obtain Sina's mailbox server Public network IP address, and by the public network IP address carry in DNS response messages, PC is returned to by load-balancing device, by PC sends Operational Visit message according to this public network IP address, by load-balancing device, ISP2 networks to Sina's mailbox server, To realize the access of Sina's mailbox service.
At present, in order to be further ensured that service reliability and response performance, it will usually dispose phase in different ISP networks With the server (such as Sina's mailbox server) of business function, and in different ISP networks the server of deployment IP address Difference, for example, as shown in Fig. 2 Sina of ISP1 network internals administration mailbox server 1, Sina of ISP2 network internals administration mailbox service Device 2.Assuming that pc access Sina mailbox service, is accessed by email.sina.com.cn and has been distributed to ISP through load-balancing device Link 2, then, PC is merely able to by Sina's mailbox server 2 in ISP2 network access ISP2 networks, it is, however, possible to this When by Sina's mailbox server 1 in ISP1 network access ISP1 networks faster.So current load-balancing device also without Method ensures that the ISP links that decision-making goes out are optimum link, and then causes Consumer's Experience relatively low.
The content of the invention
The present invention proposes a kind of Operational Visit method and apparatus, and efficiently solving existing Operational Visit mode can not protect The ISP links that go out of card decision-making are for optimum link and then the problem of cause Consumer's Experience relatively low.
The embodiment of the present invention provides a kind of Operational Visit method, and this method is applied to include at least one terminal device, born In the system for carrying balancing equipment and at least two servers, the load-balancing device passes through ISP network and each service respectively Device interacts, and methods described includes:
The load-balancing device utilizes when receiving the domain name system DNS request message from any terminal equipment The local preset dns address table of the dns query message carried in the DNS request message;
If record has the domain-name information in the dns address table, by domain-name information described in the dns address table Corresponding server identification is sent to the terminal device;
When receiving the Operational Visit message for carrying the server identification from the terminal device, passed through ISP network corresponding to the server identification where server is sent to corresponding server, and will come from corresponding server Service response message be sent to the terminal device.
The load-balancing device utilizes the locally preset DNS of the dns query message that carries in the DNS request message After address table, in addition to:
If handed in the dns address table without record domain name information, the load-balancing device from itself Dns server in mutual ISP network obtains server identification corresponding to domain name information;
If the server identification got differs, dns address Duan Zhongxuan of the load-balancing device from local A unappropriated dns address is selected, the dns address is carried the terminal device is sent in DNS response messages, and Recorded in local preset DNS contingency tables between domain name information, the dns address and the server identification that gets Corresponding relation;
When receiving the Operational Visit message for carrying the dns address from the terminal device, closed from the DNS Server identification corresponding to the dns address is inquired about in connection table, the Operational Visit message is copied as into quantity and corresponding clothes The quantity identical Operational Visit message for device mark of being engaged in;
After the dns address in each Operational Visit message is converted into corresponding server identification respectively, by corresponding ISP network where server corresponding to server identification is sent to corresponding server, and by receive first business Response message is sent to the terminal device.
Dns server of the load-balancing device out of ISP network that interacted with itself obtains domain name information pair The server identification answered, including:
The load-balancing device sends the DNS request message to the DNS service in the ISP network interacted with itself Device;
The DNS response messages that dns server corresponding to reception returns, corresponding DNS is carried in the DNS response messages Server parses the server identification obtained after the DNS request message.
It is described after receive first service response message is sent to the terminal device by the load-balancing device Method also includes:
The load-balancing device empties domain-name information described in the DNS contingency tables, the dns address and obtained Corresponding relation between the server identification arrived;
Domain name information and the origin server of first service response message are recorded in the dns address table Corresponding relation between mark.
The server identification specifically includes:
The IP address of server;Wherein, the IP address is IPv4 addresses or IPv6 addresses.
The embodiment of the present invention provides a kind of load-balancing device, applied to including at least one terminal device, the load In the system of balancing equipment and at least two servers, the load-balancing device passes through ISP ISP respectively Network and each server interaction, the load-balancing device specifically include:
Enquiry module, for when receiving the domain name system DNS request message from any terminal equipment, using described The local preset dns address table of the dns query message carried in DNS request message;
Sending module, when having the domain-name information for being recorded in inquiring the dns address table in the enquiry module, Server identification corresponding to domain-name information described in the dns address table is sent to the terminal device;
When receiving the Operational Visit message for carrying the server identification from the terminal device, passed through ISP network corresponding to the server identification where server is sent to corresponding server, and will come from corresponding server Service response message be sent to the terminal device.
The load-balancing device also includes:Acquisition module, for utilizing the DNS request message in the enquiry module The dns query message of middle carrying is locally after preset dns address table, if the enquiry module inquires the dns address Without record domain name information, then the dns server acquisition out of ISP network that interacted with the load-balancing device in table Server identification corresponding to domain name information;
The sending module, it is additionally operable to when the server identification that the acquisition module is got differs, is born from described Carry in the local dns address section of balancing equipment and select a unappropriated dns address, the dns address is carried and rung in DNS Answer and the terminal device is sent in message;
The load-balancing device also includes:Memory module, for recording the domain in local preset DNS contingency tables The service that the dns address and the acquisition module that name information, the sending module select from dns address section are got Corresponding relation between device mark;
The enquiry module, it is additionally operable to receiving the business for carrying the dns address visit from the terminal device When asking message, server identification corresponding to the dns address is inquired about from DNS contingency tables;
The sending module, it is additionally operable to the Operational Visit message copying as number of the quantity with corresponding server identification Identical Operational Visit message is measured, the dns address in each Operational Visit message is converted into corresponding server identification respectively Afterwards, corresponding server is sent to by the ISP network where server corresponding to corresponding server identification, and will received First service response message be sent to the terminal device.
The acquisition module, handed over specifically for the DNS request message is sent to the load-balancing device itself Dns server in mutual ISP network;
The DNS response messages that dns server corresponding to reception returns, corresponding DNS is carried in the DNS response messages Server parses the server identification obtained after the DNS request message.
Also include:Maintenance module, for being sent to receive first service response message in the sending module After the terminal device, domain-name information, the dns address and the server got described in the DNS contingency tables are emptied Corresponding relation between mark, and domain name information and first service response report are recorded in the dns address table Corresponding relation between the origin server mark of text.
The server identification that the sending module is sent to the terminal device specifically includes:The IP address of server;Wherein, The IP address is IPv4 addresses or IPv6 addresses.
Based on above-mentioned technical proposal, in the embodiment of the present invention, when disposing identical services function in different ISP networks During server, no matter which kind of business terminal device accesses in which period, load-balancing device can allow response most fast The provided business service of server, i.e. load-balancing device by the present invention handling process can decision-making go out optimal ISP Link, and then improve Consumer's Experience.
Brief description of the drawings
Fig. 1 and Fig. 2 is the networking schematic diagram of balancing link load of the prior art;
Fig. 3 and Fig. 4 is Operational Visit method flow schematic diagram provided in an embodiment of the present invention;
Fig. 5 is a kind of load-balancing device structural representation provided in an embodiment of the present invention.
Embodiment
For problems of the prior art, the embodiment of the present invention provides a kind of Operational Visit method, applied to including In the system of at least one terminal device, load-balancing device and at least two servers.Terminal device can be corporate intranet PC, the business that PC passes through domain name access server.To ensure service reliability and response performance, in different ISP networks The server of identical services function is disposed, the server identification that server is disposed in different ISP networks is different;Load-balancing device By different ISP link connections to different ISP networks, and handed over respectively by the server in ISP network and ISP network Mutually.
Application scenarios schematic diagram using Fig. 2 as the embodiment of the present invention, under this application scene, enter by taking two ISP networks as an example Row illustrates that the quantity of ISP network can also be more than two in actual applications, and this is repeated no more in the embodiment of the present invention.Its In, Sina of ISP1 network internals administration mailbox server 1 and dns server 1, the server identification of Sina's mailbox server 1 are Identify A;Sina of ISP2 network internals administration mailbox server 2 and dns server 2, the server identification of Sina's mailbox server 2 To identify B.Load-balancing device is connected to ISP1 networks by ISP links 1, and is taken respectively with Sina mailbox by ISP1 networks Business device 1 and dns server 1 interact;Load-balancing device is connected to ISP2 networks by ISP links 2, and passes through ISP2 networks point Do not interacted with Sina mailbox server 2 and dns server 2.
Based on above-mentioned application scenarios, domain name (such as Sina's mailbox server is passed through with terminal device (PC of such as corporate intranet) Corresponding domain name email.sina.com.cn) access Sina's mailbox service of Sina mailbox server exemplified by, as shown in figure 3, this The Operational Visit method that inventive embodiments propose may comprise steps of:
Step 301, load-balancing device utilizes the DNS when receiving the DNS request message from any terminal equipment The local preset dns address table of the dns query message carried in request message.
In the embodiment of the present invention, when terminal device needs to access Sina's mailbox service of Sina's mailbox server, the end End equipment can send DNS request message, and carry domain name corresponding to Sina's mailbox server in the DNS request message email.sina.com.cn.The DNS request message sent for terminal device, load-balancing device can intercept the DNS please Message is sought, and it is local preset using domain-name information (email.sina.com.cn) inquiry carried in the DNS request message Dns address table.
Wherein, record has a corresponding relation between domain-name information and server identification in dns address table, in this corresponding relation Server identification most fast server of response Sina mailbox service for before mark.For the generating process of dns address table, It will be described in detail in the subsequent process of the embodiment of the present invention.
As shown in table 1, it is a kind of sample situation of dns address table, when load-balancing device utilizes domain-name information (email.sina.com.cn) during dns address table shown in inquiry table 1, it can learn that record has the domain in current dns address table Name information (email.sina.com.cn).
Table 1
Domain-name information Server identification
email.sina.com.cn Identify A
Step 302, if record has domain-name information in local preset dns address table, load-balancing device is by DNS Server identification corresponding to domain-name information is sent to terminal device in the table of location.Wherein, the domain-name information is to be taken in DNS request message The domain-name information of band, the terminal device are the terminal device that DNS request message is sent to load-balancing device.
In this step, in load-balancing device using shown in domain-name information (email.sina.com.cn) inquiry table 1 After dns address table, load-balancing device is determined in dns address table corresponding to domain-name information (email.sina.com.cn) Server identification is mark A, and now, load-balancing device can be sent to corresponding terminal by DNS response messages by A is identified Equipment.
Step 303, load-balancing device is receiving the Operational Visit report for carrying server identification from terminal device Wen Shi, Operational Visit message is sent to corresponding server by the ISP network where server corresponding to server identification, And the service response message from corresponding server is sent to terminal device.
Specifically, after terminal device receives the DNS response messages for carrying mark A from load-balancing device, Terminal device, which is known, itself is able to access that Sina's mailbox server corresponding to mark A, and subsequent terminal equipment needs to access Sina's postal During Sina's mailbox service of case server, the Operational Visit message for carrying mark A can be sent.
The Operational Visit message sent for terminal device, load-balancing device can intercept the Operational Visit message, And by identifying the ISP1 networks at the place of Sina's mailbox server 1 corresponding to A, Operational Visit message is sent to Sina's mailbox clothes Business device 1.So, Sina's mailbox server 1 is receiving Operational Visit message, and after carrying out relevant treatment to it, passes through load Balancing equipment returns to service response message to terminal device.It is by loading due to access of this terminal device to Sina's business Balancing equipment has been transmitted to response time most fast Sina's mailbox server and handled after above-mentioned processing, therefore, uses The user of terminal device receives related service reply quickly, improves Consumer's Experience.
Further, in embodiments of the present invention, after load-balancing device performs step 301, if inquiring local Without record domain-name information in preset dns address table, in this case, as shown in figure 4, the Operational Visit method also includes Following steps:
Step 401, dns server of the load-balancing device out of ISP network that interacted with itself obtains domain-name information pair The server identification answered.
In this step, above-mentioned server identification is specifically including but not limited to:The IP address (i.e. public network IP address) of server; Wherein, the IP address can be IPv4 addresses or IPv6 addresses.
Load-balancing device utilizes domain-name information (email.sina.com.cn) the inquiry DNS carried in DNS request message After address table, if not recording the domain-name information in dns address table, i.e., there is no recording domain in the dns address table shown in table 1 Name information (email.sina.com.cn), then load-balancing device need DNS service out of ISP network that interacted with itself Device obtains server identification corresponding to domain-name information.Such as:Dns server 1 of the load-balancing device out of ISP1 networks obtains domain Server identification corresponding to name information (email.sina.com.cn) is mark A, and the dns server 2 out of ISP2 networks obtains Server identification corresponding to domain-name information (email.sina.com.cn) is taken as mark B.
In the embodiment of the present invention, dns server of the load-balancing device out of ISP network that interacted with itself obtains domain name Server identification corresponding to information, is specifically including but not limited to following manner:Load-balancing device by DNS request message send to The dns server in ISP network interacted with itself, and the DNS response messages that dns server corresponding to reception returns, and should The server identification obtained after dns server parsing DNS request message corresponding to being carried in DNS response messages.
Specifically, load-balancing device respectively sends DNS request message to the dns server 1 in ISP1 networks, and Dns server 2 in ISP2 networks.Dns server 1 is to the domain-name information that is carried in DNS request message (email.sina.com.cn) parsed, obtain domain-name information (email.sina.com.cn) corresponding to server identification be A is identified, and load-balancing device is returned to by A is identified by DNS response messages.Dns server 2 in DNS request message to taking The domain-name information (email.sina.com.cn) of band is parsed, and is obtained corresponding to domain-name information (email.sina.com.cn) Server identification is mark B, and returns to load-balancing device by B is identified by DNS response messages.
Further, load-balancing device receives the DNS response messages from dns server 1, obtains domain-name information (email.sina.com.cn) server identification corresponding to is mark A, and receives the DNS response messages from dns server 2, Server identification corresponding to domain-name information (email.sina.com.cn) is obtained as mark B.Based on this, load-balancing device obtains The server identification got differs.
Step 402, if the server identification got differs, dns address section of the load-balancing device from local One unappropriated dns address of middle selection, and the dns address is carried and is sent to terminal device in DNS response messages.
Load-balancing device is respectively to mark obtaining server identification corresponding to domain-name information (email.sina.com.cn) After knowing A and mark B, learn that server identification differs, now, selection one is unoccupied from the dns address section of local Dns address 1, and dns address 1 can be sent to by corresponding terminal device by DNS response messages.
It should be noted that load-balancing device can be pre-configured with dns address section (generally private network IP address, by user Manual configuration), for the dns address in dns address section, if the dns address is occupied, identify the dns address by Take;For occupied dns address, if the dns address is released, it is occupied to remove the dns address Mark.Based on this, load-balancing device can select unappropriated dns address from dns address section.
Further, in the embodiment of the present invention, load-balancing device selection one from the dns address section of local is not occupied After dns address, also domain-name information, dns address and the clothes got are recorded in local preset DNS contingency tables Corresponding relation between device mark of being engaged in, to be used during subsequent treatment Operational Visit message.As shown in table 2, to have recorded domain name A kind of example of the DNS contingency tables of corresponding relation between information, dns address, server identification.
Table 2
Herein, for load-balancing device, why to select a unappropriated dns address and carry In DNS response messages, it is primarily due to, the terminal device in system is only capable of identifying an IP address in response message, so One, in the case where load-balancing device obtains multiple server identifications (i.e. the public network IP address of server), if all Carry in DNS response messages, terminal device subsequently can not be identified all, and then can not determine response time most short service Device.Based on this, load-balancing device is corresponding with multiple server identifications of acquisition by it using one dns address of selection Mode, it is easy to subsequently to find out response time most short server.
Further, in embodiments of the present invention, can be in time according to network change for the ease of load-balancing device Dns server mark is updated, load-balancing device sets this ageing time recorded in the DNS contingency tables shown in table 2.Base In this, since the generation time of DNS contingency tables, when the time existing for the DNS contingency tables exceeding the ageing time, by loading Balancing equipment actively deletes this record.Herein, the network that specific ageing time can be by load-balancing device according to reality Situation is set.
Step 403, load-balancing device is receiving the Operational Visit message for carrying dns address from terminal device When, server identification corresponding to the dns address is inquired about from DNS contingency tables, by Operational Visit message copy as quantity with it is corresponding Server identification quantity identical Operational Visit message, and respectively by each Operational Visit message dns address change After corresponding server identification, it is sent to correspondingly by the ISP network where server corresponding to corresponding server identification Server, receive first service response message is sent to terminal device.
Specifically, when terminal device receive the DNS response messages for carrying dns address 1 from load-balancing device it Afterwards, terminal device, which is known, itself is able to access that Sina's mailbox server corresponding to dns address 1, and so, terminal device needs at itself When accessing Sina's mailbox server, the Operational Visit message for carrying dns address 1 can be sent to load-balancing device.
Load-balancing device is receiving Operational Visit message (the i.e. purpose of Operational Visit message that carries dns address 1 Address is dns address 1) when, because dns address 1 is the dns address in the local dns address section of load-balancing device, thus it is negative Carry balancing equipment and determine that the destination address of the Operational Visit message is the address of this load-balancing device, now, load balancing is set It is standby to need that the Operational Visit message is handled as follows:
DNS contingency table of the load-balancing device shown in by the inquiry table 2 of dns address 1, DNS is inquired from DNS contingency tables Server identification corresponding to address 1 is respectively to identify A and mark B.Now, load-balancing device replicates 1 part of Operational Visit report again Text, afterwards, the dns address in a copy of it Operational Visit message is changed to identify A, and by identifying Sina's postal corresponding to A ISP1 networks where case server 1 are sent to Sina's mailbox server 1;By the dns address in another Operational Visit message It is changed to identify B, and Sina's mailbox service is sent to by the ISP2 networks where identifying Sina's mailbox server 2 corresponding to B Device 2.
So, Sina's mailbox server 1 and Sina's mailbox server 2 are receiving corresponding Operational Visit message and are passing through phase After the processing of pass, service response message is returned to terminal device.Based on this, load-balancing device can intercept Sina's mailbox clothes The service response message that business device 1 and Sina's mailbox server 2 return.
If load-balancing device first intercepts the service response message of the return of Sina's mailbox server 1, illustrate first Individual service response message comes from Sina's mailbox server 1, and now, load-balancing device is by the industry from Sina's mailbox server 1 Business response message is sent to corresponding terminal device, and deletes the service response message from Sina's mailbox server 2.It is if negative The service response message that balancing equipment first intercepts the return of Sina's mailbox server 2 is carried, then illustrates first service response message For from Sina's mailbox server 2, now, load-balancing device sends out the service response message from Sina's mailbox server 2 Corresponding terminal device is given, and deletes the service response message from Sina's mailbox server 1.
Further, in embodiments of the present invention, load-balancing device has performed first service response that will be received Message is sent to after the operation of terminal device, also to be emptied domain-name information in DNS contingency tables, dns address and be got Corresponding relation between server identification, to avoid the information that network provides when changing inaccurate.That is, load-balancing device Empty the correspondence between the email.sina.com.cn recorded in the DNS contingency tables shown in table 2, dns address, mark A, mark B Relation.
At the same time, load-balancing device will also record domain-name information (email.sina.com.cn) in dns address table (mark of the most fast server of Sina's mailbox service, example are responded with the origin server mark of first service response message Such as identify A) between corresponding relation (as shown in table 1).
It should be noted that in embodiments of the present invention, it can be become in time according to network for the ease of load-balancing device Change and determine optimal ISP links, improve Consumer's Experience, load-balancing device sets this to remember in the dns address table shown in table 1 The ageing time of record.Based on this, for the domain-name information (such as email.sina.com.cn) in dns address table, if load is equal Weighing apparatus equipment receives the DNS request message of the domain-name information, then the ageing time in load-balancing device renewal dns address table;Such as Fruit load-balancing device does not receive the DNS request message of the domain-name information, then set by load balancing before ageing time time-out Standby actively delete records corresponding to the domain-name information.
Or for the domain-name information (such as email.sina.com.cn) in dns address table, no matter load-balancing device Whether the DNS request message of the domain-name information is received, load-balancing device will not update the ageing time in dns address table, Until during the ageing time time-out, record corresponding to the domain-name information is actively deleted as load-balancing device.Herein, specifically Ageing time can be set by load-balancing device according to the network condition of reality.
For example, load-balancing device is 8:Determine that Sina's mailbox server 1 responds most fast (as shown in table 1) when 00, it is false If the ageing time of record is 2 hours corresponding to above-mentioned domain-name information, then, for the terminal device in system, only Will be 10:Sina's mailbox service is accessed before 00, load-balancing device can allow Sina's mailbox server 1 to carry out phase according to table 1 Close response;If some terminal device is 10:30 access Sina mailbox services, now, record corresponding to the domain-name information because Ageing time is overtime and is deleted, and load-balancing device needs to re-execute above-mentioned steps 401- steps 403, to determine response most Fast server, it is assumed that it is determined that Sina's mailbox server 2, dns address table now is as shown in table 3 below, then, 12: Sina's mailbox service is accessed before 00, load-balancing device can allow Sina's mailbox server 2 to carry out relevant response according to table 3.
Table 3
Domain-name information Server identification
email.sina.com.cn Identify B
That is, after load-balancing device execution step 301, it is possible to inquire local preset dns address table In without record domain-name information, then, in this case, why without this domain-name information in dns address table, be in fact divided into Two following situations:
The first situation, load-balancing device is before the DNS request message for carrying this domain-name information is received, in system There is no any terminal device to send this DNS request message.That is, the DNS request message for carrying this domain-name information is currently sent Terminal device be it is first access this domain-name information corresponding to business terminal device.
Second case, load-balancing device have been received by before the DNS request message for carrying this domain-name information is received What the terminal device (terminal device for including this currently transmitted DNS request message) crossed in system was sent carries this domain-name information DNS request message, and by perform above-mentioned steps 401- steps 403 assist the terminal device complete corresponding to this domain-name information Operational Visit, simply, when receiving this DNS request message, record corresponding to this domain-name information has been born because of ageing time time-out Balancing equipment is carried to delete.
It should be noted that no matter under above-mentioned any situation, load-balancing device is intended to continue executing with above-mentioned steps 401- steps 403.
Further, in embodiments of the present invention, after load-balancing device performs above-mentioned steps 401, if obtained The server identification arrived is identical, then performs following flows:Server identification is sent to terminal device by load-balancing device, and When receiving the Operational Visit message for carrying server identification from terminal device, ISP chains are determined according to existing configuration strategy Road, Operational Visit message is sent to corresponding server by the ISP links determined, and self-corresponding server in the future Service response message is sent to terminal device.
That is, if the server identification got is identical, illustrate that only one Sina's mailbox of deployment takes in network Be engaged in device, now, load-balancing device can from the DNS response messages received optional one be sent to terminal device, the DNS The server identification (being assumed to be mark A) of Sina's mailbox server is carried in response message.Mark is carried when terminal device receives After the DNS response messages for knowing A, terminal device, which is known, itself is able to access that Sina's mailbox server corresponding to mark A, follow-up whole When end equipment needs to access Sina's mailbox service of Sina's mailbox server, it can be sent to load-balancing device and carry mark A Operational Visit message.
The follow-up Operational Visit message sent for terminal device, after load-balancing device is intercepted and captured, according to being pre-configured with Strategy select ISP link (assuming that selection ISP links 2) from two ISP links, and by the ISP links 2 by business Access message and be sent to Sina's mailbox server.So, Sina's mailbox server is receiving Operational Visit message, and it is carried out After relevant treatment, service response message is returned to terminal device by load-balancing device.
Based on above-mentioned technical proposal, in the embodiment of the present invention, when disposing identical services function in different ISP networks During server, no matter which kind of business terminal device accesses in which period, load-balancing device can allow response most fast The provided business service of server, i.e. load-balancing device by above-mentioned handling process can decision-making go out optimal ISP links, And then improve Consumer's Experience.
Based on the inventive concept same with the above method, a kind of load-balancing device is additionally provided in the embodiment of the present invention, Applied in the system including at least one terminal device, load-balancing device and at least two servers, load-balancing device Respectively by ISP's ISP network and each server interaction, as shown in figure 5, load-balancing device specifically wraps Include:
Enquiry module 11, for when receiving the domain name system DNS request message from any terminal equipment, utilizing The local preset dns address table of the dns query message carried in DNS request message;
Sending module 12, when having domain-name information for being recorded in inquiring dns address table in enquiry module 11, by DNS Server identification corresponding to domain-name information is sent to the terminal device in the table of location;Receiving carrying from the terminal device During the Operational Visit message of server identification, it is sent to by the ISP network where server corresponding to server identification Corresponding server, and the service response message from corresponding server is sent to the terminal device.
Load-balancing device also includes:Acquisition module 13, in enquiry module 11 using DNS request message in carry Dns query message is locally after preset dns address table, if enquiry module 11, which is inquired in dns address table, does not have recording domain Name information, then dns server out of ISP network that interacted with load-balancing device obtain the corresponding server mark of domain-name information Know;
Sending module 12, it is additionally operable to, when the server identification that acquisition module 13 is got differs, set from load balancing A unappropriated dns address is selected in standby local dns address section, dns address is carried and sent in DNS response messages Give the terminal device;
Load-balancing device includes:Memory module 14, for recorded in local preset DNS contingency tables domain-name information, Correspondence between the server identification that the dns address and acquisition module 13 that sending module 12 selects from dns address section are got Relation;
Enquiry module 11, it is additionally operable to receiving the Operational Visit message for carrying dns address from the terminal device When, server identification corresponding to dns address is inquired about from DNS contingency tables;
Sending module 12, it is additionally operable to Operational Visit message copying as quantity identical with the quantity of corresponding server identification Operational Visit message, respectively by the dns address in each Operational Visit message be converted to corresponding to after server identification, pass through ISP network corresponding to corresponding server identification where server is sent to corresponding server, and will receive first Individual service response message is sent to the terminal device.
Acquisition module 13, specifically for DNS request message is sent to the ISP network interacted with load-balancing device itself Interior dns server;
The DNS response messages that dns server corresponding to reception returns, corresponding DNS service is carried in DNS response messages The server identification obtained after device parsing DNS request message.
Load-balancing device also includes:Maintenance module 15, for ringing receive first business in sending module 12 Answer message to be sent to after the terminal device, empty domain-name information in DNS contingency tables, dns address and the server got Corresponding relation between mark, and the source service of record domain-name information and first service response message in dns address table Corresponding relation between device mark.
In the embodiment of the present invention, the server identification that sending module 12 is sent to the terminal device specifically includes:Server IP address;Wherein, the IP address is IPv4 addresses or IPv6 addresses.
Wherein, the modules of apparatus of the present invention can be integrated in one, and can also be deployed separately.Above-mentioned module can close And be a module, multiple submodule can also be further split into.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by Software adds the mode of required general hardware platform to realize, naturally it is also possible to which by hardware, but the former is more in many cases Good embodiment.Based on such understanding, what technical scheme substantially contributed to prior art in other words Part can be embodied in the form of software product, and the computer software product is stored in a storage medium, if including It is dry to instruct to cause a computer equipment (be personal computer, server, or network equipment etc.) to perform this hair Method described in bright each embodiment.It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, Module or flow in accompanying drawing are not necessarily implemented necessary to the present invention.It will be appreciated by those skilled in the art that in embodiment Device in module can according to embodiment describe be distributed in the device of embodiment, respective change position can also be carried out In one or more devices different from the present embodiment.The module of above-described embodiment can be merged into a module, can also It is further split into multiple submodule.The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.With Several specific embodiments of the upper disclosed only present invention, still, the present invention is not limited to this, any those skilled in the art Member can think of change should all fall into protection scope of the present invention.

Claims (8)

  1. A kind of 1. Operational Visit method, it is characterised in that this method be applied to include at least one terminal device, load balancing is set In standby and at least two servers systems, the load-balancing device respectively by ISP's ISP network with Each server interaction, methods described include:
    The load-balancing device is when receiving the domain name system DNS request message from any terminal equipment, using described The local preset dns address table of the dns query message carried in DNS request message;
    It is if record has the domain-name information in the dns address table, domain-name information described in the dns address table is corresponding Server identification be sent to the terminal device;
    When receiving the Operational Visit message for carrying the server identification from the terminal device, it is passed through described ISP network where server corresponding to server identification is sent to corresponding server, and by the industry from corresponding server Business response message is sent to the terminal device;
    Wherein, the load-balancing device utilizes the locally preset DNS of the dns query message that carries in the DNS request message After address table, in addition to:
    If without record domain name information in the dns address table, the load-balancing device with itself from interacting Dns server in ISP network obtains server identification corresponding to domain name information;
    If the server identification that the load-balancing device is got from different dns servers differs, the load Balancing equipment selects a unappropriated dns address from the dns address section of local, and the dns address is carried and rung in DNS Answer and the terminal device is sent in message, and in local preset DNS contingency tables with recording domain name information, the DNS Corresponding relation between location and the server identification got;
    When receiving the Operational Visit message for carrying the dns address from the terminal device, from the DNS contingency tables Server identification corresponding to the middle inquiry dns address, quantity and corresponding server are copied as by the Operational Visit message The quantity identical Operational Visit message of mark;
    After the dns address in each Operational Visit message is converted into corresponding server identification respectively, pass through corresponding service ISP network corresponding to device mark where server is sent to corresponding server, and by receive first service response Message is sent to the terminal device.
  2. 2. the method as described in claim 1, it is characterised in that the load-balancing device is from the ISP network interacted with itself Interior dns server obtains server identification corresponding to domain name information, including:
    The load-balancing device sends the DNS request message to the dns server in the ISP network interacted with itself;
    The DNS response messages that dns server corresponding to reception returns, corresponding DNS service is carried in the DNS response messages Device parses the server identification obtained after the DNS request message.
  3. 3. method as claimed in claim 1 or 2, it is characterised in that the load-balancing device is by receive first industry Business response message is sent to after the terminal device, and methods described also includes:
    The load-balancing device empties domain-name information described in the DNS contingency tables, the dns address and got Corresponding relation between server identification;
    Domain name information is recorded in the dns address table and the origin server of first service response message identifies Between corresponding relation.
  4. 4. the method as described in claim 1, it is characterised in that the server identification specifically includes:
    The IP address of server;Wherein, the IP address is IPv4 addresses or IPv6 addresses.
  5. 5. a kind of load-balancing device, it is characterised in that applied to including at least one terminal device, the load-balancing device In the system of at least two servers, the load-balancing device respectively by ISP's ISP network with it is every Individual server interaction, the load-balancing device specifically include:
    Enquiry module, for when receiving the domain name system DNS request message from any terminal equipment, utilizing the DNS The local preset dns address table of the dns query message carried in request message;
    Sending module, when having the domain-name information for being recorded in inquiring the dns address table in the enquiry module, by institute State server identification corresponding to domain-name information described in dns address table and be sent to the terminal device;
    When receiving the Operational Visit message for carrying the server identification from the terminal device, it is passed through described ISP network where server corresponding to server identification is sent to corresponding server, and by the industry from corresponding server Business response message is sent to the terminal device;
    Wherein, the load-balancing device also includes:Acquisition module, for utilizing the DNS request report in the enquiry module The dns query message carried in text is locally after preset dns address table, if the enquiry module is with inquiring the DNS Without domain name information is recorded in the table of location, then the dns server out of ISP network that interacted with the load-balancing device obtains Take server identification corresponding to domain name information;
    The sending module, it is additionally operable to the server identification that is got in the acquisition module from different dns servers not phase Meanwhile a unappropriated dns address is selected from the local dns address section of the load-balancing device, by the DNS Location carries and the terminal device is sent in DNS response messages;
    The load-balancing device also includes:Memory module, for recording domain name letter in local preset DNS contingency tables The server mark that the dns address and the acquisition module that breath, the sending module select from dns address section are got Corresponding relation between knowledge;
    The enquiry module, it is additionally operable to receiving the Operational Visit report for carrying the dns address from the terminal device Wen Shi, server identification corresponding to the dns address is inquired about from DNS contingency tables;
    The sending module, it is additionally operable to the Operational Visit message copying as quantity phase of the quantity with corresponding server identification Same Operational Visit message, after the dns address in each Operational Visit message is converted into corresponding server identification respectively, lead to Cross the ISP network corresponding to corresponding server identification where server and be sent to corresponding server, and will receive One service response message is sent to the terminal device.
  6. 6. load-balancing device as claimed in claim 5, it is characterised in that
    The acquisition module, specifically for the DNS request message is sent to itself interacting with the load-balancing device Dns server in ISP network;
    The DNS response messages that dns server corresponding to reception returns, corresponding DNS service is carried in the DNS response messages Device parses the server identification obtained after the DNS request message.
  7. 7. the load-balancing device as described in claim 5 or 6, it is characterised in that also include:
    Maintenance module, for the sending module by receive first service response message be sent to the terminal device it Afterwards, pair between domain-name information described in the DNS contingency tables, the dns address and the server identification that gets is emptied It should be related to, and domain name information and the source service of first service response message are recorded in the dns address table Corresponding relation between device mark.
  8. 8. load-balancing device as claimed in claim 5, it is characterised in that the sending module is sent to the terminal device Server identification specifically includes:The IP address of server;Wherein, the IP address is IPv4 addresses or IPv6 addresses.
CN201410311856.0A 2014-07-01 2014-07-01 A kind of Operational Visit method and apparatus Active CN104092751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410311856.0A CN104092751B (en) 2014-07-01 2014-07-01 A kind of Operational Visit method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410311856.0A CN104092751B (en) 2014-07-01 2014-07-01 A kind of Operational Visit method and apparatus

Publications (2)

Publication Number Publication Date
CN104092751A CN104092751A (en) 2014-10-08
CN104092751B true CN104092751B (en) 2017-11-17

Family

ID=51640431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410311856.0A Active CN104092751B (en) 2014-07-01 2014-07-01 A kind of Operational Visit method and apparatus

Country Status (1)

Country Link
CN (1) CN104092751B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320353B (en) * 2014-11-19 2018-10-12 中国联合网络通信集团有限公司 A kind of method and apparatus of station address management
CN107508760B (en) * 2017-09-20 2020-01-03 杭州安恒信息技术股份有限公司 Method for load distribution based on line source IP
CN113079504A (en) * 2021-03-23 2021-07-06 广州讯鸿网络技术有限公司 Method, device and system for realizing access of 5G message DM multi-load balancer
CN114363288A (en) * 2021-12-16 2022-04-15 北京华耀科技有限公司 Message processing method and device, link load balancing equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873358A (en) * 2010-06-11 2010-10-27 杭州华三通信技术有限公司 Method and device for balancing link load on basis of domain name resolution
CN102761476A (en) * 2012-03-30 2012-10-31 杭州华三通信技术有限公司 Load balancing method and device
CN103297347A (en) * 2013-05-15 2013-09-11 杭州华三通信技术有限公司 Load balance processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130820A (en) * 2010-01-14 2011-07-20 深圳市深信服电子科技有限公司 Network service access method and access gateway equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873358A (en) * 2010-06-11 2010-10-27 杭州华三通信技术有限公司 Method and device for balancing link load on basis of domain name resolution
CN102761476A (en) * 2012-03-30 2012-10-31 杭州华三通信技术有限公司 Load balancing method and device
CN103297347A (en) * 2013-05-15 2013-09-11 杭州华三通信技术有限公司 Load balance processing method and device

Also Published As

Publication number Publication date
CN104092751A (en) 2014-10-08

Similar Documents

Publication Publication Date Title
CN103401800B (en) A kind of balancing link load method and apparatus
US11218437B2 (en) Method for network traffic forwarding, request sending, and communication acceleration, forwarding server and node server
US20030009594A1 (en) Method and apparatus for identifying locale of internet users
CN101997768B (en) Method and device for uploading address resolution protocol messages
CN104243627A (en) Domain name resolution method, device and system
CN104092751B (en) A kind of Operational Visit method and apparatus
CN102783119A (en) Access control method and system, and access terminal
CN108848049A (en) Proxy Method and device, the storage medium and processor of domain name analysis system
CN110225150B (en) Method, system and storage medium for communication between different network protocols
CN105897947A (en) Network access method and device for mobile terminal
CN108667946B (en) Multi-domain name mutual backup analysis management method, device and system
CN108418780A (en) Filter method and device, system, the dns server of IP address
CN104954431A (en) Network selection method, device and system
CN104935653A (en) Bypass cache method for visiting hot spot resource and device
CN112583952B (en) Redirection scheduling processing method, device and system, related equipment and storage medium
CN102547553B (en) Method, system and device for accessing service based on wireless application protocol (WAP)
CN112235408A (en) Network system, reverse proxy method and reverse proxy server
CN107231445A (en) A kind of dynamic domain name system DNS reorientation methods, apparatus and system
CN102857547B (en) The method and apparatus of distributed caching
CN113315848A (en) Access control method, device and equipment
CN103581361A (en) Domain name resolution proxy method, device and system
US11683275B2 (en) Device and method for interconnecting two subnetworks
CN110708309A (en) Anti-crawler system and method
CN106888268A (en) A kind of analysis method and device of domain name
CN111901412B (en) Data processing method and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant