WO2012092765A1 - Domain name system and method thereof for providing load balancing - Google Patents

Domain name system and method thereof for providing load balancing Download PDF

Info

Publication number
WO2012092765A1
WO2012092765A1 PCT/CN2011/077923 CN2011077923W WO2012092765A1 WO 2012092765 A1 WO2012092765 A1 WO 2012092765A1 CN 2011077923 W CN2011077923 W CN 2011077923W WO 2012092765 A1 WO2012092765 A1 WO 2012092765A1
Authority
WO
WIPO (PCT)
Prior art keywords
dns
address
server
load value
load
Prior art date
Application number
PCT/CN2011/077923
Other languages
French (fr)
Chinese (zh)
Inventor
王亮
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012092765A1 publication Critical patent/WO2012092765A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer

Definitions

  • DNS can only provide a static-based load balancing mechanism. For example, if the DNS in the Ethernet is required to provide the load balancing function for the Baidu domain name, the load of the IE client accessing the Baidu website needs to be evenly distributed to the IP address corresponding to the Baidu domain name.
  • the main object of the present invention is to provide a DNS and a method for providing load balancing, which can implement dynamic load balancing of a network.
  • a domain name system DNS provides a method for load balancing, and the method includes:
  • the DNS After receiving the notification message sent by the IP address server corresponding to the domain name, the DNS queries the load value of the IP address server, and updates the load value of the IP address corresponding to the IP address server;
  • the method further includes: the DNS stores an IP address corresponding to the domain name and a load value of the IP address.
  • the notification message is sent to the DNS:
  • the IP address server corresponding to the same domain name calculates its current load value according to a preset period and the same load algorithm, and compares the calculated load value with the load value of its previous cycle, when the comparison result exceeds the preset valve. When the value is sent, a notification message is sent to the DNS.
  • the DNS querying the load value of the IP address server is:
  • a DNS server after receiving the update message, updating a load value of the IP address corresponding to the IP address server; after receiving the domain name query message sent by the DNS client, querying the IP address corresponding to the domain name, and The IP address with the lowest load value is returned to the DNS client.
  • the DNS server is specifically configured to store an IP address corresponding to the domain name and a load value of the IP address.
  • the dynamic load query module is specifically configured to send a DNS-DLQ message to the IP address server, and receive a DNS-DLQ response that is returned by the IP address server and includes a load value of the IP address server.
  • a domain name is configured with at least one IP address, and each IP address corresponds to an IP address server.
  • an IP address server in the IP address server group corresponding to the domain name detects that its own load value changes, Sending a notification message to the Dynamic Load Query Module (DLQM) of the DNS; wherein the notification message can use a standard DNS-notify message (refer to RFC1996);
  • DQM Dynamic Load Query Module
  • the dynamic load query module When receiving the notification message sent by any IP address server in the IP address server group, the dynamic load query module knows that the load value of the IP address server changes, and sends a query message to the IP address server to query the changed load value. After receiving the query message, the IP address server returns a response containing the load value of the IP address server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS DNS server.
  • the dynamic load query module uses an internal message to update the load value of the IP address and the IP address stored by the DNS server, and the internal message mainly includes the message ID and the IP address. And three parameters of the load value, wherein the IP address is the primary key;
  • the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, and QNAME is the IP to be queried. Address; DNS-DLQ response Based on the definition of RFC1035, NAME, TYPE, RDATA are added to the Answer structure, where NAME is the IP address, TYPE is DLQ, and RDATA is the load value; the definition of other parts meets the definition of RFC1035.
  • the DNS server of the DNS receives the domain sent by the DNS client. Name query message, find the IP address corresponding to the domain name, and read the load value of the IP address. When the IP address corresponding to the domain name is multiple, compare the load value of each IP address, and set the current load value to the most d, the IP address. The address is returned to the DNS client for the next step of the business.
  • the physical implementation of the DNS server and the dynamic load query module may be set on the same server or on multiple servers; the load value of the IP address and IP address stored by the DNS server may be saved in itself. Real-time updates in the cache area to save the overhead of the physical table, which has the structure of Table 1:
  • the IP Address is a 32-bit Internet address
  • the Load Value is a load value. It is a numeric parameter.
  • the load value corresponding to each IP address in the cache can be set to be the same. value.
  • the IP1 server periodically calculates its current load value according to a preset load algorithm, and when it detects that its own load value changes, sends a notification message to the dynamic load query module;
  • the load algorithm can be selected according to the needs of the user, for example For example, the CPU usage, memory usage, bandwidth and other parameters of the server can be weighted to obtain the load value of the server, etc.;
  • the notification message can use a standard DNS-notify message (refer to RFC1996);
  • Step 3 ⁇ 5 after receiving the notification message sent by the IP1 server, the dynamic load query module sends an inquiry message to the IP1 server; and receives a response message returned by the IP1 server, and notifies the DNS server to update the load value of the IP address as IP1;
  • the dynamic load query module learns that the load value of the IP1 server changes, and needs to re-query the load value of the IP1 server, so the query message is sent to the IP1 server; after receiving the query message, the IP1 server receives the query message. Returning a response containing the load value of the IP1 server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS server to update the stored IP address to the load value of IP1; here, the dynamic load The query module uses the internal message to update the IP address stored by the DNS server to the load value of the IP1.
  • the internal message mainly includes three parameters: a message ID, an IP address, and a load value, wherein the IP address is the primary key;
  • Step 6 ⁇ 7 after the IP2 server calculates a change in its own load value through a preset load algorithm, the notification message is sent to the dynamic load query module.
  • the dynamic load query module learns that the load value of the IP2 server changes, and needs to re-query the load value of the IP2 server, so the query message is sent to the IP2 server; after receiving the query message, the IP2 server receives the query message. Returning a response containing the load value of the IP2 server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS server to update the stored IP address to the IP2 load value; here, the dynamic load The query module uses internal messages to update the IP address stored by the DNS server to the load of IP2.
  • the internal message mainly includes three parameters: a message ID, an IP address, and a load value, where the IP address is a primary key;
  • the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, QNAME is IP2, and DNS-DLQ response is in RFC1035.
  • NAME, TYPE, and RDATA are added to the Answer structure, where NAME is IP2, TYPE is DLQ, and RDATA is the current load value of IP2; the definitions of other parts meet the definition of RFC1035.
  • the IP3 server periodically calculates its current load value according to a preset load algorithm, and sends a notification message to the dynamic load query module when detecting that its own load value changes;
  • the calculation period of the IP address server is set according to the actual needs and the network environment;
  • the load algorithm can be selected according to the needs of the user. For example, the CPU utilization, memory usage, bandwidth and other parameters of the server can be weighted to obtain the load of the server. Values, etc.; notification messages can use standard DNS-notify messages (refer to RFC1996);
  • Step 13 ⁇ 15 after receiving the notification message sent by the IP3 server, the dynamic load query module sends an inquiry message to the IP3 server; and receives a response message returned by the IP3 server to notify the DNS.
  • the server performs an update of the load value whose IP address is IP3;
  • the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, QNAME is IP3, and DNS-DLQ response is in RFC1035.
  • NAME, TYPE, and RDATA are added to the Answer structure, where NAME is IP3, TYPE is DLQ, and RDATA is the current load value of IP3; the definitions of other parts meet the definition of RFC1035.
  • Step 16 the DNS client sends a domain name query message to the DNS server according to the input of the user;
  • Step 17 after receiving the domain name query message, the DNS server queries the IP address configured in the local cache or the corresponding domain name in the database, and compares the load value of the IP address;
  • the DNS server first queries the IP address corresponding to the domain name according to the domain name; then queries the load value of each IP address, and compares it to obtain the IP address with the lowest current load value.
  • Step 18 Return the IP address with the lowest load value to the DNS client.
  • FIG. 3 is a schematic diagram showing the structure of a DNS providing load balancing system according to the present invention.
  • the DNS includes: a dynamic load query module 31 and a DNS server 32;
  • the dynamic load query module 31 is configured to: after receiving the notification message sent by the IP address server in the IP address server group corresponding to the domain name, query the load value of the IP address server, and send an update message; the DNS server 32, After receiving the update message, updating the load value of the IP address corresponding to the IP address server; after receiving the domain name query message sent by the DNS client, querying the IP address corresponding to the domain name, and minimizing the load value IP address is returned to the DNS client
  • the DNS server 32 is specifically configured to store an IP address corresponding to the domain name and a load value of the IP address.

Abstract

The present invention provides a domain name system (DNS) and a method thereof for providing load balancing. The method comprises: after receiving a notification message sent by an IP address server corresponding to a domain name, a DNS querying a load value of the IP address server, and updating a load value of an IP address corresponding to the IP address server; and after receiving a domain name query message sent by a DNS client, querying an IP address corresponding to the domain name, and returning the IP address with the smallest load value to the DNS client. In the present invention, the DNS dynamically queries the load value of the IP address server and dynamically updates data such as the load value of the IP address. When a DNS client sends a domain name query message, a DNS server queries an IP address corresponding to the domain name and returns the IP address with the smallest load value to the DNS client. In this way, the problem of dynamically acquiring a load state of a server corresponding to an IP address is solved, and dynamic load balancing of a network is implemented.

Description

一种域名系统及其提供负荷均衡的方法 技术领域  Domain name system and method for providing load balancing thereof
本发明涉及通信网络中的负荷均衡技术, 尤其涉及一种域名系统 The invention relates to a load balancing technology in a communication network, in particular to a domain name system
( Domain Name System, DNS )及其提供负荷均衡的方法。 背景技术 (Domain Name System, DNS) and its method of providing load balancing. Background technique
目前使用 DNS的网络中, 如果需要 DNS提供负荷均衡功能, DNS只 能提供基于静态的负荷均衡机制。 例如, 需要以太网中的 DNS提供对百度 域名的负荷均衡功能, 则需将 IE客户端访问百度网站的负荷均衡地分配到 百度域名对应的 IP地址上。 具体处理过程是: DNS启用负荷均衡机制, 查 询本地緩存或本地数据库中对应域名 www,baidu,com配置的 IP地址, 发现 共有三个 IP地址: 220.181.37.56、 220.181.37.57、 220.181.37.58, DNS确认 这三个 IP地址都处于可连接状态,则将 IP地址采用轮询的方式返回给 DNS 客户端, DNS客户端获取其中的一个 IP地址, 采用所获取的 IP地址进行 下一步的业务。 表面上, DNS是将这些 DNS客户端的业务均分到各个 IP 地址上, 但实际上这种静态的负荷均衡机制并不能够感知目前三个 IP地址 对应的服务器当前的负荷情况究竟如何, 从而不能根据服务器实际的负荷 状况提供最佳状态的 IP地址, 即使 DNS采取轮询方式提供了可用的 IP地 址, 也不一定就是目前负荷最轻的那台服务器的 IP地址。  In a network that currently uses DNS, if DNS is required to provide load balancing, DNS can only provide a static-based load balancing mechanism. For example, if the DNS in the Ethernet is required to provide the load balancing function for the Baidu domain name, the load of the IE client accessing the Baidu website needs to be evenly distributed to the IP address corresponding to the Baidu domain name. The specific processing procedure is as follows: DNS enables the load balancing mechanism to query the IP address of the corresponding domain name www, baidu, com in the local cache or local database, and finds three IP addresses: 220.181.37.56, 220.181.37.57, 220.181.37.58, DNS After confirming that all three IP addresses are in a connectable state, the IP address is returned to the DNS client by polling. The DNS client obtains one of the IP addresses and uses the obtained IP address to perform the next service. On the surface, DNS divides the services of these DNS clients into IP addresses. In fact, this static load balancing mechanism cannot sense how the current load of the server corresponding to the three IP addresses is. According to the actual load status of the server, the IP address of the best state is provided. Even if the DNS provides the available IP address by polling, it is not necessarily the IP address of the server with the lightest load.
面对当前越来越庞大的通讯网络, 随着通讯网络业务量的不断增长, 能够得知由于业务量的不断增长, IP地址所对应服务器的具体负荷状态, 才能更好地实现 DNS网络中的负荷均衡。 但是, 如何实现 DNS中的动态 负荷均衡, 目前尚没有人提出相关的技术实现方案。 发明内容 In the face of the current increasingly large communication network, as the traffic volume of the communication network continues to grow, it can be known that due to the continuous increase of the traffic volume, the specific load status of the server corresponding to the IP address can better realize the DNS network. Load balancing. However, how to implement dynamic load balancing in DNS, no one has proposed relevant technical implementation solutions. Summary of the invention
有鉴于此, 本发明的主要目的在于提供一种 DNS及其提供负荷均衡的 方法, 能够实现网络的动态负荷均衡。  In view of this, the main object of the present invention is to provide a DNS and a method for providing load balancing, which can implement dynamic load balancing of a network.
为达到上述目的, 本发明的技术方案是这样实现的:  In order to achieve the above object, the technical solution of the present invention is achieved as follows:
一种域名系统 DNS提供负荷均衡的方法, 所述方法包括:  A domain name system DNS provides a method for load balancing, and the method includes:
DNS接收到域名对应的 IP地址服务器发来的通知消息后,查询所述 IP 地址服务器的负荷值,并对所述 IP地址服务器对应 IP地址的负荷值进行更 新;  After receiving the notification message sent by the IP address server corresponding to the domain name, the DNS queries the load value of the IP address server, and updates the load value of the IP address corresponding to the IP address server;
收到 DNS客户端发来的域名查询消息后,查询所述域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS客户端。  After receiving the domain name query message sent by the DNS client, the IP address corresponding to the domain name is queried, and the IP address with the lowest load value is returned to the DNS client.
进一步地, 所述方法还包括: DNS存储域名对应的 IP地址及该 IP地 址的负荷值。  Further, the method further includes: the DNS stores an IP address corresponding to the domain name and a load value of the IP address.
进一步地, 所述方法还包括: 域名对应的 IP地址服务器通过预先设置 的负荷算法, 计算自身的负荷值, 当检测到自身负荷值发生变化时, 发送 通知消息给 DNS。  Further, the method further includes: the IP address server corresponding to the domain name calculates its own load value by using a preset load algorithm, and sends a notification message to the DNS when it detects that the self load value changes.
其中, 所述域名对应的 IP地址服务器检测到自身负荷值发生变化时, 发送通知消息给 DNS为:  When the IP address server corresponding to the domain name detects that the load value changes, the notification message is sent to the DNS:
同一域名对应的 IP地址服务器按照预先设置的周期及同一负荷算法, 计算自身当前的负荷值, 并将计算得到的负荷值与自身上一周期的负荷值 进行比较, 当比较结果超出预设的阀值时, 发送通知消息给 DNS。  The IP address server corresponding to the same domain name calculates its current load value according to a preset period and the same load algorithm, and compares the calculated load value with the load value of its previous cycle, when the comparison result exceeds the preset valve. When the value is sent, a notification message is sent to the DNS.
其中, 所述当比较结果超出预设的阀值为: 计算得到的负荷值相对于 自身上一周期的负荷值的波动超过 ± 5%。  Wherein, when the comparison result exceeds the preset threshold value: the calculated load value fluctuates by more than ± 5% with respect to the load value of the previous cycle.
其中, 所述 DNS查询所述 IP地址服务器的负荷值为:  The DNS querying the load value of the IP address server is:
DNS的动态负荷查询模块发送 DNS动态负荷查询 DNS-DLQ消息至所 述 IP地址服务器; 所述 IP 地址服务器返回包含有所述 IP 地址服务器的负荷值的 DNS-DLQ响应给 DNS。 The dynamic load query module of the DNS sends a DNS dynamic load query DNS-DLQ message to the IP address server; The IP address server returns a DNS-DLQ response containing the load value of the IP address server to the DNS.
一种 DNS, 所述系统包括: 动态负荷查询模块、 DNS服务器; 其中, 动态负荷查询模块, 用于接收到域名对应的 IP地址服务器发来的通知 消息后, 查询所述 IP地址服务器的负荷值, 并发送更新消息;  A DNS, the system includes: a dynamic load query module, a DNS server; wherein, the dynamic load query module is configured to: after receiving the notification message sent by the IP address server corresponding to the domain name, query the load value of the IP address server And send an update message;
DNS服务器, 用于接收到所述更新消息后, 更新所述 IP地址服务器对 应 IP地址的负荷值;接收到 DNS客户端发来的域名查询消息后,查询所述 域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS客户端。  a DNS server, after receiving the update message, updating a load value of the IP address corresponding to the IP address server; after receiving the domain name query message sent by the DNS client, querying the IP address corresponding to the domain name, and The IP address with the lowest load value is returned to the DNS client.
进一步地, 所述 DNS服务器, 具体用于存储域名对应的 IP地址及该 IP地址的负荷值。  Further, the DNS server is specifically configured to store an IP address corresponding to the domain name and a load value of the IP address.
进一步地,所述动态负荷查询模块,具体用于发送 DNS-DLQ消息至所 述 IP地址服务器, 并接收所述 IP地址服务器返回的包含有所述 IP地址服 务器的负荷值的 DNS-DLQ响应。  Further, the dynamic load query module is specifically configured to send a DNS-DLQ message to the IP address server, and receive a DNS-DLQ response that is returned by the IP address server and includes a load value of the IP address server.
本发明提供的 DNS及其提供负荷均衡的方法, 通过 DNS查询 IP地址 服务器的负荷值,对 IP地址的负荷值等数据动态更新; 当 DNS客户端发来 域名查询消息时, DNS查询该域名对应的 IP地址, 将负荷值最 d、的 IP地 址返回给 DNS客户端, 如此, DNS客户端从 DNS中获取到的就是当前可 用且负荷较轻的 IP地址, 从而解决了动态获知 IP地址对应的 IP地址服务 器负荷状态的问题, 实现了 DNS网络的动态负荷均衡。 附图说明  The DNS provided by the present invention and the method for providing the load balancing method can query the load value of the IP address server through the DNS, and dynamically update the data such as the load value of the IP address; when the DNS client sends the domain name query message, the DNS queries the domain name corresponding to the domain name. The IP address returns the IP address with the most load value to the DNS client. Thus, the DNS client obtains the currently available and lightly loaded IP address from the DNS, thereby solving the problem of dynamically obtaining the IP address. The problem of IP address server load status achieves dynamic load balancing of the DNS network. DRAWINGS
图 1为本发明实施例 DNS提供负荷均衡方法的流程示意图; 图 2为本发明实施例 DNS提供负荷均衡方法的具体实施例的流程示意 图;  1 is a schematic flowchart of a method for providing a load balancing method for a DNS according to an embodiment of the present invention; FIG. 2 is a schematic flowchart of a specific embodiment of a method for providing a load balancing method for a DNS according to an embodiment of the present invention;
图 3为本发明实施例 DNS提供负荷均衡系统的组成结构示意图。 具体实施方式 FIG. 3 is a schematic structural diagram of a DNS providing load balancing system according to an embodiment of the present invention. detailed description
本发明的基本思想为: DNS接收到域名对应的 IP地址服务器发来的通 知消息后, 查询所述 IP地址服务器的负荷值, 并对所述 IP地址服务器对应 IP地址的负荷值进行更新; 收到 DNS客户端发来的域名查询消息后, 查询 所述域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS客户端。  The basic idea of the present invention is: after receiving the notification message sent by the IP address server corresponding to the domain name, the DNS queries the load value of the IP address server, and updates the load value of the IP address corresponding to the IP address server; After the domain name query message sent by the DNS client, the IP address corresponding to the domain name is queried, and the IP address with the smallest load value is returned to the DNS client.
为使本发明的目的、 技术方案和优点更加清楚明白, 以下举实施例并 参照附图, 对本发明进一步详细说明。  The present invention will be further described in detail below with reference to the accompanying drawings.
图 1示出了本发明 DNS提供负荷均衡方法的流程, 如图 1所示, 所述 方法包括下述步驟:  FIG. 1 shows a flow of a DNS providing load balancing method according to the present invention. As shown in FIG. 1, the method includes the following steps:
步驟 101 , DNS接收到域名对应的 IP地址服务器发来的通知消息后, 查询所述 IP地址服务器的负荷值, 并对所述 IP地址服务器对应 IP地址的 负荷值进行更新;  Step 101: After receiving the notification message sent by the IP address server corresponding to the domain name, the DNS queries the load value of the IP address server, and updates the load value of the IP address corresponding to the IP address server.
一般地,一个域名会配置有至少一个 IP地址,每个 IP地址对应一个 IP 地址服务器,而当域名对应的 IP地址服务器群中的某一个 IP地址服务器检 测到自身的负荷值发生变化时, 会发送通知消息给 DNS的动态负荷查询模 块( Dynamic Load Query Module , DLQM ); 其中, 通知消息可以采用标准 的 DNS-notify消息(可参考 RFC1996 );  Generally, a domain name is configured with at least one IP address, and each IP address corresponds to an IP address server. When an IP address server in the IP address server group corresponding to the domain name detects that its own load value changes, Sending a notification message to the Dynamic Load Query Module (DLQM) of the DNS; wherein the notification message can use a standard DNS-notify message (refer to RFC1996);
进一步地, 本步驟还包括: 同一域名对应的 IP地址服务器按照预先设 置的周期及负荷算法, 计算自身当前的负荷值, 当检测到自身的负荷值发 生变化时, 发送通知消息给 DNS的动态负荷查询模块;  Further, the step further includes: the IP address server corresponding to the same domain name calculates its current load value according to a preset period and a load algorithm, and sends a notification message to the dynamic load of the DNS when detecting that the load value thereof changes. Query module
其中, 检测到自身的负荷值发生变化可以为: IP地址服务器将计算得 到的负荷值与自身上一周期的负荷值进行比较, 当计算得到的负荷值相对 于上一周期的负荷值的波动超出预先设置的阀值时, 则认为自身的负荷值 发生了变化, 这里, 预先设置的阀值是为了在 IP地址服务器负荷值变化不 大的情况下, 减少 IP地址服务器与动态负荷查询模块进行的数据交互, 该 阀值可以根据实际需要设置为 ± 5%、 士 10%等等。 The change of the load value of the self may be: the IP address server compares the calculated load value with the load value of the previous period, and the calculated load value fluctuates with respect to the load value of the previous period. When the preset threshold is set, the load value of the load is changed. Here, the preset threshold is used to reduce the IP address server and the dynamic load query module when the IP address server load value does not change much. Data interaction, the The threshold can be set to ± 5%, 10%, etc. according to actual needs.
动态负荷查询模块接收到 IP地址服务器群中任意一个 IP地址服务器发 送的通知消息时, 得知该 IP地址服务器的负荷值发生变化, 则发送查询消 息给该 IP地址服务器以查询变化后的负荷值;该 IP地址服务器接收到所述 查询消息后, 返回包含有该 IP地址服务器的负荷值的响应给动态负荷查询 模块; 动态负荷查询模块接收到该响应消息后, 发送消息给 DNS 的 DNS 服务器,来更新 DNS服务器存储的该 IP地址服务器对应 IP地址的负荷值; 具体地,动态负荷查询模块采用内部消息更新 DNS服务器存储的 IP地址及 IP地址的负荷值, 内部消息主要包括消息 ID、 IP地址、 负荷值三个参数, 其中, IP地址为主键;  When receiving the notification message sent by any IP address server in the IP address server group, the dynamic load query module knows that the load value of the IP address server changes, and sends a query message to the IP address server to query the changed load value. After receiving the query message, the IP address server returns a response containing the load value of the IP address server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS DNS server. To update the load value of the IP address corresponding to the IP address server stored in the DNS server; specifically, the dynamic load query module uses an internal message to update the load value of the IP address and the IP address stored by the DNS server, and the internal message mainly includes the message ID and the IP address. And three parameters of the load value, wherein the IP address is the primary key;
查询消息和响应可以是在 RFC1035定义的 DNS查询类型的基础上,定 义基于 DNS查询的动态负荷查询 ( Dynamic Load Query, DLQ ) 消息和响 应 , 记为 DNS-DLQ消息和 DNS-DLQ响应;  The query message and response may be based on the DNS query type defined in RFC1035, defining Dynamic Load Query (DLQ) messages and responses based on DNS queries, recorded as DNS-DLQ messages and DNS-DLQ responses;
具体的, DNS-DLQ消息和 DNS-DLQ响应的基础结构与 RFC1035的 定义保持一致, 包括: Header, Question , Answer, Authority和 Additional 部分, 每一部分的具体定义可以查询 RFC1035, 不再赘述;  Specifically, the infrastructure of the DNS-DLQ message and the DNS-DLQ response are consistent with the definition of RFC1035, including: Header, Question, Answer, Authority, and Additional. The specific definition of each part can be queried in RFC1035, and will not be described again.
需要注意的是, 本发明实施例中, DNS-DLQ消息在 RFC1035定义的 基础上, 在 Question结构中增加了 QTYPE、 QCLASS、 QNAME, 其中, QTYPE为 DLQ, QCLASS为 IN, QNAME为待查询的 IP地址; DNS-DLQ 响应在 RFC1035定义的基础上, 在 Answer结构中增加了 NAME、 TYPE, RDATA, 其中, NAME为 IP地址, TYPE为 DLQ, RDATA为负荷值; 其 他部分的定义满足 RFC1035定义。  It should be noted that, in the embodiment of the present invention, based on the definition of RFC1035, the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, and QNAME is the IP to be queried. Address; DNS-DLQ response Based on the definition of RFC1035, NAME, TYPE, RDATA are added to the Answer structure, where NAME is the IP address, TYPE is DLQ, and RDATA is the load value; the definition of other parts meets the definition of RFC1035.
步驟 102, DNS接收到 DNS客户端发来的域名查询消息后, 查询所述 域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS客户端。  Step 102: After receiving the domain name query message sent by the DNS client, the DNS queries the IP address corresponding to the domain name, and returns the IP address with the smallest load value to the DNS client.
具体地, 本步驟中, DNS的 DNS服务器接收到 DNS客户端发来的域 名查询消息, 查找该域名对应的 IP地址, 并读取该 IP地址的负荷值, 当域 名对应的 IP地址为多个时, 比较各个 IP地址的负荷值,将当前负荷值最 d、 的 IP地址返回给 DNS客户端, 以进行下一步的业务。 Specifically, in this step, the DNS server of the DNS receives the domain sent by the DNS client. Name query message, find the IP address corresponding to the domain name, and read the load value of the IP address. When the IP address corresponding to the domain name is multiple, compare the load value of each IP address, and set the current load value to the most d, the IP address. The address is returned to the DNS client for the next step of the business.
其中, 本发明实施例中, DNS服务器和动态负荷查询模块物理实现上 可以设置在同一台服务器, 也可以设置于多台服务器上; DNS服务器存储 的 IP地址及 IP地址的负荷值可以保存在自身的緩存区域中进行实时更新, 以节省物理表的开销, 其具有表 1的结构:
Figure imgf000007_0001
In the embodiment of the present invention, the physical implementation of the DNS server and the dynamic load query module may be set on the same server or on multiple servers; the load value of the IP address and IP address stored by the DNS server may be saved in itself. Real-time updates in the cache area to save the overhead of the physical table, which has the structure of Table 1:
Figure imgf000007_0001
表 1  Table 1
其中, IP Address为一个 32bit的互联网地址, Load Value为负荷值, 是一个数值型的参数, 在具体实现时, DNS初始化这部分数据时, 可以将 緩存中各个 IP地址对应的负荷值置为相同值。  The IP Address is a 32-bit Internet address, and the Load Value is a load value. It is a numeric parameter. In the specific implementation, when the DNS initializes this part of the data, the load value corresponding to each IP address in the cache can be set to be the same. value.
图 2示出了本发明 DNS提供负荷均衡方法的具体实施例的流程, 如图 2所示, 本实施例基于 DNS、 DNS客户端及域名对应的 IP地址服务器群进 行描述, 其中, DNS包括 DNS服务器及动态负荷查询模块, 域名对应的 IP 地址服务器群包括三个 IP地址服务器, 分别为: IP地址为 IP1的 IP1服务 器、 IP地址为 IP2的 IP2服务器、 IP地址为 IP3的 IP3服务器; 所述实施例 包括以下步驟:  FIG. 2 is a flowchart of a specific embodiment of a method for providing a load balancing method according to the present invention. As shown in FIG. 2, the embodiment is described based on a DNS, a DNS client, and an IP address server group corresponding to a domain name, where the DNS includes a DNS. The server and the dynamic load query module, the IP address server group corresponding to the domain name includes three IP address servers, namely: an IP1 server with an IP address of IP1, an IP2 server with an IP address of IP2, and an IP3 server with an IP address of IP3; The embodiment includes the following steps:
步驟 1~2, IP1服务器通过预先设置的负荷算法计算出自身的负荷值发 生变化后, 发送通知消息给动态负荷查询模块;  Step 1~2, after the IP1 server calculates a change in its own load value through a preset load algorithm, the notification message is sent to the dynamic load query module.
具体地, 本步驟中, IP1服务器按照预先设置的负荷算法, 周期性计算 自身当前的负荷值, 当检测到自身的负荷值发生变化时, 发送通知消息给 动态负荷查询模块; 其中, 可以通过用户根据实际需要及网络环境设置 IP 地址服务器进行计算的周期; 负荷算法可以根据用户的需要进行选择, 例 如可以对服务器的 CPU利用率、 内存使用率、 带宽等参数进行加权运算, 得到该服务器的负荷值等等;通知消息可以采用标准的 DNS-notify消息(可 参考 RFC1996 ); Specifically, in this step, the IP1 server periodically calculates its current load value according to a preset load algorithm, and when it detects that its own load value changes, sends a notification message to the dynamic load query module; Set the calculation period of the IP address server according to the actual needs and the network environment; the load algorithm can be selected according to the needs of the user, for example For example, the CPU usage, memory usage, bandwidth and other parameters of the server can be weighted to obtain the load value of the server, etc.; the notification message can use a standard DNS-notify message (refer to RFC1996);
其中, 检测到自身的负荷值发生变化可以为: IP1服务器将计算得到的 负荷值与自身上一周期的负荷值进行比较, 当计算得到的负荷值相对于上 一周期的负荷值的波动超出预先设置的阀值时, 则为自身的负荷值发生了 变化; 预先设置的阀值是可以根据实际需要设置为 ± 5%、 ± 10%等等, 是 为了在 IP地址服务器负荷值变化不大的情况下,减少 IP地址服务器与动态 负荷查询模块进行数据交互的过程。  Wherein, the change of the load value detected by itself may be: The IP1 server compares the calculated load value with the load value of the previous period, and the fluctuation of the calculated load value with respect to the load value of the previous period exceeds the advance When the threshold is set, the load value of the load changes. The preset threshold can be set to ± 5%, ± 10%, etc. according to the actual needs, in order to change the load value of the server at the IP address. In this case, the process of data interaction between the IP address server and the dynamic load query module is reduced.
步驟 3~5 , 动态负荷查询模块接收到 IP1服务器发来的通知消息后, 发 送查询消息至 IP1服务器; 并接收 IP1服务器返回的响应消息, 通知 DNS 服务器进行 IP地址为 IP1的负荷值的更新;  Step 3~5, after receiving the notification message sent by the IP1 server, the dynamic load query module sends an inquiry message to the IP1 server; and receives a response message returned by the IP1 server, and notifies the DNS server to update the load value of the IP address as IP1;
具体地,动态负荷查询模块接收到该通知消息后,得知 IP1服务器的负 荷值发生变化, 需要重新查询 IP1服务器的负荷值, 故发送查询消息至 IP1 服务器; IP1服务器接收到该查询消息后, 返回包含有该 IP1服务器的负荷 值的响应给动态负荷查询模块; 动态负荷查询模块接收到该响应消息后, 发送消息给 DNS服务器, 来更新存储的 IP地址为 IP1的负荷值; 这里, 动 态负荷查询模块采用内部消息更新 DNS服务器存储的 IP地址为 IP1的负荷 值, 内部消息主要包括消息 ID、 IP地址、 负荷值三个参数, 其中, IP地址 为主键;  Specifically, after receiving the notification message, the dynamic load query module learns that the load value of the IP1 server changes, and needs to re-query the load value of the IP1 server, so the query message is sent to the IP1 server; after receiving the query message, the IP1 server receives the query message. Returning a response containing the load value of the IP1 server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS server to update the stored IP address to the load value of IP1; here, the dynamic load The query module uses the internal message to update the IP address stored by the DNS server to the load value of the IP1. The internal message mainly includes three parameters: a message ID, an IP address, and a load value, wherein the IP address is the primary key;
具体的, 本步驟中, DNS-DLQ 消息在 RFC1035 定义的基础上, 在 Question结构中增加了 QTYPE、 QCLASS、 QNAME,其中, QTYPE为 DLQ, QCLASS为 IN, QNAME为 IPl; DNS-DLQ响应在 RFC1035定义的基础 上,在 Answer结构中增加了 NAME、 TYPE, RDATA,其中 , NAME为 IPl , TYPE为 DLQ, RDATA为 IPl当前的负荷值;其他部分的定义满足 RFC1035 定义。 Specifically, in this step, based on the definition of RFC1035, the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, QNAME is IPl, and DNS-DLQ response is in RFC1035. On the basis of the definition, NAME, TYPE, RDATA are added to the Answer structure, where NAME is IPl, TYPE is DLQ, RDATA is the current load value of IPl; other parts are defined to satisfy RFC1035 definition.
步驟 6~7, IP2服务器通过预先设置的负荷算法计算出自身的负荷值发 生变化后, 发送通知消息给动态负荷查询模块;  Step 6~7, after the IP2 server calculates a change in its own load value through a preset load algorithm, the notification message is sent to the dynamic load query module.
具体地, 本步驟中, IP2服务器按照预先设置的负荷算法, 周期性计算 自身当前的负荷值, 当检测到自身的负荷值发生变化时, 发送通知消息给 动态负荷查询模块; 其中, 可以通过用户根据实际需要及网络环境设置 IP 地址服务器进行计算的周期; 负荷算法可以根据用户的需要进行选择, 例 如可以对服务器的 CPU利用率、 内存使用率、 带宽等参数进行加权运算, 得到该服务器的负荷值等等;通知消息可以采用标准的 DNS-notify消息(可 参考 RFC1996 );  Specifically, in this step, the IP2 server periodically calculates its current load value according to a preset load algorithm, and when it detects that its own load value changes, sends a notification message to the dynamic load query module; The calculation period of the IP address server is set according to the actual needs and the network environment; the load algorithm can be selected according to the needs of the user. For example, the CPU utilization, memory usage, bandwidth and other parameters of the server can be weighted to obtain the load of the server. Values, etc.; notification messages can use standard DNS-notify messages (refer to RFC1996);
其中, 检测到自身的负荷值发生变化可以为: IP2服务器将计算得到的 负荷值与自身上一周期的负荷值进行比较, 当计算得到的负荷值相对于上 一周期的负荷值的波动超出预先设置的阀值时, 则为自身的负荷值发生了 变化; 预先设置的阀值是可以根据实际需要设置为 ± 5%、 ± 10%等等, 是 为了在 IP地址服务器负荷值变化不大的情况下,减少 IP地址服务器与动态 负荷查询模块进行数据交互的过程。  Wherein, the change of the load value detected by itself may be: The IP2 server compares the calculated load value with the load value of the previous period, and the fluctuation of the calculated load value with respect to the load value of the previous period exceeds the advance When the threshold is set, the load value of the load changes. The preset threshold can be set to ± 5%, ± 10%, etc. according to the actual needs, in order to change the load value of the server at the IP address. In this case, the process of data interaction between the IP address server and the dynamic load query module is reduced.
步驟 8~10, 动态负荷查询模块接收到 IP2服务器发来的通知消息后, 发送查询消息至 IP2服务器;并接收 IP2服务器返回的响应消息,通知 DNS 服务器进行 IP地址为 IP2的负荷值的更新;  Step 8~10, after receiving the notification message sent by the IP2 server, the dynamic load query module sends an inquiry message to the IP2 server; and receives a response message returned by the IP2 server, and notifies the DNS server to update the load value of the IP address as IP2;
具体地,动态负荷查询模块接收到该通知消息后,得知 IP2服务器的负 荷值发生变化, 需要重新查询 IP2服务器的负荷值, 故发送查询消息至 IP2 服务器; IP2服务器接收到该查询消息后, 返回包含有该 IP2服务器的负荷 值的响应给动态负荷查询模块; 动态负荷查询模块接收到该响应消息后, 发送消息给 DNS服务器, 来更新存储的 IP地址为 IP2的负荷值; 这里, 动 态负荷查询模块采用内部消息更新 DNS服务器存储的 IP地址为 IP2的负荷 值, 内部消息主要包括消息 ID、 IP地址、 负荷值三个参数, 其中, IP地址 为主键; Specifically, after receiving the notification message, the dynamic load query module learns that the load value of the IP2 server changes, and needs to re-query the load value of the IP2 server, so the query message is sent to the IP2 server; after receiving the query message, the IP2 server receives the query message. Returning a response containing the load value of the IP2 server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS server to update the stored IP address to the IP2 load value; here, the dynamic load The query module uses internal messages to update the IP address stored by the DNS server to the load of IP2. The internal message mainly includes three parameters: a message ID, an IP address, and a load value, where the IP address is a primary key;
具体的, 本步驟中, DNS-DLQ 消息在 RFC1035 定义的基础上, 在 Question结构中增加了 QTYPE、 QCLASS、 QNAME,其中, QTYPE为 DLQ, QCLASS为 IN, QNAME为 IP2; DNS-DLQ响应在 RFC1035定义的基础 上,在 Answer结构中增加了 NAME、 TYPE, RDATA,其中, NAME为 IP2, TYPE为 DLQ, RDATA为 IP2当前的负荷值;其他部分的定义满足 RFC1035 定义。  Specifically, in this step, based on the definition of RFC1035, the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, QNAME is IP2, and DNS-DLQ response is in RFC1035. On the basis of the definition, NAME, TYPE, and RDATA are added to the Answer structure, where NAME is IP2, TYPE is DLQ, and RDATA is the current load value of IP2; the definitions of other parts meet the definition of RFC1035.
步驟 11~12, IP3服务器通过预先设置的负荷算法计算出自身的负荷值 发生变化后, 发送通知消息给动态负荷查询模块;  Step 11~12, after the IP3 server calculates the load value of the load through the preset load algorithm, the notification message is sent to the dynamic load query module.
具体地, 本步驟中, IP3服务器按照预先设置的负荷算法, 周期性计算 自身当前的负荷值, 当检测到自身的负荷值发生变化时, 发送通知消息给 动态负荷查询模块; 其中, 可以通过用户根据实际需要及网络环境设置 IP 地址服务器进行计算的周期; 负荷算法可以根据用户的需要进行选择, 例 如可以对服务器的 CPU利用率、 内存使用率、 带宽等参数进行加权运算, 得到该服务器的负荷值等等;通知消息可以采用标准的 DNS-notify消息(可 参考 RFC1996 );  Specifically, in this step, the IP3 server periodically calculates its current load value according to a preset load algorithm, and sends a notification message to the dynamic load query module when detecting that its own load value changes; The calculation period of the IP address server is set according to the actual needs and the network environment; the load algorithm can be selected according to the needs of the user. For example, the CPU utilization, memory usage, bandwidth and other parameters of the server can be weighted to obtain the load of the server. Values, etc.; notification messages can use standard DNS-notify messages (refer to RFC1996);
其中, 检测到自身的负荷值发生变化可以为: IP3服务器将计算得到的 负荷值与自身上一周期的负荷值进行比较, 当计算得到的负荷值相对于上 一周期的负荷值的波动超出预先设置的阀值时, 则为自身的负荷值发生了 变化; 预先设置的阀值是可以根据实际需要设置为 ± 5%、 ± 10%等等, 是 为了在 IP地址服务器负荷值变化不大的情况下,减少 IP地址服务器与动态 负荷查询模块进行数据交互的过程。  Wherein, the change of the load value detected by itself may be: The IP3 server compares the calculated load value with the load value of the previous period, and the fluctuation of the calculated load value with respect to the load value of the previous period exceeds the advance When the threshold is set, the load value of the load changes. The preset threshold can be set to ± 5%, ± 10%, etc. according to the actual needs, in order to change the load value of the server at the IP address. In this case, the process of data interaction between the IP address server and the dynamic load query module is reduced.
步驟 13~15, 动态负荷查询模块接收到 IP3服务器发来的通知消息后, 发送查询消息至 IP3服务器;并接收 IP3服务器返回的响应消息,通知 DNS 服务器进行 IP地址为 IP3的负荷值的更新; Step 13~15, after receiving the notification message sent by the IP3 server, the dynamic load query module sends an inquiry message to the IP3 server; and receives a response message returned by the IP3 server to notify the DNS. The server performs an update of the load value whose IP address is IP3;
具体地,动态负荷查询模块接收到该通知消息后,得知 IP3服务器的负 荷值发生变化, 需要重新查询 IP3服务器的负荷值, 故发送查询消息至 IP3 服务器; IP3服务器接收到该查询消息后, 返回包含有该 IP3服务器的负荷 值的响应给动态负荷查询模块; 动态负荷查询模块接收到该响应消息后, 发送消息给 DNS服务器, 来更新存储的 IP地址为 IP3的负荷值; 这里, 动 态负荷查询模块采用内部消息更新 DNS服务器存储的 IP地址为 IP3的负荷 值, 内部消息主要包括消息 ID、 IP地址、 负荷值三个参数, 其中, IP地址 为主键;  Specifically, after receiving the notification message, the dynamic load query module learns that the load value of the IP3 server changes, and needs to re-query the load value of the IP3 server, so the query message is sent to the IP3 server; after receiving the query message, the IP3 server receives the query message. Returning a response containing the load value of the IP3 server to the dynamic load query module; after receiving the response message, the dynamic load query module sends a message to the DNS server to update the stored IP address to the IP3 load value; here, the dynamic load The query module uses the internal message to update the IP address stored by the DNS server to the load value of the IP3. The internal message mainly includes three parameters: a message ID, an IP address, and a load value, wherein the IP address is the primary key;
具体的, 本步驟中, DNS-DLQ 消息在 RFC1035 定义的基础上, 在 Question结构中增加了 QTYPE、 QCLASS、 QNAME,其中, QTYPE为 DLQ, QCLASS为 IN, QNAME为 IP3; DNS-DLQ响应在 RFC1035定义的基础 上,在 Answer结构中增加了 NAME、 TYPE, RDATA,其中 , NAME为 IP3 , TYPE为 DLQ, RDATA为 IP3当前的负荷值;其他部分的定义满足 RFC1035 定义。  Specifically, in this step, based on the definition of RFC1035, the DNS-DLQ message adds QTYPE, QCLASS, and QNAME to the Question structure, where QTYPE is DLQ, QCLASS is IN, QNAME is IP3, and DNS-DLQ response is in RFC1035. On the basis of the definition, NAME, TYPE, and RDATA are added to the Answer structure, where NAME is IP3, TYPE is DLQ, and RDATA is the current load value of IP3; the definitions of other parts meet the definition of RFC1035.
应当理解, 上述步驟在实际应用中, 每个 IP地址服务器与动态负荷查 询模块进行数据交互的过程没有先后顺序的限制; 也就是说, IP1服务器、 IP2服务器、 IP3服务器负荷值的计算和更新是没有先后顺序限制的。  It should be understood that, in the actual application, the process of data interaction between each IP address server and the dynamic load query module is not limited in sequence; that is, the calculation and update of the load value of the IP1 server, the IP2 server, and the IP3 server are There is no order limit.
步驟 16, DNS客户端根据用户的输入, 发送域名查询消息给 DNS服 务器;  Step 16, the DNS client sends a domain name query message to the DNS server according to the input of the user;
步驟 17, DNS服务器接收到该域名查询消息后, 查询本地緩存或数据 库中对应域名所配置的 IP地址, 并比较所述 IP地址的负荷值;  Step 17, after receiving the domain name query message, the DNS server queries the IP address configured in the local cache or the corresponding domain name in the database, and compares the load value of the IP address;
具体地, 本步驟中, DNS服务器首先根据域名, 查询该域名对应的 IP 地址; 然后查询各个 IP地址的负荷值, 并进行比较, 得到当前负荷值最小 的 IP地址。 步驟 18, 返回负荷值最小的 IP地址给 DNS客户端。 Specifically, in this step, the DNS server first queries the IP address corresponding to the domain name according to the domain name; then queries the load value of each IP address, and compares it to obtain the IP address with the lowest current load value. Step 18: Return the IP address with the lowest load value to the DNS client.
应当理解,步驟 16-18和 DNS服务器进行 IP地址负荷值的更新不受上 述顺序的限制。  It should be understood that the update of the IP address load value by steps 16-18 and the DNS server is not limited by the above order.
图 3示出了本发明 DNS提供负荷均衡系统的组成结构示意, 如图 3所 示, 所述 DNS包括: 动态负荷查询模块 31和 DNS服务器 32;  FIG. 3 is a schematic diagram showing the structure of a DNS providing load balancing system according to the present invention. As shown in FIG. 3, the DNS includes: a dynamic load query module 31 and a DNS server 32;
其中,动态负荷查询模块 31用于接收到域名对应的 IP地址服务器群中 的 IP地址服务器发来的通知消息后, 查询所述 IP地址服务器的负荷值, 并 发送更新消息; DNS服务器 32, 用于接收到所述更新消息后, 更新所述 IP 地址服务器对应 IP地址的负荷值;接收到 DNS客户端发来的域名查询消息 后, 查询所述域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS 客户端  The dynamic load query module 31 is configured to: after receiving the notification message sent by the IP address server in the IP address server group corresponding to the domain name, query the load value of the IP address server, and send an update message; the DNS server 32, After receiving the update message, updating the load value of the IP address corresponding to the IP address server; after receiving the domain name query message sent by the DNS client, querying the IP address corresponding to the domain name, and minimizing the load value IP address is returned to the DNS client
进一步地, DNS服务器 32, 具体用于存储域名对应的 IP地址及该 IP 地址的负荷值。  Further, the DNS server 32 is specifically configured to store an IP address corresponding to the domain name and a load value of the IP address.
进一步地, 动态负荷查询模块 31 , 具体用于发送 DNS-DLQ消息至所 述 IP地址服务器, 并接收所述 IP地址服务器返回的包含有所述 IP地址服 务器的负荷值的 DNS-DLQ响应。  Further, the dynamic load query module 31 is specifically configured to send a DNS-DLQ message to the IP address server, and receive a DNS-DLQ response returned by the IP address server that includes the load value of the IP address server.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。  The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims

权利要求书 Claim
1、 一种域名系统 DNS提供负荷均衡的方法, 其中, 所述方法包括: DNS接收到域名对应的 IP地址服务器发来的通知消息后,查询所述 IP 地址服务器的负荷值,并对所述 IP地址服务器对应 IP地址的负荷值进行更 新;  A method for providing load balancing by a domain name system DNS, wherein the method includes: after receiving a notification message sent by an IP address server corresponding to a domain name, the DNS queries a load value of the IP address server, and queries the The IP address server updates the load value of the IP address;
收到 DNS客户端发来的域名查询消息后,查询所述域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS客户端。  After receiving the domain name query message sent by the DNS client, the IP address corresponding to the domain name is queried, and the IP address with the lowest load value is returned to the DNS client.
2、 根据权利要求 1所述的方法, 其中, 所述方法还包括: DNS存储域 名对应的 IP地址及该 IP地址的负荷值。  2. The method according to claim 1, wherein the method further comprises: the DNS storage domain name corresponding to the IP address and the load value of the IP address.
3、 根据权利要求 1所述的方法, 其中, 所述方法还包括: 域名对应的 IP地址服务器通过预先设置的负荷算法, 计算自身的负荷值, 当检测到自 身负荷值发生变化时, 发送通知消息给 DNS。  3. The method according to claim 1, wherein the method further comprises: the IP address server corresponding to the domain name calculates its own load value through a preset load algorithm, and sends a notification when it detects that the self load value changes. Message to DNS.
4、根据权利要求 3所述的方法, 其中, 所述域名对应的 IP地址服务器 检测到自身负荷值发生变化时, 发送通知消息给 DNS为:  The method according to claim 3, wherein when the IP address server corresponding to the domain name detects that the load value changes, the notification message is sent to the DNS:
同一域名对应的 IP地址服务器按照预先设置的周期及同一负荷算法, 计算自身当前的负荷值, 并将计算得到的负荷值与自身上一周期的负荷值 进行比较, 当比较结果超出预设的阀值时, 发送通知消息给 DNS。  The IP address server corresponding to the same domain name calculates its current load value according to a preset period and the same load algorithm, and compares the calculated load value with the load value of its previous cycle, when the comparison result exceeds the preset valve. When the value is sent, a notification message is sent to the DNS.
5、 根据权利要求 4所述的方法, 其中, 所述当比较结果超出预设的阀 值为: 计算得到的负荷值相对于自身上一周期的负荷值的波动超过 ± 5%。  5. The method according to claim 4, wherein the comparison result exceeds a preset threshold value: the calculated load value fluctuates by more than ± 5% with respect to the load value of its previous cycle.
6、 根据权利要求 1所述的方法, 其中, 所述 DNS查询所述 IP地址服 务器的负荷值为:  6. The method according to claim 1, wherein the DNS queries the load value of the IP address server as:
DNS的动态负荷查询模块发送 DNS动态负荷查询 DNS-DLQ消息至所 述 IP地址服务器;  The DNS dynamic load query module sends a DNS dynamic load query DNS-DLQ message to the IP address server;
所述 IP 地址服务器返回包含有所述 IP 地址服务器的负荷值的 DNS-DLQ响应给 DNS。 The IP address server returns a DNS-DLQ response containing the load value of the IP address server to the DNS.
7、 一种 DNS, 其中, 所述系统包括: 动态负荷查询模块、 DNS服务 器; 其中, 7. A DNS, wherein the system comprises: a dynamic load query module, a DNS server; wherein
动态负荷查询模块, 设置为接收到域名对应的 IP地址服务器发来的通 知消息后, 查询所述 IP地址服务器的负荷值, 并发送更新消息;  The dynamic load query module is configured to: after receiving the notification message sent by the IP address server corresponding to the domain name, query the load value of the IP address server, and send an update message;
DNS服务器, 设置为接收到所述更新消息后, 更新所述 IP地址服务器 对应 IP地址的负荷值;接收到 DNS客户端发来的域名查询消息后,查询所 述域名对应的 IP地址, 并将负荷值最小的 IP地址返回给 DNS客户端。  The DNS server is configured to: after receiving the update message, update a load value of the IP address corresponding to the IP address server; after receiving the domain name query message sent by the DNS client, query the IP address corresponding to the domain name, and The IP address with the lowest load value is returned to the DNS client.
8、 根据权利要求 7所述的 DNS, 其中, 所述 DNS服务器, 设置为存 储域名对应的 IP地址及该 IP地址的负荷值。  The DNS according to claim 7, wherein the DNS server is configured to store an IP address corresponding to the domain name and a load value of the IP address.
9、 根据权利要求 7所述的 DNS, 其中, 所述动态负荷查询模块, 设置 为发送 DNS-DLQ消息至所述 IP地址服务器,并接收所述 IP地址服务器返 回的包含有所述 IP地址服务器的负荷值的 DNS-DLQ响应。  The DNS according to claim 7, wherein the dynamic load query module is configured to send a DNS-DLQ message to the IP address server, and receive the server that includes the IP address returned by the IP address server. The load value of the DNS-DLQ response.
PCT/CN2011/077923 2011-01-04 2011-08-02 Domain name system and method thereof for providing load balancing WO2012092765A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110000688.X 2011-01-04
CN201110000688XA CN102572001A (en) 2011-01-04 2011-01-04 Domain name system (DNS) and method for providing load balancing

Publications (1)

Publication Number Publication Date
WO2012092765A1 true WO2012092765A1 (en) 2012-07-12

Family

ID=46416457

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/077923 WO2012092765A1 (en) 2011-01-04 2011-08-02 Domain name system and method thereof for providing load balancing

Country Status (2)

Country Link
CN (1) CN102572001A (en)
WO (1) WO2012092765A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017129992A1 (en) * 2016-01-29 2017-08-03 Tectonic Interactive Limited System and method for managing communication sessions between clients and a server
CN111711706A (en) * 2020-04-30 2020-09-25 广州根链国际网络研究院有限公司 DNS recursive request method and system
EP3884650B1 (en) * 2018-11-20 2024-03-06 Microsoft Technology Licensing, LLC Load balancing among multiple endpoint computing systems of a domain

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856569B (en) * 2012-11-28 2018-09-11 方正宽带网络服务有限公司 A kind of method and apparatus of synchronous domain name system asset information
CN105610995A (en) * 2015-09-11 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Selection method of DNS server, selection device of the DNS server and terminal
CN114006833B (en) * 2021-10-29 2023-04-11 中电福富信息科技有限公司 Detection evasion method for ENUM (Enterprise management Module) query fault
CN116633864B (en) * 2023-07-19 2023-11-03 国家计算机网络与信息安全管理中心江西分中心 Flow scheduling method based on cloud computing platform

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010049741A1 (en) * 1999-06-18 2001-12-06 Bryan D. Skene Method and system for balancing load distribution on a wide area network
CN1819594A (en) * 2005-02-09 2006-08-16 株式会社日立制作所 Congestion controller and method for controlling congestion of network
CN101171821A (en) * 2005-04-13 2008-04-30 诺基亚公司 System, network device, method, and computer program product for active load balancing using clustered nodes as authoritative domain name servers
CN101340327A (en) * 2008-08-21 2009-01-07 腾讯科技(深圳)有限公司 Method, system and domain name parsing server implementing load balance of network server
US7574508B1 (en) * 2002-08-07 2009-08-11 Foundry Networks, Inc. Canonical name (CNAME) handling for global server load balancing
US7657629B1 (en) * 2000-09-26 2010-02-02 Foundry Networks, Inc. Global server load balancing
CN101815104A (en) * 2010-03-19 2010-08-25 中兴通讯股份有限公司 Network protocol address feedback method and domain name resolution server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101600000A (en) * 2009-06-26 2009-12-09 中国电信股份有限公司 The data communications method and the system of IPv6 user capture IPv4 website

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010049741A1 (en) * 1999-06-18 2001-12-06 Bryan D. Skene Method and system for balancing load distribution on a wide area network
US7657629B1 (en) * 2000-09-26 2010-02-02 Foundry Networks, Inc. Global server load balancing
US7574508B1 (en) * 2002-08-07 2009-08-11 Foundry Networks, Inc. Canonical name (CNAME) handling for global server load balancing
CN1819594A (en) * 2005-02-09 2006-08-16 株式会社日立制作所 Congestion controller and method for controlling congestion of network
CN101171821A (en) * 2005-04-13 2008-04-30 诺基亚公司 System, network device, method, and computer program product for active load balancing using clustered nodes as authoritative domain name servers
CN101340327A (en) * 2008-08-21 2009-01-07 腾讯科技(深圳)有限公司 Method, system and domain name parsing server implementing load balance of network server
CN101815104A (en) * 2010-03-19 2010-08-25 中兴通讯股份有限公司 Network protocol address feedback method and domain name resolution server

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017129992A1 (en) * 2016-01-29 2017-08-03 Tectonic Interactive Limited System and method for managing communication sessions between clients and a server
US10819801B2 (en) 2016-01-29 2020-10-27 Tectonic Interactive Limited System and method for managing communication sessions between clients and a server
EP3884650B1 (en) * 2018-11-20 2024-03-06 Microsoft Technology Licensing, LLC Load balancing among multiple endpoint computing systems of a domain
CN111711706A (en) * 2020-04-30 2020-09-25 广州根链国际网络研究院有限公司 DNS recursive request method and system
CN111711706B (en) * 2020-04-30 2023-04-07 广州根链国际网络研究院有限公司 DNS recursive request method and system

Also Published As

Publication number Publication date
CN102572001A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
WO2012092765A1 (en) Domain name system and method thereof for providing load balancing
US20110271005A1 (en) Load balancing among voip server groups
US9906488B2 (en) Surrogate name delivery network
US20180205697A1 (en) Managing content delivery network service providers by a content broker
US9154557B2 (en) Automatic proxy registration and discovery in a multi-proxy communication system
JP5404766B2 (en) Method and system for requesting routing
US9525659B1 (en) Request routing utilizing point of presence load information
AU2011307319B2 (en) Request routing in a networked environment
US9264358B2 (en) Alias resource record sets
US10560422B2 (en) Enhanced inter-network monitoring and adaptive management of DNS traffic
US11522829B2 (en) Determining traceability of network traffic over a communications network
US11005736B2 (en) Determining traceability of network traffic over a communications network
WO2015039475A1 (en) Method, server, and system for domain name resolution
WO2014128707A4 (en) Increased data transfer rate method and system for regular internet user
JPWO2021040827A5 (en)
JP2007124655A (en) Method for selecting functional domain name server
US10044832B2 (en) Data request multiplexing
US7965630B1 (en) Load balancing port proxy for dynamically controlling routing of query requests
WO2017000561A1 (en) Domain name resource record caching control method and server
JP6540063B2 (en) Communication information control apparatus, relay system, communication information control method, and communication information control program
WO2012058238A2 (en) Surrogate name delivery network
US11095605B1 (en) Request routing utilizing encoded DNS-based messaging parameters
Deb et al. An improved DNS server selection algorithm for faster lookups
US20230308413A1 (en) Discovering services across networks based on a multicast domain name system protocol
Liu et al. A scheme of integrating DNS into P2P service network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11854799

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11854799

Country of ref document: EP

Kind code of ref document: A1