A DNS-based traffic balancing scheduling method, device and gateway equipment

By using a DNS-based multi-level traffic balancing scheduling method, the latency and blocking problems caused by traffic mismatch are solved, and balanced distribution and efficient access are achieved on links of different operators.

CN115835300BActive Publication Date: 2026-01-16INTERNET DOMAIN NAME SYST BEIJING ENG RES CENT
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211372048.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2026-01-16
Estimated Expiration
2042-11-03

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively address issues such as excessive latency caused by mismatched destination IP carriers and abnormal traffic blocking caused by asymmetric routing. Furthermore, conventional load balancing ignores the carrier type of traffic, resulting in uneven traffic distribution.

Method used

By using a DNS-based traffic balancing scheduling method and a multi-level processing mechanism, the initial balancing scheduling of DNS request packets is first performed, followed by secondary adjustments based on the DNS response results, and routing is performed through ISP routing to ensure that traffic is processed on the same operator's link and avoids blocking by cross-operator firewalls.

Benefits of technology

It achieves balanced distribution of traffic across different carrier links, avoids cross-carrier firewall blocking, reduces access latency caused by asymmetric routing, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115835300B_ABST
    Figure CN115835300B_ABST
Patent Text Reader

Abstract

The application discloses a DNS-based traffic balancing scheduling method and device and a gateway device. The application divides the balancing scheduling of traffic and the forwarding of the home operator into multiple levels, and no longer performs load balancing processing on all traffic, but only indirectly schedules the traffic around DNS; the first level directly performs balancing scheduling on DNS request messages; the second level performs feedback correction, and according to a DNS response result, performs secondary traffic balancing correction; and the third level performs routing through ISP routing, so that the traffic is processed only in the service operator; thus, under the premise that the user traffic does not cross operators, the traffic can be more evenly distributed to different operator outlets, the traffic can be prevented from being blocked by the firewall of the cross-operator, and the problem of denial of service of the line of some operators to the outside caused by uneven traffic can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of network security, in particular to a network traffic equalization scheduling method and device and gateway equipment. BACKGROUND

[0002] Some multi-branch enterprises nowadays often deploy multiple operator networks such as China Mobile, China Unicom and China Telecom at the export part to ensure the reliability and stability of the network (production and office networks).

[0003] In terms of reliability, when the mobile network is congested or even unavailable due to attacks or excessive user volume, the business access can be ensured to be normal through the networks of China Telecom or China Unicom.

[0004] In terms of stability, the traffic is usually evenly dispersed to each operator through load balancing, on the one hand to reuse the bandwidth of each operator line to reduce costs, and on the other hand to reduce the occurrence of denial of service due to excessive traffic on part of the line.

[0005] The current status of conventional load balancing is that the export gateway (router or firewall) of an enterprise often only supports: round robin balancing, static hash balancing based on IP address or port number, proportional balancing based on routing weight, and dynamic load balancing based on link quality under some SD-WAN solutions. For example:

[0006] Patent document CN103401800A discloses a link load balancing method and device, which includes: a load balancing device receiving a DNS request message, requesting a first type of IP address of an external server from a DNS server, and requesting a second type of IP address of the external server from the DNS server; the load balancing device records the correspondence between the first type of IP address of the external server and the second type of IP address of the external server in an equivalent service table; the load balancing device receives a service request message, the destination IP address of which is the first type of IP address of the external server; when the second type of IP address corresponding to the first type of IP address of the external server is in the equivalent service table, the load balancing device selects an ISP link from the ISP link based on the first type of IP address and the ISP link based on the second type of IP address. The essence of this scheme is to realize load balancing between the ISP link based on the IPv4 address and the ISP link based on the IPv6 address.

[0007] Patent document CN105592181A discloses a link load balancing method and device, the method comprising: when the load balancing device receives a DNS response message sent by a DNS server, and the DNS response message is a message for replying to the IP address corresponding to the domain name requested by the DNS request message, obtaining the domain name carried in the DNS response message; judging whether the domain name matches a pre-configured specific domain name; if yes, generating a dynamic table item; wherein the dynamic table item includes the IP address corresponding to the domain name carried by the DNS response message; when receiving a data message sent by a user terminal, querying the dynamic table item according to the destination IP address of the data message; if there is an IP address same as the destination IP address of the data message in the dynamic table item, forwarding the data message through the specific link. The essence of this scheme is to perform traffic balancing based on domain names.

[0008] Patent document CN105577843A discloses a link load balancing system based on a multi-strategy DNS proxy, comprising at least two DNS servers provided by ISPs and an internal DNS proxy server, wherein the internal DNS proxy server comprises a user input / output module, a domain name matching module, a source network segment matching module, a normal / weighted round-robin module, a proxy execution module, etc. The essence of this scheme is a DNS proxy.

[0009] The above load balancing methods can solve the traffic sharing problem in certain scenarios. However, the inventors realize that the prior art does not balance based on the destination IP operator of the message or does not control the destination IP operator of the traffic, which leads to a mismatch between the actual traffic of the user and the line operator, resulting in excessive traffic delay and abnormal blocking of traffic caused by asymmetric routing. A possible solution is to use ISP routing to guide the flow, but ISP routing is only a basic operator routing and cannot perform traffic balancing scheduling.

[0010] Therefore, simply relying on ISP routing for message routing or using conventional load balancing processing does not have too many problems when the traffic is not congested. However, pure ISP routing can lead to very uneven traffic distribution, such as the extreme case where most of the traffic goes through China Telecom, which can cause a significant decrease in the access experience of users based on China Telecom's servers or even make them unusable. Conventional load balancing processing can distribute traffic evenly to each line, but it ignores the operator type of the traffic, which can cause mobile traffic to be distributed to China Telecom, resulting in the phenomenon of asymmetric routing where the request message goes through China Telecom, but the response message goes through mobile, which is easily blocked by the firewall device of the operator or enterprise, and the delay is greatly increased. Even if the asymmetric routing phenomenon does not occur, cross-operator access can also have a large access delay problem. SUMMARY

[0011] The application provides a DNS-based traffic balancing scheduling method, device and gateway equipment, which can avoid traffic being blocked by cross-operator firewalls and solve the problem of denial of service of some operator lines to the outside caused by uneven traffic.

[0012] To achieve the above object, the application provides the following solutions:

[0013] In a first aspect, a DNS-based traffic balancing scheduling method comprises:

[0014] Step 1) in response to a DNS query request of a user terminal to a service server, initial balancing scheduling is performed based on links of multiple network operators, and a request message is sent to a DNS server;

[0015] Step 2) an answer message returned by the DNS server is received, and a DNS answer result is checked; the DNS answer result is one or more IP addresses of the service server;

[0016] Step 3) according to attributes of the one or more IP addresses, an access priority order of the IP addresses is determined according to the principle of giving priority to network operators to which the IP addresses of the service server belong and taking into account bandwidth utilization, and the access priority order is sent to the user terminal;

[0017] Step 4) in response to an access request of the user terminal to an IP address with the highest access priority, routing is performed based on ISP routing, so that user traffic goes through a corresponding network operator link for service access.

[0018] Optionally, step 1) specifically comprises: in response to a DNS query request of a user terminal to a service server, detecting current bandwidth utilization of each network operator link, forwarding a request message to a link with the lowest current bandwidth utilization, and sending the request message to a DNS server; the link with the lowest current bandwidth utilization is recorded as a first link; after the request message is sent to the DNS server, the DNS server detects the source of the request message, and if it is found that the message is sent from the first link, the DNS server preferentially returns an IP address corresponding to a network operator to which the first link belongs (and does not return other IP addresses); if the service server does not have an IP address corresponding to the network operator to which the first link belongs, or the DNS server does not support static proximity, all other IP addresses recorded by the DNS server are directly returned.

[0019] Further optionally, in step 3), the access priority order of the IP addresses is determined according to the principle of giving priority to network operators to which the IP addresses of the service server belong and taking into account bandwidth utilization, specifically comprising:

[0020] If the DNS response result is an IP address or contains an IP address corresponding to the network operator to which the first link belongs, the received DNS response result is directly used as the access priority sorting for the IP address.

[0021] If the DNS response result is multiple other IP addresses, and none of these other IP addresses correspond to the IP addresses of the network operator to which the first link belongs, then the received DNS response result is modified: the multiple other IP addresses are sorted according to the bandwidth utilization of the link, and the IP address corresponding to the link with the lowest bandwidth utilization is the IP address with the highest access priority; the modified DNS response result is used as the access priority sort for the IP addresses.

[0022] Alternatively, the detection of the current bandwidth utilization of each network operator's link is achieved by configuring a link detection unit on the egress gateway.

[0023] Optionally, step 1) can be further modified to: In response to the DNS query request from the user terminal to the business server, the request packets are forwarded in a round-robin fashion.

[0024] Further optionally, in step 3), determining the access priority of IP addresses according to the principle of prioritizing the network operator to which the service server IP address belongs, while also considering bandwidth utilization, specifically includes:

[0025] If the DNS response result is an IP address, then that IP address is the only IP address that the user can access, and the access priority of the IP address is directly sorted based on the received DNS response result.

[0026] If the DNS response result is multiple IP addresses, then modify the received DNS response result: sort the multiple IP addresses according to the current traffic rate of the corresponding interface of each link obtained in real time by the gateway device, and the IP address corresponding to the link with the highest current traffic rate is the IP address with the highest access priority; use the modified DNS response result as the access priority sorting of the IP addresses.

[0027] Secondly, a DNS-based traffic balancing and scheduling device includes the following program modules:

[0028] The primary load balancing module is used to respond to DNS query requests from user terminals to service servers, perform initial load balancing based on links from multiple network operators, and deliver the request packets to the DNS server.

[0029] The response message query module is configured to receive a DNS server returned response message and check a DNS response result, wherein the DNS response result is one or more IP addresses of the service server;

[0030] The secondary equalization scheduling module is configured to determine an access priority order of the IP addresses according to attributes of the one or more IP addresses, according to the principle of giving priority to network operators to which the service server IP addresses belong and taking into account bandwidth utilization, and send the access priority order to the user terminal;

[0031] The tertiary equalization scheduling module is configured to respond to an access request of the user terminal to the IP address with the highest access priority, perform routing based on ISP routing, and make the user traffic pass through a corresponding network operator link for service access.

[0032] In a third aspect, a gateway device includes a memory and a processor, and the memory stores a computer program, and the processor implements the steps of the DNS-based traffic equalization scheduling method when executing the computer program.

[0033] The present application has at least the following beneficial effects:

[0034] The present application processes traffic equalization scheduling and local operator forwarding in multiple stages, no longer performs load balancing processing on all traffic, but only indirectly schedules traffic around DNS; the first stage directly performs equalization scheduling on DNS request messages; the second stage performs feedback correction, performs secondary traffic equalization correction according to the DNS response result; and the third stage performs routing through ISP routing to process traffic only in the service operator; thereby, on the premise that user traffic does not cross operators, the traffic can be more evenly distributed to different operator exports, the traffic can be avoided to be blocked by the firewall of the cross-operator, and the problem of denial of service of part of the operator lines caused by uneven traffic can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 An application scenario schematic diagram of an embodiment of the present application;

[0036] Figure 2 A logical architecture based on multiple operator links provided by an embodiment of the present application;

[0037] Figure 3 A principle schematic diagram of a DNS-based traffic equalization scheduling method provided by an embodiment of the present application;

[0038] Figure 4 A running flow schematic diagram of a DNS-based traffic equalization scheduling method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0040] This application can be applied to, for example Figure 1 In the application scenario shown: a user logs in on client 1 (user terminal) and accesses business server 3 through gateway device 2. This also involves DNS server 4 providing domain name and corresponding IP address translation services. Client 1 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, wearable smart terminals, etc., and business server 3 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0041] This embodiment employs multi-layered processing of the user terminal's outbound DNS to guide the even distribution of traffic across various lines and strictly adheres to the forwarding procedures set by the ISP. The logic implementation of the solution is as follows: Figure 2 As shown.

[0042] To facilitate technical understanding, we will first explain some of the terms used:

[0043] Round-robin load balancing: This means that the gateway device selects one interface from multiple exit points in turn to forward the received packets.

[0044] 5-tuple load balancing: This includes flow-by-flow load balancing and user-by-user load balancing. Essentially, it performs a hash modulo operation on the IP address, port number, or protocol number of a packet to ensure that the same flow is always forwarded through a specific exit. When there are many flows, they will be distributed more evenly across multiple exit lines.

[0045] Weighted balancing involves assigning weights to multiple outbound lines, such as 1 for China Mobile and 3 for China Telecom, so that 1 / 4 of the traffic goes through China Mobile and 3 / 4 goes through China Telecom.

[0046] Traffic balancing based on line quality involves probing each outgoing line and selecting the link with the best current quality for packet forwarding. Quality can be measured by factors such as latest latency, minimum jitter, and minimum packet loss rate. Since the traffic volume of a line is inversely proportional to the link quality, the higher the traffic volume, the lower the link quality tends to be. If a line is allocated a lot of traffic because of its good link quality, the link quality will decrease due to the increased traffic, and subsequent traffic will be allocated to other lines. Therefore, it can achieve dynamic traffic balancing.

[0047] ISP routing: Because different operators are responsible for different IP network segments, the IP address belonging to which operator can be distinguished based on the IP network segment, and then the packet can be forwarded to the corresponding operator based on the network segment during routing lookup.

[0048] Bandwidth utilization: For an interface, such as a mobile broadband interface with a bandwidth of 200 Mbps, if the uplink and downlink traffic on the 40 Mbps link is 40 Mbps, the bandwidth utilization of the interface is 40 / 200 = 20%. Generally, the lower the bandwidth utilization, the better the link quality.

[0049] Static proximity: When a client queries the IP address of a web domain through DNS, the DNS server will return the IP address of the web domain closest to the user to the user terminal based on the source of the DNS query message. If the source IP of the DNS query message is from China Telecom, the IP of the web domain of China Telecom will be preferentially returned to the user terminal. If the source IP of the DNS query is from China Mobile, the IP of the web domain of China Mobile will be preferentially returned to the user terminal.

[0050] In one embodiment, as shown in Figure 3 , a DNS-based traffic balancing scheduling method is provided, including:

[0051] Step 1) In response to a DNS query request of a user terminal to a service server, an initial balancing scheduling is performed based on the links of multiple network operators, and the request message is sent to the DNS server;

[0052] Here, the initial balancing scheduling method is not limited, for example:

[0053] Detect the current bandwidth utilization of each network operator link, and forward the request message to the link with the lowest current bandwidth utilization to the DNS server; record the link with the lowest current bandwidth utilization as the first link; after the request message is sent to the DNS server, the DNS server detects the source of the request message. If it is found that the message is sent from the first link, the DNS server preferentially returns the IP address corresponding to the network operator of the first link (in the response result, the IP address is ranked first); if the service server does not have the IP address corresponding to the network operator of the first link, or the DNS server does not support static proximity, all other IP addresses recorded by the DNS server are directly returned.

[0054] The above detection of the current bandwidth utilization of each network operator link can be realized by configuring a link probe unit on the egress gateway.

[0055] Step 2) receiving the reply message returned by the DNS server, checking the DNS reply result; the DNS reply result is one or more IP addresses of the service server.

[0056] Step 3) according to the attribute of the one or more IP addresses, determining the access priority ranking of the IP addresses according to the principle of giving priority to the network operator to which the service server IP address belongs and taking into account the bandwidth utilization, and sending it to the user terminal.

[0057] Here, the principle of giving priority to the network operator to which the service server IP address belongs and taking into account the bandwidth utilization in determining the access priority ranking of the IP addresses is specifically as follows:

[0058] If the DNS reply result is one IP address or contains an IP address corresponding to the network operator to which the first link belongs, the received DNS reply result is directly taken as the access priority ranking of the IP address. Of course, if there is only one IP address, whether it is an IP address corresponding to the network operator to which the first link belongs or not, it will be the only IP address accessible to the user.

[0059] If the DNS reply result is a plurality of other IP addresses, none of which is an IP address corresponding to the network operator to which the first link belongs, the received DNS reply result is modified: the plurality of other IP addresses are ranked according to the bandwidth utilization of the link, wherein the IP address corresponding to the link with the lowest bandwidth utilization has the highest access priority; the modified DNS reply result is taken as the access priority ranking of the IP address.

[0060] Among the above-mentioned plurality of other IP addresses, they belong to one or more other network operators; and for these IP addresses, any network operator can provide one or more IP addresses. For example, if the network operator to which the first link belongs is China Telecom, the plurality of other IP addresses mentioned here can be the IP addresses corresponding to China Unicom and China Mobile; taking four IP addresses as an example, one IP address can correspond to China Unicom and three IP addresses can correspond to China Mobile, or two IP addresses can correspond to China Unicom and China Mobile respectively.

[0061] Of course, since the embodiment does not require link detection, i.e. there is no aforementioned first link with the lowest current bandwidth utilization, the DNS message can be directly balanced forwarded by using the conventional load balancing process, and the DNS response modification logic is adjusted accordingly. For example, in step 1), the DNS is balanced forwarded by using the polling method, and then the DNS response is received. The DNS response message record is sorted based on the current traffic rate of the line interface (generally, the gateway device records the traffic rate of the network interface in real time, and does not need to configure link detection). Specifically, in step 3), the access priority of the IP address is determined according to the principle of giving priority to the network operator to which the service server IP address belongs and taking into account the bandwidth utilization, and specific examples are as follows:

[0062] If the DNS response result is one IP address, the IP address is the only IP address accessible by the user, and the received DNS response result is directly used as the access priority of the IP address.

[0063] If the DNS response result is multiple IP addresses, the received DNS response result is modified: the multiple IP addresses are sorted according to the current traffic rate of the interface corresponding to each link obtained by the gateway device in real time, wherein the IP address corresponding to the link with the highest current traffic rate (i.e. the lowest bandwidth utilization) has the highest access priority. The modified DNS response result is used as the access priority of the IP address.

[0064] Step 4) In response to the user terminal's access request for the IP address with the highest access priority, the ISP route is used for routing, so that the user traffic goes through the corresponding network operator link for service access.

[0065] The embodiment divides the balanced scheduling of traffic and the forwarding of the current operator into multiple levels, and no longer performs load balancing on all traffic, but only indirectly schedules traffic around DNS. The first level directly balances the DNS request message, the second level performs feedback correction, and the third level uses ISP routing to route the traffic only in the service operator. Thus, under the premise that user traffic does not cross operators, the traffic can be more evenly distributed to different operator outlets, which can avoid the problem of traffic being blocked by the firewall across operators, and reduce the problem of denial of service by some operator lines due to uneven traffic.

[0066] The following is an example of a user accessing Baidu netdisk, as shown in Figure 4

[0067] 1. The link detection can be performed by configuring link detection on the export gateway to detect the bandwidth utilization of the link. ​

[0068] 2. The egress gateway dynamically routes DNS based on bandwidth utilization. For example, if China Telecom has the lowest bandwidth utilization, China Unicom has the second highest bandwidth utilization, and China Mobile has the highest bandwidth utilization, then when an internal network user sends a DNS domain name IP query request, the egress gateway will forward the DNS to China Telecom's line for forwarding.

[0069] 3. After the DNS message is sent to the DNS server, the server will check the source of the message. If it finds that the message was sent from China Telecom, the DNS server will first return the corresponding China Telecom IP address of Baidu Netdisk to the user terminal. If Baidu Netdisk does not have a China Telecom IP or the DNS server does not support static proximity, it will directly return other IPs known to the server to the user terminal.

[0070] 4. The outbound gateway's telecommunications line receives the DNS response result returned from the DNS server and checks the result. If the check finds that the DNS response result contains a telecommunications IP address or only returns one IP address, it skips to step 5 for processing. If the check finds that the DNS response message contains multiple IPs, but none of them are telecommunications IP addresses, for example, it returns one or two mobile IPs and one Unicom IP, then the outbound gateway will reorder the DNS query results according to the bandwidth utilization of the outbound gateway (assuming that among the multiple outbound gateways, telecommunications has the lowest bandwidth utilization, Unicom has the second highest bandwidth utilization, and mobile has the highest bandwidth utilization). The outbound gateway will place the Unicom IP in the first position of the DNS response record, and then place the other two mobile IP addresses in the later positions of the DNS response record.

[0071] 5. After the outbound gateway checks and processes the DNS response message, it will forward the DNS response message to the user terminal. The user terminal will select the IP address that ranks first in the DNS response as the IP address to access Baidu Netdisk. After that, the user terminal will access Baidu Netdisk using the IP address based on DNS resolution.

[0072] 6. When the egress gateway receives a user terminal's access to the Baidu Netdisk IP address, it selects a route based on the ISP's routing, directing the user's traffic to access the Baidu Netdisk service through the corresponding ISP.

[0073] This completes the DNS-based load balancing scheduling process. The above solution avoids cross-carrier traffic access and distributes traffic more evenly across different lines.

[0074] The method provided in this embodiment, when applied to a DNS recursive server, has the following advantages:

[0075] The previously inexplicable business problems no longer occur, such as the early encountered from the company more export office access to the company headquarters of the Unicom VPN network, which can be pinged, but the VPN service is not available, because the export business access is routed to the mobile operator, the firewall of the Unicom operator will block the connection from the mobile to initiate a vpn connection request and then send a vpn response from the Unicom, and there is no problem with direct access through Unicom;

[0076] Normal online traffic can be evenly distributed to each operator line.

[0077] In one embodiment, a DNS-based traffic balancing scheduling device is also provided, comprising the following program modules:

[0078] The primary balancing scheduling module is configured to respond to a DNS query request of a user terminal for a service server, to perform initial balancing scheduling based on links of multiple network operators, and to send a request message to a DNS server;

[0079] The response message query module is configured to receive a response message returned by the DNS server and to check a DNS response result; the DNS response result is one or more IP addresses of the service server;

[0080] The secondary balancing scheduling module is configured to determine an access priority order of the IP addresses according to attributes of the one or more IP addresses, according to the principle of giving priority to network operators to which the service server IP addresses belong and taking into account bandwidth utilization, and to send the access priority order to the user terminal;

[0081] The tertiary balancing scheduling module is configured to respond to an access request of the user terminal for an IP address with the highest access priority, to perform routing based on ISP routing, and to make the user traffic pass through a corresponding network operator link for service access.

[0082] For specific implementation modes and optimizations of the DNS-based traffic balancing scheduling device, reference can be made to the introduction of the DNS-based traffic balancing scheduling method in the foregoing, which will not be described here again. Each module in the device can be stored in the memory of the computer device in the form of software, so as to call and execute the operations corresponding to each module by the processor.

[0083] In one embodiment, a gateway device is also provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the DNS-based traffic balancing scheduling method when executing the computer program.

[0084] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described, however, any combination of the technical features is considered to be within the scope of the present specification.

Claims

1. A DNS-based traffic load balancing scheduling method, characterized in that, The method comprises the following steps: Step 1) in response to a DNS query request of a user terminal to a service server, an initial balanced scheduling is performed based on links of multiple network operators to send a request message to a DNS server; Step 2) an answer message returned by the DNS server is received, and a DNS answer result is checked; the DNS answer result is one or more IP addresses of the service server; Step 3) according to attributes of the one or more IP addresses, an access priority order of the IP addresses is determined according to a principle of giving priority to network operators to which the IP addresses of the service server belong and taking into account bandwidth utilization, and the access priority order is sent to the user terminal; Step 4) in response to an access request of the user terminal to an IP address with the highest access priority, routing is performed based on ISP routing to make user traffic pass through a corresponding network operator link to access the service; Step 1) specifically comprises the following steps: in response to a DNS query request of a user terminal to a service server, current bandwidth utilization of each network operator link is detected, a request message is forwarded to a link with the lowest current bandwidth utilization to reach a DNS server; the link with the lowest current bandwidth utilization is recorded as a first link; after the request message reaches the DNS server, the DNS server detects the source of the request message; if it is found that the message is sent from the first link, the DNS server preferentially returns an IP address corresponding to a network operator to which the first link belongs; if the service server does not have an IP address corresponding to the network operator to which the first link belongs or the DNS server does not support static proximity, all other IP addresses recorded by the DNS server are directly returned; In step 3), the access priority order of the IP addresses is determined according to the principle of giving priority to network operators to which the IP addresses of the service server belong and taking into account bandwidth utilization, and specifically comprises the following steps: If the DNS answer result is one IP address or contains an IP address corresponding to the network operator to which the first link belongs, the received DNS answer result is directly taken as the access priority order of the IP address; If the DNS answer result is multiple other IP addresses, none of the multiple other IP addresses is an IP address corresponding to the network operator to which the first link belongs, the received DNS answer result is modified: the multiple other IP addresses are sorted according to bandwidth utilization of the links, wherein an IP address corresponding to a link with the lowest bandwidth utilization is an IP address with the highest access priority; the modified DNS answer result is taken as the access priority order of the IP address.

2. The DNS-based traffic load balancing scheduling method of claim 1, wherein, The detection of the current bandwidth utilization of each network operator link is achieved by configuring a link detection unit on an export gateway.

3. A DNS-based traffic load balancing and dispatching apparatus, characterized in that, The method comprises the following program modules: The primary balance scheduling module is configured to, in response to a DNS query request of a user terminal to a service server, perform initial balance scheduling based on links of multiple network operators, and send a request message to a DNS server. Specifically, in response to a DNS query request of a user terminal to a service server, the primary balance scheduling module detects current bandwidth utilization of each network operator link, forwards the request message to a link with the lowest current bandwidth utilization, and sends the request message to the DNS server. The link with the lowest current bandwidth utilization is referred to as a first link. After the request message is sent to the DNS server, the DNS server detects the source of the request message. If it is found that the message is sent from the first link, the DNS server preferentially returns an IP address corresponding to a network operator to which the first link belongs. If the service server does not have an IP address corresponding to the network operator to which the first link belongs, or the DNS server does not support static proximity, the DNS server directly returns all other IP addresses recorded by the DNS server. The response message query module is configured to receive a response message returned by the DNS server, and check a DNS response result. The DNS response result is one or more IP addresses of the service server. The secondary balance scheduling module is configured to, according to attributes of the one or more IP addresses, determine an access priority order of the IP addresses according to a principle of giving priority to a network operator to which an IP address of the service server belongs and taking bandwidth utilization into account, and send the access priority order to the user terminal. Specifically, if the DNS response result is one IP address or contains an IP address corresponding to the network operator to which the first link belongs, the access priority order of the IP address is directly taken as the received DNS response result. If the DNS response result is multiple other IP addresses, and none of the multiple other IP addresses is an IP address corresponding to the network operator to which the first link belongs, the received DNS response result is modified. The multiple other IP addresses are sorted according to bandwidth utilization of the links, wherein an IP address corresponding to a link with the lowest bandwidth utilization has the highest access priority. The modified DNS response result is taken as the access priority order of the IP addresses. The tertiary balance scheduling module is configured to, in response to an access request of the user terminal to an IP address with the highest access priority, perform routing based on ISP routing, and make the user traffic pass through a corresponding network operator link to access a service.

4. A gateway device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor implements the steps of the DNS-based traffic balance scheduling method of claim 1 or 2 when executing the computer program.

Citation Information

Patent Citations

  • Link load balancing method and link load balancing device

    CN103401800A

  • System and method for realizing link load balance based on multi-strategy DNS proxy

    CN105577843A

  • Link load balancing method and device

    CN105592181A

  • Router load balancing method based on policy routing, router equipment and system

    CN108040017A

  • Domain name resolution method and device

    CN108270881A