WO2011116726A2 - Method and system for network caching, domain name system redirection sub-system thereof - Google Patents

Method and system for network caching, domain name system redirection sub-system thereof Download PDF

Info

Publication number
WO2011116726A2
WO2011116726A2 PCT/CN2011/073566 CN2011073566W WO2011116726A2 WO 2011116726 A2 WO2011116726 A2 WO 2011116726A2 CN 2011073566 W CN2011073566 W CN 2011073566W WO 2011116726 A2 WO2011116726 A2 WO 2011116726A2
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
dns
address
subsystem
cache
Prior art date
Application number
PCT/CN2011/073566
Other languages
French (fr)
Chinese (zh)
Other versions
WO2011116726A3 (en
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 华为技术有限公司
Priority to PCT/CN2011/073566 priority Critical patent/WO2011116726A2/en
Priority to CN201180000699.6A priority patent/CN102301682B/en
Publication of WO2011116726A2 publication Critical patent/WO2011116726A2/en
Publication of WO2011116726A3 publication Critical patent/WO2011116726A3/en

Links

Classifications

    • 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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Definitions

  • the present invention relates to network communication technologies, and in particular, to a network cache method and system, and a Domain Name System (DNS) redirection subsystem.
  • DNS Domain Name System
  • the Cache scheme caches the content frequently accessed by users on the cache server.
  • the cache server provides services for users. It does not need to occupy the processing power of the source server and the egress bandwidth of the backbone, which can save resources and speed up access.
  • the existing caching scheme mainly includes a WebCache solution based on policy routing.
  • the policy-based routing WebCache solution is to configure policy routing on the router to forward the HyperText Transfer Protocol (HTTP) request from the user to the Cache subsystem.
  • HTTP HyperText Transfer Protocol
  • the embodiments of the present invention provide a network caching method and system, and a DNS redirection subsystem, which are used to solve the problem of the prior art policy-based network caching scheme.
  • An embodiment of the present invention provides a network caching method, including: receiving a domain name system DNS resolution request sent by a client, parsing a domain name carried by the DNS resolution request, and determining that the domain name is in a white list; Obtaining an Internet Protocol IP address of the cache subsystem corresponding to the domain name, and sending the IP address of the cache subsystem to the client, so that the client sends the cache to the cache according to the IP address of the cache subsystem.
  • the system requests data.
  • the embodiment of the invention provides a network cache system, which includes:
  • the domain name system DNS redirection subsystem is configured to receive a domain name system DNS resolution request sent by the client, parse the domain name carried by the DNS resolution request, determine that the domain name is in the white list, and obtain a cache subsystem corresponding to the domain name.
  • An internet protocol IP address and sending the IP address of the cache subsystem to the client, so that the client requests data from the cache subsystem according to the IP address of the cache subsystem;
  • the embodiment of the present invention provides a DNS redirection subsystem, including: a deep packet parsing device, configured to receive a domain name system DNS resolution request sent by a client, parse the domain name carried by the DNS resolution request, and determine the domain name. In the white list;
  • a DNS server configured to obtain an internet protocol IP address of a cache subsystem corresponding to the domain name, and send an IP address of the cache subsystem to the client, so that the client is configured according to the IP address of the cache subsystem Request data from the cache subsystem.
  • the network cache is implemented by the DNS redirection subsystem, which avoids the problem of network caching based on policy routing.
  • the configuration is simple, difficult to maintain, and does not cause single point failure at the router. Sex is higher.
  • FIG. 1 is a schematic flow chart of a method according to a first embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a system according to a second embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of a method according to a second embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a DNS redirection subsystem according to a second embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for acquiring data from a source server by a cache subsystem according to an embodiment of the present invention
  • FIG. 6 is a flowchart of a third embodiment of the present invention. Schematic diagram of the process
  • FIG. 7 is a schematic flow chart of a method according to a fourth embodiment of the present invention.
  • FIG. 8 is a schematic flow chart of a method according to a fifth embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a network cache system according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a DNS redirection subsystem according to an embodiment of the present invention. detailed description
  • a DNS redirection subsystem receives a DNS resolution request sent by a client, parses a domain name carried by the DNS resolution request, and determines that the domain name is white.
  • the DNS redirection subsystem may receive the Internet access request, and the Internet access request may be a DNS resolution request. Because the DNS redirection subsystem processes the DNS resolution request, the DNS redirection subsystem parses the Internet access. After the request is resolved by the DNS, the subsequent processing is performed.
  • Step 12 The DNS redirection subsystem acquires an IP address of the cache subsystem corresponding to the domain name, and sends an IP address of the cache subsystem to the client, so that the client can perform IP according to the cache subsystem.
  • the address requests data from the cache subsystem.
  • the network cache is implemented by the DNS redirection system, which can avoid network cache based on policy routing, and has high reliability, network delay time period, does not affect other service performance, and does not cause existing network topology. Under the condition of impact, it can save export bandwidth, reduce inter-network settlement, improve network utilization efficiency, reduce network operation cost, and enhance user experience.
  • the embodiment shown in FIG. 1 is taken as an example in which the client obtains data from the cache subsystem.
  • the client may also obtain data from the source server instead of the cache subsystem.
  • the present invention provides a Specific embodiment.
  • FIG. 2 is a schematic structural diagram of a system according to a second embodiment of the present invention.
  • a client 21, a Domain Name System (DNS) redirection subsystem 22, a cache (Cache) subsystem 23, and an external network 24 including a source server are included.
  • the cache subsystem includes a load balancer and a network cache (WebCache) server, wherein, to improve reliability, the load balancer includes a primary load balancer and a backup load balancer.
  • some routers and switches are included in the system.
  • FIG. 3 is a schematic flowchart of a method according to a second embodiment of the present invention, including:
  • Step 31 The client sends an online request, and the online request includes the domain name requested by the client.
  • DNS domain name system
  • the external network may include an external network DNS server and a source server, and the Internet request is parsed by the external network DNS server, and the IP address of the source server may be obtained, so that the client obtains the requirement from the source server according to the IP address of the source server.
  • the data is parsed by the external network DNS server, and the IP address of the source server may be obtained, so that the client obtains the requirement from the source server according to the IP address of the source server.
  • Step 33 The DNS redirection subsystem performs deep packet parsing on the online request (Deep).
  • the Internet request can resolve the DNS for DNS resolution request Parsing the request and obtaining the domain name corresponding to the DNS resolution request. If the domain name is whitelisted in the DNS redirection subsystem, the IP address of the cache subsystem is obtained according to the domain name corresponding to the DNS resolution request, and the cache subsystem is The IP address is carried in the DNS response and returned to the client. If the domain name is not in the whitelist in the DNS redirection subsystem, the DNS resolution request is discarded.
  • the whitelist may be configured in the DNS redirection subsystem, where the domain name of the hotspot network or the domain name of the contracted network is saved, and the domain name saved in the whitelist indicates that the content corresponding to the domain name is cached in the cache subsystem.
  • the client can directly obtain the corresponding data in the cache subsystem.
  • the whitelist can be manually configured in advance.
  • the domain name saved in the whitelist can be the domain name of the hotspot network and/or the subscription network.
  • the hotspot network is Refers to a network that has reached a certain number of times in a certain period of time (this specific time and a specific number of times can be set according to time).
  • the contracted network refers to a network that has a service relationship with the DNS redirection subsystem, for example, a prior agreement of the A network.
  • the data is cached, and the A network is a contracted network. If the domain name corresponding to the DNS resolution request is in the white list, the IP address of the cache subsystem corresponding to the domain name is searched. If the domain name corresponds to the unique cache subsystem, the IP address of the cache subsystem may be used.
  • the bearer is returned to the client in the DNS response; if the domain name corresponds to multiple cache subsystems, the DNS redirection subsystem selects an IP address of a cache subsystem corresponding to the domain name according to the IP address selection algorithm, and returns to carry The DNS response of the IP address of the cache subsystem, for example, algorithms that can be selected according to priority include: Round-Trip Time (RTT) algorithm, Topology algorithm, and Global Availability algorithm .
  • RTT Round-Trip Time
  • Topology algorithm Topology algorithm
  • Global Availability algorithm Global Availability
  • the DNS server can select the RTT algorithm as the preferred algorithm for selecting the IP address of the cache subsystem corresponding to the domain name, that is, all DNS resolution requests are calculated by the DNS server to ensure the optimization of most user access, such as
  • the cache subsystem closest to the user who sent the DNS resolution request is selected as the corresponding cache subsystem as the cache subsystem accessed by the user.
  • the Topology algorithm is used as a supplementary algorithm for RTT dynamic calculation. When there is no result in the RTT calculation mode, the cache subsystem on the local area network to which the user belongs is selected as the cache subsystem for user access.
  • the default algorithm which selects all DNS resolution requests that cannot be calculated and is not in the scope of Topology, selects the default cache subsystem of the DNS redirection subsystem as the cache subsystem for user access. If the domain name corresponding to the DNS resolution request does not exist in the whitelist, the DNS redirection subsystem does not process, discards the DNS resolution request, and does not return a DNS response to the client.
  • the DNS redirection subsystem may specifically include the DPI device 41 and the DNS server 42, and may also include some general-purpose devices, such as switches, and the DNS server may adopt an active/standby mode, for example, including a primary DNS.
  • the server DNS server - primary in Figure 4
  • the alternate DNS server DNS server in Figure 4 - standby.
  • the DPI device is configured to perform DPI parsing on the received uplink request to obtain whether the Internet access request is a DNS resolution request. If it is a DNS resolution request, the DNS resolution request is parsed to obtain the carried domain name, and the domain name is sent to the DNS server.
  • the DNS server can save the above-mentioned whitelist.
  • the IP address of the cache subsystem corresponding to the domain name carried in the DNS resolution request is determined.
  • the cache subsystem IP address is then carried back to the client in the DNS response.
  • the DNS server may discard the DNS resolution request.
  • the DNS server in the above DNS redirection subsystem can use the (Global Server Load Balance, GSLB) load balancing global server.
  • the GSLB can be configured with a whitelist and a mapping table between the domain name and the IP address of the cache subsystem. If the domain name corresponding to the DNS resolution request is included in the whitelist, the domain name and the IP address of the cache subsystem are used. The correspondence table can obtain the IP address of the cache subsystem corresponding to the domain name. Of course, if the domain name corresponding to the DNS resolution request is not in the whitelist, the GSLB may discard the DNS resolution request.
  • Step 34 The external network responds to the online request, and carries the IP address of the source server in the DNS response and returns it to the client.
  • the IP address of the source server may be parsed by the DNS server in the external network, and the IP address of the source server is found, and then the IP address of the source server is carried in the DNS response and returned to the client.
  • the DNS redirection subsystem is closer to the user than the DNS server of the external network. Therefore, the DNS response returned by the DNS redirection subsystem reaches the client first, so the client will process the DNS response returned by the DNS redirection subsystem. That is, the DNS response returned by the DNS redirection subsystem takes effect. Since the DNS response of the DNS redirection subsystem takes effect, the client obtains the IP address of the cache subsystem. After that, the client can obtain data from the cache subsystem according to the IP address of the cache subsystem.
  • the client may also receive the DNS response of the external network first, or only receive the DNS response of the external network, the client directly accesses the IP address of the source server included in the DNS response of the external network.
  • the source server and get data from the source server.
  • the client After receiving the IP address of the cache subsystem, the client sends a data query request to the cache subsystem, and the data query request may be a web request. If the data corresponding to the data query request is saved in the cache subsystem, the data is returned to the client.
  • the DNS redirection subsystem can also be used to provide resource scheduling.
  • the resource scheduling function can implement whitelist update.
  • the DPI device can perform in-depth analysis on the DNS resolution request, and periodically generate a hotspot ranking table for the user to access the website domain name, for example, a hotspot website ranking that is generated by a user who generates an excel or a text format every week. table.
  • the analysis results of DPI devices can be obtained periodically, and the analysis results of each DPI device are summarized, and the white list of the global load balancing server configuration is refreshed according to the analysis result, so as to improve the user's hit rate and speed up the user's access speed. Improve users' online experience and save Internet settlement.
  • the client side may further include a local DNS (Local DNS) server, where the mapping relationship between the domain name and the IP address of the cache subsystem may be recorded, so as to quickly determine the IP address of the cache subsystem corresponding to the DNS resolution request.
  • DNS Local DNS
  • step 31 when the client sends the Internet access request, the Internet access request is first sent to the local DNS server, and if the Local DNS server saves the correspondence table between the domain name and the cache subsystem IP address, and the relationship table is still valid, The local DNS server resolves the internet request Corresponding domain name, and looking up the IP address of the cache subsystem corresponding to the domain name. If the IP address of the cache subsystem corresponding to the domain name is unique, return the IP address of the cache subsystem to the client, and step 32- If the IP address of the cache subsystem corresponding to the domain name is multiple, the IP address of a cache subsystem corresponding to the domain name is selected according to the algorithm selected according to the priority, and is returned to the client. With the IP address of the cache subsystem, and steps 32-35 are skipped, no execution is required. If the local DNS server does not record the correspondence table of the domain name and the cache subsystem IP address or the record has expired, then go to step 32.
  • the cache subsystem may obtain the data from the source server and then return the data to the client.
  • the data stored in the cache subsystem may be obtained from the source server.
  • the cache subsystem may obtain initial data from the source server, and then periodically obtain data from the source server for update.
  • the flow of the cache subsystem to obtain data from the source server can be seen in the embodiment shown in FIG.
  • FIG. 5 is a schematic flowchart of a process for a cache subsystem to obtain data from a source server according to an embodiment of the present invention, including:
  • Step 51 The cache subsystem sends a data request message to the source server.
  • the cache subsystem periodically sends the data request message to the source server at a preset time point.
  • the cache subsystem sends the data request message to the source server when receiving the request data sent by the client.
  • the data request message may be sent by the cache subsystem to the source server via the L3 switch, the load balancing device, and the router.
  • Step 52 The source server sends the data corresponding to the data request message to the cache subsystem. Similarly, if there are routers, L3 switches, load balancing devices, etc. in the network cache system, the data can be sent by the source server to the source server via the router, load balancing device, and L3 switch.
  • the devices through which the above paths pass may also be different. of.
  • a plurality of cache servers may be included in the cache subsystem for storing data of different source servers separately.
  • the management platform can be used to determine the cache server corresponding to the source server.
  • the management platform includes a resource scheduling module, the resource scheduling module implements monitoring and management of the network node resources, and can also access the website, the hotspot area, or the hotspot period for the entire network.
  • the analysis and statistics can also dynamically adjust and optimize the network resources for the hotspot analysis results, so that the cache server that is close to the source server of the hotspot access area caches the data accessed by the hotspot, and the physical distance is shortened, which can improve the user's Internet access.
  • the experience also saves internet settlement costs.
  • the cache subsystem will store the data, and then the corresponding data can be returned according to the client's request.
  • the data requested by the client may be saved in the cache subsystem, and may not be saved. The following two scenarios are respectively described in FIG. 6 and FIG. 7 below.
  • FIG. 6 is a schematic flowchart of a method according to a third embodiment of the present invention.
  • the data requested by the client in the cache subsystem is saved as an example.
  • the embodiment includes:
  • Step 61 The client sends a DNS resolution request to the DNS redirection subsystem.
  • Step 62 The DNS redirection subsystem carries the IP address of the cache subsystem in the DNS response and sends it to the client.
  • Step 63 The client sends a data query request to the cache subsystem according to the IP address of the cache subsystem.
  • Step 64 If the data corresponding to the data query request is saved in the cache subsystem, the data is returned to the client.
  • the client may send a data query request to the cache subsystem via the router and the L3 switch; accordingly, the cache subsystem sends the data to the L3 switch and the router. Client.
  • the load balancing device and the cache server may be included in the cache subsystem, and the load balancing device is configured to manage each cache server, and can learn the load status of each cache server. After that, when After receiving the data query request sent by the client, the load balancing device may send the received data query request to the cache server with a light load according to the load condition of each cache server, and the cache server processes the data and returns the data to the client. end.
  • FIG. 7 is a schematic flowchart of a method according to a fourth embodiment of the present invention.
  • the data in the cache subsystem that does not save the client request is used as an example. Referring to FIG. 7, this embodiment includes:
  • Step 71 The client sends a DNS resolution request to the DNS redirection subsystem.
  • Step 72 The DNS redirection subsystem carries the IP address of the cache subsystem in the DNS response and sends it to the client.
  • Step 73 The client sends a data query request to the cache subsystem according to the IP address of the cache subsystem.
  • Step 74 If the data corresponding to the data query request is not saved in the cache subsystem, the data query request is forwarded to the source server.
  • Step 75 The source server returns data corresponding to the data query request to the cache subsystem.
  • Step 76 The cache subsystem sends the data returned by the source server to the client.
  • the cache subsystem can save the acquired data itself, so that the corresponding data can be provided when the client requests the next time.
  • the client may send a data query request to the cache subsystem via the router and the L3 switch; accordingly, the cache subsystem sends the data to the client via the L3 switch and the router. .
  • the load balancing device and the cache server may be included in the cache subsystem, and the load balancing device is configured to manage each cache server, and can learn the load status of each cache server. Then, after receiving the data query request sent by the client, the load balancing device may send the received data query request to the cache server with a light load according to the load condition of each cache server, and the cache server processes the data.
  • the DNS redirection subsystem is capable of returning to the cache subsystem.
  • the IP address of the DNS redirection subsystem stores the domain name corresponding to the DNS resolution request. If the domain name corresponding to the DNS resolution request is not saved in the whitelist, the embodiment shown in Figure 8 can be performed. deal with.
  • FIG. 8 is a schematic flowchart of a method according to a fifth embodiment of the present invention.
  • a domain name corresponding to a DNS resolution request is not stored in the DNS redirection subsystem.
  • the embodiment includes: Step 81: Client to The DNS redirection subsystem and the external network DNS server send DNS resolution requests.
  • the DNS resolution request is split into two paths through the optical splitter, and is sent to the DNS redirection subsystem and the other to the external network DNS server.
  • Step 82 The DNS redirection subsystem discards the received DNS resolution request.
  • the whitelist is saved in the DNS redirection subsystem. If the domain name corresponding to the received DNS resolution request is not in the whitelist, the DNS redirection subsystem cannot provide the IP address of the cache subsystem. In this case, the DNS redirector The system discards the DNS resolution request.
  • Step 83 The external network DNS server carries the IP address of the source server in the DNS response and returns it to the client.
  • the external network DNS server stores the mapping between the domain name and the IP address of the source server. According to the domain name corresponding to the DNS resolution request, the IP address of the source server can be obtained. Then, the IP address of the source server is carried in the DNS response. To the client.
  • Step 84 The client sends a data query request to the source server according to the IP address of the source server.
  • Step 85 The source server sends the data corresponding to the data query request to the client.
  • the client may send a data query request to the source server via the router, and then the source server sends data to the client via the router.
  • GSLB and switch adopt 1+1 backup mode
  • load balancing module can also adopt 1+1 backup mode
  • network cache server can use homogeneous node dynamic backup technology to ensure high availability of the entire solution.
  • Resource scheduling can be used to dynamically divide user traffic to ensure that the Web Cache system is not overloaded.
  • FIG. 9 is a schematic structural diagram of a network cache system according to an embodiment of the present invention, including a DNS redirection subsystem 901 and a cache subsystem 902.
  • the DNS redirection subsystem 901 is configured to receive a domain name system DNS resolution request sent by a client, and parse the Defining the domain name carried in the DNS resolution request, determining that the domain name is in the white list; obtaining an internet protocol IP address of the cache subsystem corresponding to the domain name, and sending the IP address of the cache subsystem to the client, so that The client requests data from the cache subsystem according to the IP address of the cache subsystem; the cache subsystem 902 is configured to receive a data request message sent by the client according to the IP address of the cache subsystem, and The client sends data corresponding to the data request message.
  • the cache subsystem 902 is specifically configured to receive a data request message sent by the client; if the cache subsystem has data corresponding to the data request message, the cache subsystem caches the data The data corresponding to the request message is sent to the client; if the data corresponding to the data request message is not cached in the cache subsystem, the cache subsystem sends a data request message for querying data to the source server.
  • the cache subsystem receives data corresponding to the data request message of the query data returned by the source server, and the cache subsystem saves the data locally and sends the data to the client.
  • the cache subsystem 902 is further configured to: the cache subsystem acquires data from the source server according to a refresh policy, and updates the cached data.
  • the system may further include: a splitter or a router, configured to divide the Internet access request sent by the client into two paths, send the same to the DNS redirection subsystem, and send the other path to the external network.
  • the network cache is implemented by the DNS redirection system, which can avoid network caching based on policy routing, and has high reliability, no network delay, does not affect other service performance, and does not affect the existing network topology. Under the condition, it can save export bandwidth, reduce inter-network settlement, improve network utilization efficiency, reduce network operation cost, and enhance user experience.
  • the DPI device 1001 is configured to receive a domain name system DNS resolution request sent by a client, and parse the DNS resolution request to carry The domain name is determined to be in the whitelist; the DNS server 1002 is configured to obtain an internet protocol IP address of the cache subsystem corresponding to the domain name, and send the IP address of the cache subsystem to the client, so as to The client requests data from the cache subsystem according to the IP address of the cache subsystem.
  • the DPI device 1001 may be further configured to perform in-depth analysis on the received DNS resolution request to generate a hotspot website for updating the whitelist.
  • the DNS server 1002 may be specifically configured to acquire an IP address of the unique cache subsystem if the domain name corresponds to an IP address of a unique cache subsystem; and if the domain name corresponds to an IP address of two or more cache subsystems, according to the IP address
  • the address selection algorithm selects an IP address of the adapted cache subsystem as the Internet Protocol IP address of the cache subsystem corresponding to the domain name.
  • the DNS server 1002 can be a GSLB.
  • the network cache is implemented by the DNS redirection system, which can avoid network caching based on policy routing, and has high reliability, no network delay, does not affect other service performance, and does not affect the existing network topology. Under the condition, it can save export bandwidth, reduce inter-network settlement, improve network utilization efficiency, reduce network operation cost, and enhance user experience.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

The present invention provides a method and a system for network caching, a Domain Name System (DNS) redirection sub-system thereof. The method includes: receiving a DNS resolution request sent from a client, parsing out a domain name carried by the DNS resolution request, and determining that the domain name is in a white list; obtaining the Internet Protocol (IP) address of the cache sub-system corresponding to the domain name, and sending the IP address of the cache sub-system to the client to enable the client to request data from the cache sub-system according to the IP address of the cache sub-system. The embodiments of the present invention can avoid the problem of network caching based on the policy route.

Description

网络緩存方法和系统及 DNS重定向子系统  Network caching method and system and DNS redirection subsystem
技术领域 Technical field
本发明涉及网络通信技术, 尤其涉及一种网络緩存方法和系统及域名系 统( Domain Name System, DNS )重定向子系统。 背景技术  The present invention relates to network communication technologies, and in particular, to a network cache method and system, and a Domain Name System (DNS) redirection subsystem. Background technique
随着互联网的发展, 网民对访问品质也会越来越挑剔, 一方面希望网站 提供的内容越来越丰富, 另一方面希望访问网站的速度越来越快。 由于网络 ( Web )服务器的网络架构是一点对多点的传输, 网络传输中包含了大量的 重复内容, 且超过 80%的用户经常访问 20%的内容, 因此緩存是以上问题的 最好的解决方案。 緩存(Cache )方案是将用户经常访问的内容緩存在緩存服 务器, 由緩存服务器为用户提供服务, 无需占用源服务器的处理能力和主干 的出口带宽, 可以节省资源并加快访问速度。  With the development of the Internet, Internet users will become more and more critical about the quality of their visits. On the one hand, they hope that the content provided by the website will become more and more abundant. On the other hand, they hope to access the website faster and faster. Since the network architecture of the network (Web) server is a point-to-multipoint transmission, the network transmission contains a large amount of duplicate content, and more than 80% of users frequently access 20% of the content, so the cache is the best solution to the above problem. Program. The Cache scheme caches the content frequently accessed by users on the cache server. The cache server provides services for users. It does not need to occupy the processing power of the source server and the egress bandwidth of the backbone, which can save resources and speed up access.
现有緩存方案主要包括基于策略路由的 WebCache解决方案。 基于策略 路由的 WebCache解决方案是指在路由器上配置策略路由, 将用户上网的超 文本传输协议 ( HyperText Transfer Protocol, HTTP )请求转发到緩存 ( Cache ) 子系统。 该方案下需要对路由器进行复杂的配置修改, 难以维护, 并且容易 在路由器处产生单点故障, 可靠性低。 发明内容  The existing caching scheme mainly includes a WebCache solution based on policy routing. The policy-based routing WebCache solution is to configure policy routing on the router to forward the HyperText Transfer Protocol (HTTP) request from the user to the Cache subsystem. In this solution, complex configuration changes need to be made to the router, which is difficult to maintain, and it is easy to generate a single point of failure at the router, and the reliability is low. Summary of the invention
本发明实施例是提供一种网络緩存方法和系统及 DNS重定向子系统,用 以解决现有技术中基于策略路由的网络緩存方案存在的问题。  The embodiments of the present invention provide a network caching method and system, and a DNS redirection subsystem, which are used to solve the problem of the prior art policy-based network caching scheme.
本发明实施例提供一种网络緩存方法, 包括: 接收客户端发送的域名系统 DNS解析请求, 解析出所述 DNS解析请求 携带的域名, 确定所述域名在白名单中; 获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系 统的 IP地址发送给所述客户端, 以便于客户端根据所述緩存子系统的 IP地 址向所述緩存子系统请求数据。 An embodiment of the present invention provides a network caching method, including: receiving a domain name system DNS resolution request sent by a client, parsing a domain name carried by the DNS resolution request, and determining that the domain name is in a white list; Obtaining an Internet Protocol IP address of the cache subsystem corresponding to the domain name, and sending the IP address of the cache subsystem to the client, so that the client sends the cache to the cache according to the IP address of the cache subsystem. The system requests data.
本发明实施例提供了一种网络緩存系统, 包括:  The embodiment of the invention provides a network cache system, which includes:
域名系统 DNS重定向子系统, 用于接收客户端发送的域名系统 DNS解 析请求, 解析出所述 DNS解析请求携带的域名, 确定所述域名在白名单中; 获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系统的 IP地址发送给所述客户端,以便于客户端根据所述緩存子系统的 IP地址向所 述緩存子系统请求数据; 緩存子系统, 用于接收所述客户端根据所述緩存子系统的 IP地址发送的 数据请求消息, 并向所述客户端发送与所述数据请求消息对应的数据。  The domain name system DNS redirection subsystem is configured to receive a domain name system DNS resolution request sent by the client, parse the domain name carried by the DNS resolution request, determine that the domain name is in the white list, and obtain a cache subsystem corresponding to the domain name. An internet protocol IP address, and sending the IP address of the cache subsystem to the client, so that the client requests data from the cache subsystem according to the IP address of the cache subsystem; Receiving a data request message sent by the client according to an IP address of the cache subsystem, and sending data corresponding to the data request message to the client.
本发明实施例提供了一种 DNS重定向子系统, 包括: 深层报文解析设备, 用于接收客户端发送的域名系统 DNS解析请求, 解 析出所述 DNS解析请求携带的域名, 确定所述域名在白名单中;  The embodiment of the present invention provides a DNS redirection subsystem, including: a deep packet parsing device, configured to receive a domain name system DNS resolution request sent by a client, parse the domain name carried by the DNS resolution request, and determine the domain name. In the white list;
DNS服务器, 用于获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系统的 IP地址发送给所述客户端, 以便于客户端根据所述緩 存子系统的 IP地址向所述緩存子系统请求数据。 a DNS server, configured to obtain an internet protocol IP address of a cache subsystem corresponding to the domain name, and send an IP address of the cache subsystem to the client, so that the client is configured according to the IP address of the cache subsystem Request data from the cache subsystem.
由上述技术方案可知,本发明实施例通过由 DNS重定向子系统实现网络 緩存, 可以避免基于策略路由的网络緩存的问题, 配置简单, 难以维护, 并 且不会在路由器处产生单点故障, 可靠性比较高。 附图说明  According to the foregoing technical solution, the network cache is implemented by the DNS redirection subsystem, which avoids the problem of network caching based on policy routing. The configuration is simple, difficult to maintain, and does not cause single point failure at the router. Sex is higher. DRAWINGS
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中 所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图是本发 明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的 前提下, 还可以根据这些附图获得其他的附图。 In order to more clearly illustrate the technical solutions in the embodiments of the present invention, a brief description of the drawings to be used in the description of the embodiments will be briefly made. It is obvious that the drawings in the following description are the present invention. For some embodiments of the present invention, other drawings may be obtained from those skilled in the art without any inventive labor.
图 1为本发明第一实施例的方法流程示意图;  1 is a schematic flow chart of a method according to a first embodiment of the present invention;
图 2为本发明第二实施例的系统的结构示意图;  2 is a schematic structural diagram of a system according to a second embodiment of the present invention;
图 3为本发明第二实施例的方法流程示意图;  3 is a schematic flow chart of a method according to a second embodiment of the present invention;
图 4为本发明第二实施例的 DNS重定向子系统的结构示意图; 图 5为本发明实施例中緩存子系统从源服务器获取数据的流程示意图; 图 6为本发明第三实施例的方法流程示意图;  4 is a schematic structural diagram of a DNS redirection subsystem according to a second embodiment of the present invention; FIG. 5 is a schematic flowchart of a method for acquiring data from a source server by a cache subsystem according to an embodiment of the present invention; FIG. 6 is a flowchart of a third embodiment of the present invention. Schematic diagram of the process;
图 7为本发明第四实施例的方法流程示意图;  7 is a schematic flow chart of a method according to a fourth embodiment of the present invention;
图 8为本发明第五实施例的方法流程示意图;  8 is a schematic flow chart of a method according to a fifth embodiment of the present invention;
图 9为本发明实施例的网络緩存系统的结构示意图;  FIG. 9 is a schematic structural diagram of a network cache system according to an embodiment of the present invention;
图 10为本发明实施例的 DNS重定向子系统的结构示意图。 具体实施方式  FIG. 10 is a schematic structural diagram of a DNS redirection subsystem according to an embodiment of the present invention. detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图 1为本发明第一实施例的方法流程示意图, 包括: 步骤 11 : DNS重定向子系统接收客户端发送的 DNS解析请求, 解析出 所述 DNS解析请求携带的域名, 确定所述域名在白名单中; 其中, 可以具体为 DNS重定向子系统接收上网请求, 该上网请求可以为 DNS解析请求, 由于 DNS重定向子系统是对 DNS解析请求进行处理, 因此 DNS重定向子系统在解析出上网请求为 DNS解析请求后, 进行后续处理。 步骤 12: DNS重定向子系统获取所述域名对应的緩存子系统的 IP地址, 并将所述緩存子系统的 IP地址发送给所述客户端, 以便于客户端根据所述緩 存子系统的 IP地址向所述緩存子系统请求数据。 1 is a schematic flowchart of a method according to a first embodiment of the present invention, including: Step 11: A DNS redirection subsystem receives a DNS resolution request sent by a client, parses a domain name carried by the DNS resolution request, and determines that the domain name is white. In the list, the DNS redirection subsystem may receive the Internet access request, and the Internet access request may be a DNS resolution request. Because the DNS redirection subsystem processes the DNS resolution request, the DNS redirection subsystem parses the Internet access. After the request is resolved by the DNS, the subsequent processing is performed. Step 12: The DNS redirection subsystem acquires an IP address of the cache subsystem corresponding to the domain name, and sends an IP address of the cache subsystem to the client, so that the client can perform IP according to the cache subsystem. The address requests data from the cache subsystem.
本实施例通过由 DNS重定向自系统实现网络緩存,可以避免基于策略路 由的网络緩存, 并且具有可靠性高, 网络时延时间段, 不影响其他业务性能, 不会对现有网络拓朴造成影响的条件下, 达到节省出口带宽、 降低网间结算、 提高网络利用效率、 降低网络运营成本、 提升用户体验的目的。 上述图 1所 示实施例是以客户端从緩存子系统中获取数据为例, 在具体实施例, 客户端 也可能从源服务器而不是緩存子系统中获取数据, 为此, 本发明给出一个具 体实施例。  In this embodiment, the network cache is implemented by the DNS redirection system, which can avoid network cache based on policy routing, and has high reliability, network delay time period, does not affect other service performance, and does not cause existing network topology. Under the condition of impact, it can save export bandwidth, reduce inter-network settlement, improve network utilization efficiency, reduce network operation cost, and enhance user experience. The embodiment shown in FIG. 1 is taken as an example in which the client obtains data from the cache subsystem. In a specific embodiment, the client may also obtain data from the source server instead of the cache subsystem. To this end, the present invention provides a Specific embodiment.
图 2为本发明第二实施例的系统的结构示意图, 参见图 2, 包括客户端 21、 域名系统(DNS )重定向子系统 22、 緩存(Cache )子系统 23、 包含源 服务器的外部网络 24和分光器(或者路由器镜像) 25。 緩存子系统中包括负 载均衡器和网络緩存(WebCache )服务器, 其中, 为了提高可靠性, 负载均 衡器包括主用负载均衡器和备用负载均衡器。 另外, 该系统中还包括一些路 由器和交换机。  2 is a schematic structural diagram of a system according to a second embodiment of the present invention. Referring to FIG. 2, a client 21, a Domain Name System (DNS) redirection subsystem 22, a cache (Cache) subsystem 23, and an external network 24 including a source server are included. And the splitter (or router image) 25. The cache subsystem includes a load balancer and a network cache (WebCache) server, wherein, to improve reliability, the load balancer includes a primary load balancer and a backup load balancer. In addition, some routers and switches are included in the system.
参考图 2所示的系统架构, 本实施例的流程可以如图 3所示:  Referring to the system architecture shown in Figure 2, the process of this embodiment can be as shown in Figure 3:
图 3为本发明第二实施例的方法流程示意图, 包括:  FIG. 3 is a schematic flowchart of a method according to a second embodiment of the present invention, including:
步骤 31 : 客户端发送上网请求, 该上网请求包含了客户端请求的域名。 步骤 32: 分光器接收到上述上网请求, 并将上网请求分别发送给域名系 统(DNS )重定向子系统和外部网络。  Step 31: The client sends an online request, and the online request includes the domain name requested by the client. Step 32: The optical splitter receives the above-mentioned online request, and sends the online request to the domain name system (DNS) redirection subsystem and the external network respectively.
其中,外部网络中可以包括外网 DNS服务器和源服务器,通过外网 DNS 服务器对该上网请求进行解析, 并可以获取源服务器的 IP地址, 以便客户端 根据源服务器的 IP地址从源服务器获取需要的数据。  The external network may include an external network DNS server and a source server, and the Internet request is parsed by the external network DNS server, and the IP address of the source server may be obtained, so that the client obtains the requirement from the source server according to the IP address of the source server. The data.
步骤 33 : DNS 重定向子系统对该上网请求进行深层报文解析(Deep Step 33: The DNS redirection subsystem performs deep packet parsing on the online request (Deep
Packet Inspection, DPI )解析,该上网请求可以为 DNS解析请求,解析该 DNS 解析请求, 获得该 DNS解析请求对应的域名, 如果该域名在 DNS重定向子 系统中白名单时, 则根据该 DNS解析请求对应的域名获取緩存子系统的 IP 地址, 并将该緩存子系统的 IP地址携带在 DNS响应中返回给客户端, 如果 该域名不在 DNS重定向子系统中的白名单中, 则丟弃该 DNS解析请求。 Packet Inspection, DPI), the Internet request can resolve the DNS for DNS resolution request Parsing the request and obtaining the domain name corresponding to the DNS resolution request. If the domain name is whitelisted in the DNS redirection subsystem, the IP address of the cache subsystem is obtained according to the domain name corresponding to the DNS resolution request, and the cache subsystem is The IP address is carried in the DNS response and returned to the client. If the domain name is not in the whitelist in the DNS redirection subsystem, the DNS resolution request is discarded.
具体地, 可以在 DNS重定向子系统中配置白名单, 该白名单中保存了热 点网络域名或签约网络的域名, 在白名单中保存的域名, 表示该域名对应的 内容被緩存子系统中緩存了, 客户端可以直接到緩存子系统中去获取相应的 数据, 其中, 上述的白名单可以预先进行人工配置, 白名单中保存的域名可 以为热点网络和 /或签约网络的域名, 热点网络是指特定时间内访问量达到特 定次数的网络(该特定时间和特定次数可以根据时间需要设定) , 签约网络 是指与该 DNS重定向子系统存在服务关系的网络, 例如, 事先约定 A网络 的数据进行緩存, 则 A网络为签约网络。 如果解析获得该 DNS解析请求对 应的域名在白名单中, 则查找该域名对应的緩存子系统的 IP地址是多少, 如 果该域名对应的唯一緩存子系统, 则可以将该緩存子系统的 IP 地址携带在 DNS响应中返回给客户端; 如果该域名对应的多个緩存子系统, 则 DNS重 定向子系统根据 IP地址选择算法,来选择该域名对应的一个緩存子系统的 IP 地址, 并且返回携带该緩存子系统的 IP地址的 DNS响应, 例如, 按照优先 级可以选用的算法包括: 往返时延(Round-Trip Time, RTT ) 算法、 拓朴 ( Topology )算法和全局可达(Global Availability )算法。 例如: DNS服务 器可以选择 RTT算法作为选择域名对应的緩存子系统的 IP地址的优选算法, 即所有的 DNS解析请求均被 DNS服务器计算其就近性, 以保证绝大部分用 户访问的最优化, 比如, 当对应一个 DNS解析请求存在多个可用的緩存子系 统时,选择与发送该 DNS解析请求的用户最近的緩存子系统作为对应的緩存 子系统作为用户访问的緩存子系统。 Topology算法则作为 RTT动态计算的补 充算法, 在 RTT计算方式没有结果的时候, 则选择用户所属本地局域网上的 緩存子系统作为用户访问的緩存子系统。 Global Availability算法作为系统的 默认算法, 将所有无法计算结果并且不在 Topology范围之内的 DNS解析请 求, 则选择 DNS 重定向子系统默认的緩存子系统作为用户访问的緩存子系 统。 如果该白名单中并没有该 DNS解析请求对应的域名, 那么该 DNS重定 向子系统就不处理, 丟弃该 DNS解析请求, 并且不向客户端返回 DNS响应。 Specifically, the whitelist may be configured in the DNS redirection subsystem, where the domain name of the hotspot network or the domain name of the contracted network is saved, and the domain name saved in the whitelist indicates that the content corresponding to the domain name is cached in the cache subsystem. The client can directly obtain the corresponding data in the cache subsystem. The whitelist can be manually configured in advance. The domain name saved in the whitelist can be the domain name of the hotspot network and/or the subscription network. The hotspot network is Refers to a network that has reached a certain number of times in a certain period of time (this specific time and a specific number of times can be set according to time). The contracted network refers to a network that has a service relationship with the DNS redirection subsystem, for example, a prior agreement of the A network. The data is cached, and the A network is a contracted network. If the domain name corresponding to the DNS resolution request is in the white list, the IP address of the cache subsystem corresponding to the domain name is searched. If the domain name corresponds to the unique cache subsystem, the IP address of the cache subsystem may be used. The bearer is returned to the client in the DNS response; if the domain name corresponds to multiple cache subsystems, the DNS redirection subsystem selects an IP address of a cache subsystem corresponding to the domain name according to the IP address selection algorithm, and returns to carry The DNS response of the IP address of the cache subsystem, for example, algorithms that can be selected according to priority include: Round-Trip Time (RTT) algorithm, Topology algorithm, and Global Availability algorithm . For example: The DNS server can select the RTT algorithm as the preferred algorithm for selecting the IP address of the cache subsystem corresponding to the domain name, that is, all DNS resolution requests are calculated by the DNS server to ensure the optimization of most user access, such as When there are multiple available cache subsystems corresponding to one DNS resolution request, the cache subsystem closest to the user who sent the DNS resolution request is selected as the corresponding cache subsystem as the cache subsystem accessed by the user. The Topology algorithm is used as a supplementary algorithm for RTT dynamic calculation. When there is no result in the RTT calculation mode, the cache subsystem on the local area network to which the user belongs is selected as the cache subsystem for user access. Global Availability algorithm as a system The default algorithm, which selects all DNS resolution requests that cannot be calculated and is not in the scope of Topology, selects the default cache subsystem of the DNS redirection subsystem as the cache subsystem for user access. If the domain name corresponding to the DNS resolution request does not exist in the whitelist, the DNS redirection subsystem does not process, discards the DNS resolution request, and does not return a DNS response to the client.
另夕卜,参见图 4, DNS重定向子系统中可以具体包括 DPI设备 41和 DNS 服务器 42, 当然还可以包括一些通用设备, 例如交换机, 并且 DNS服务器 可以采用主备方式, 例如包括主用 DNS服务器(图 4中为 DNS服务器—主 ) 和备用 DNS服务器(图 4中为 DNS服务器—备 )。 DPI设备用于对接收的上 网请求进行 DPI解析以获知该上网请求是否为 DNS解析请求, 如果是 DNS 解析请求,则将 DNS解析请求解析获取携带的域名,并将该域名发送给 DNS 服务器。 DNS服务器中可以保存上述的白名单, 如果接收的 DNS解析请求 携带的域名属于该白名单,则确定该 DNS解析请求携带的域名对应的緩存子 系统 IP地址。之后将该緩存子系统 IP地址携带在 DNS响应中返回给客户端。 当然, 如果该 DNS解析请求对应的域名不在该白名单中, 则 DNS服务器可 以丟弃该 DNS解析请求。  In addition, referring to FIG. 4, the DNS redirection subsystem may specifically include the DPI device 41 and the DNS server 42, and may also include some general-purpose devices, such as switches, and the DNS server may adopt an active/standby mode, for example, including a primary DNS. The server (DNS server - primary in Figure 4) and the alternate DNS server (DNS server in Figure 4 - standby). The DPI device is configured to perform DPI parsing on the received uplink request to obtain whether the Internet access request is a DNS resolution request. If it is a DNS resolution request, the DNS resolution request is parsed to obtain the carried domain name, and the domain name is sent to the DNS server. The DNS server can save the above-mentioned whitelist. If the domain name carried by the received DNS resolution request belongs to the whitelist, the IP address of the cache subsystem corresponding to the domain name carried in the DNS resolution request is determined. The cache subsystem IP address is then carried back to the client in the DNS response. Of course, if the domain name corresponding to the DNS resolution request is not in the whitelist, the DNS server may discard the DNS resolution request.
进一步地, 上述 DNS重定向子系统中的 DNS服务器可以采用 (Global Server Load Balance , GSLB ) 负载均衡全局服务器。 其中, GSLB中可以配 置白名单, 以及保存域名与緩存子系统的 IP地址的对应关系表,如果该 DNS 解析请求对应的域名包含在该白名单中, 则根据域名与緩存子系统的 IP地址 的对应关系表可以得到该域名对应的緩存子系统的 IP 地址。 当然, 如果该 DNS解析请求对应的域名不在该白名单中, 则 GSLB可以丟弃该 DNS解析 请求。  Further, the DNS server in the above DNS redirection subsystem can use the (Global Server Load Balance, GSLB) load balancing global server. The GSLB can be configured with a whitelist and a mapping table between the domain name and the IP address of the cache subsystem. If the domain name corresponding to the DNS resolution request is included in the whitelist, the domain name and the IP address of the cache subsystem are used. The correspondence table can obtain the IP address of the cache subsystem corresponding to the domain name. Of course, if the domain name corresponding to the DNS resolution request is not in the whitelist, the GSLB may discard the DNS resolution request.
步骤 34: 外部网络对该上网请求进行响应, 并将源服务器的 IP地址携带 在 DNS响应中返回给客户端。 其中, 可以具体为外部网络中的 DNS服务器 对该上网请求进行解析, 查找到源服务器的 IP地址, 之后将源服务器的 IP 地址携带在 DNS响应中返回给客户端。 步骤 35:客户端处理先接收到的 DNS响应,丟弃后接收到的 DNS响应。 一般情况下, DNS重定向子系统比外部网络的 DNS服务器更靠近用户, 因此, DNS重定向子系统返回的 DNS响应先到达客户端, 因此在客户端将 处理 DNS重定向子系统返回的 DNS响应,即 DNS重定向子系统返回的 DNS 响应生效。 由于 DNS重定向子系统的 DNS响应生效, 则客户端获取的为緩 存子系统的 IP地址, 之后, 客户端根据緩存子系统的 IP地址可以从緩存子 系统中获取数据。 Step 34: The external network responds to the online request, and carries the IP address of the source server in the DNS response and returns it to the client. The IP address of the source server may be parsed by the DNS server in the external network, and the IP address of the source server is found, and then the IP address of the source server is carried in the DNS response and returned to the client. Step 35: The client processes the received DNS response and discards the received DNS response. In general, the DNS redirection subsystem is closer to the user than the DNS server of the external network. Therefore, the DNS response returned by the DNS redirection subsystem reaches the client first, so the client will process the DNS response returned by the DNS redirection subsystem. That is, the DNS response returned by the DNS redirection subsystem takes effect. Since the DNS response of the DNS redirection subsystem takes effect, the client obtains the IP address of the cache subsystem. After that, the client can obtain data from the cache subsystem according to the IP address of the cache subsystem.
当然, 如果客户端也有可能先接收到的是外部网络的 DNS响应, 或者只 接收到外部网络的 DNS响应 , 此时, 客户端直接根据外部网络的 DNS响应 中包含的源服务器的 IP地址, 访问该源服务器, 并从源服务器获取数据。  Of course, if the client may also receive the DNS response of the external network first, or only receive the DNS response of the external network, the client directly accesses the IP address of the source server included in the DNS response of the external network. The source server, and get data from the source server.
客户端接收到緩存子系统的 IP地址后,向緩存子系统发送数据查询请求, 这个数据查询请求可以是一个 web请求。 如果緩存子系统中保存有该数据查 询请求对应的数据, 则将该数据返回给客户端。  After receiving the IP address of the cache subsystem, the client sends a data query request to the cache subsystem, and the data query request may be a web request. If the data corresponding to the data query request is saved in the cache subsystem, the data is returned to the client.
另外, DNS重定向子系统中还可以用于提供资源调度。 其中, 资源调度 功能可以实现白名单的更新,例如 DPI设备可以对 DNS解析请求进行深度分 析, 定期生成用户访问网站域名的热点排名表, 例如每周生成 excel或文本格 式的用户访问的热点网站排名表。 在系统中还可以定期获取各地 DPI设备的 分析结果, 汇总各 DPI设备的分析结果, 根据分析结果刷新各地负载均衡全 局服务器配置的白名单, 以提高用户的命中率, 加快用户的访问速度, 从而 提升用户的上网体验, 节省网间结算。  In addition, the DNS redirection subsystem can also be used to provide resource scheduling. The resource scheduling function can implement whitelist update. For example, the DPI device can perform in-depth analysis on the DNS resolution request, and periodically generate a hotspot ranking table for the user to access the website domain name, for example, a hotspot website ranking that is generated by a user who generates an excel or a text format every week. table. In the system, the analysis results of DPI devices can be obtained periodically, and the analysis results of each DPI device are summarized, and the white list of the global load balancing server configuration is refreshed according to the analysis result, so as to improve the user's hit rate and speed up the user's access speed. Improve users' online experience and save Internet settlement.
另外,客户端侧还可以包括本地 DNS ( Local DNS )服务器,该本地 DNS 服务器中可以记录域名与緩存子系统的 IP 地址的对应关系, 以便更快确定 DNS解析请求对应的緩存子系统的 IP地址。  In addition, the client side may further include a local DNS (Local DNS) server, where the mapping relationship between the domain name and the IP address of the cache subsystem may be recorded, so as to quickly determine the IP address of the cache subsystem corresponding to the DNS resolution request. .
在上述步骤 31中, 客户端发送上网请求时, 将该上网请求首先发送本地 DNS服务器,如果 Local DNS服务器保存了域名与緩存子系统 IP地址的对应 关系表, 并且该关系表还属于有效期内, 则本地 DNS服务器解析该上网请求 对应的域名, 并且查找该域名对应的緩存子系统的 IP地址, 如果该域名对应 的緩存子系统的 IP地址是唯一的, 则向客户端返回与该緩存子系统的 IP地 址, 并且步骤 32-35跳过, 无需执行; 如果该域名对应的緩存子系统的 IP地 址是多个, 则根据上述按照优先级选用的算法来选择该域名对应的一个緩存 子系统的 IP地址,并向客户端返回与该緩存子系统的 IP地址,并且步骤 32-35 跳过, 无需执行。 如果本地 DNS服务器没有记录域名与緩存子系统 IP地址 的对应关系表或者记录已经过期, 则转向步骤 32。 In the foregoing step 31, when the client sends the Internet access request, the Internet access request is first sent to the local DNS server, and if the Local DNS server saves the correspondence table between the domain name and the cache subsystem IP address, and the relationship table is still valid, The local DNS server resolves the internet request Corresponding domain name, and looking up the IP address of the cache subsystem corresponding to the domain name. If the IP address of the cache subsystem corresponding to the domain name is unique, return the IP address of the cache subsystem to the client, and step 32- If the IP address of the cache subsystem corresponding to the domain name is multiple, the IP address of a cache subsystem corresponding to the domain name is selected according to the algorithm selected according to the priority, and is returned to the client. With the IP address of the cache subsystem, and steps 32-35 are skipped, no execution is required. If the local DNS server does not record the correspondence table of the domain name and the cache subsystem IP address or the record has expired, then go to step 32.
如果緩存子系统中没有保存该数据查询请求对应的数据, 则緩存子系统 可以从源服务器获取该数据后再返回给客户端。  If the data corresponding to the data query request is not saved in the cache subsystem, the cache subsystem may obtain the data from the source server and then return the data to the client.
上述緩存子系统中保存的数据可以是从源服务器获取的, 例如, 緩存子 系统可以从源服务器获取初始数据, 之后, 可以定期再向源服务器获取数据 用于更新。緩存子系统从源服务器获取数据的流程可以参见图 5所示实施例。  The data stored in the cache subsystem may be obtained from the source server. For example, the cache subsystem may obtain initial data from the source server, and then periodically obtain data from the source server for update. The flow of the cache subsystem to obtain data from the source server can be seen in the embodiment shown in FIG.
图 5为本发明实施例中緩存子系统从源服务器获取数据的流程示意图, 包括:  FIG. 5 is a schematic flowchart of a process for a cache subsystem to obtain data from a source server according to an embodiment of the present invention, including:
步骤 51 : 緩存子系统向源服务器发送数据请求消息。  Step 51: The cache subsystem sends a data request message to the source server.
可以是, 緩存子系统在预设的时间点, 定期向源服务器发送该数据请求 消息。 也可以是, 緩存子系统在接收到客户端发送的请求数据时, 向源服务 器发送该数据请求消息。  It may be that the cache subsystem periodically sends the data request message to the source server at a preset time point. Alternatively, the cache subsystem sends the data request message to the source server when receiving the request data sent by the client.
另外, 由于在网络緩存系统中可能存在路由器、 L3交换机、 负载均衡设 备等, 该数据请求消息可以是緩存子系统经由 L3交换机、 负载均衡设备和路 由器发送给源服务器的。  In addition, since there may be a router, an L3 switch, a load balancing device, etc. in the network cache system, the data request message may be sent by the cache subsystem to the source server via the L3 switch, the load balancing device, and the router.
步骤 52: 源服务器将该数据请求消息对应的数据发送给緩存子系统。 同样,如果在网络緩存系统中存在路由器、 L3交换机、 负载均衡设备等, 该数据可以是源服务器经由路由器、负载均衡设备和 L3交换机发送给源服务 器的。  Step 52: The source server sends the data corresponding to the data request message to the cache subsystem. Similarly, if there are routers, L3 switches, load balancing devices, etc. in the network cache system, the data can be sent by the source server to the source server via the router, load balancing device, and L3 switch.
当然, 根据网络緩存系统组成不同, 上述路径经由的设备也可以是不同 的。 Of course, depending on the composition of the network cache system, the devices through which the above paths pass may also be different. of.
另外, 緩存子系统中可以包括多个緩存服务器, 用于分别存储不同源服 务器的数据。 可以采用管理平台确定源服务器对应的緩存服务器, 例如, 管 理平台中包括资源调度模块,资源调度模块实现对全网节点资源的监控管理, 也可以对全网热点访问网站、 热点区域或热点时间段进行分析和统计, 还可 以针对热点分析结果动态地对全网资源做调整和优化, 使靠近热点访问区域 源服务器的緩存服务器緩存热点访问的数据, 物理距离上的缩短, 可以提升 了用户的上网体验, 同时也节省了网间结算费用。  In addition, a plurality of cache servers may be included in the cache subsystem for storing data of different source servers separately. The management platform can be used to determine the cache server corresponding to the source server. For example, the management platform includes a resource scheduling module, the resource scheduling module implements monitoring and management of the network node resources, and can also access the website, the hotspot area, or the hotspot period for the entire network. The analysis and statistics can also dynamically adjust and optimize the network resources for the hotspot analysis results, so that the cache server that is close to the source server of the hotspot access area caches the data accessed by the hotspot, and the physical distance is shortened, which can improve the user's Internet access. The experience also saves internet settlement costs.
至此, 緩存子系统中会保存有数据, 之后可以根据客户端的请求返回相 应的数据。 当然, 緩存子系统中可能保存客户端请求的数据, 也可能没有保 存, 下面的图 6、 图 7将分别描述上述两种情形。  At this point, the cache subsystem will store the data, and then the corresponding data can be returned according to the client's request. Of course, the data requested by the client may be saved in the cache subsystem, and may not be saved. The following two scenarios are respectively described in FIG. 6 and FIG. 7 below.
图 6为本发明第三实施例的方法流程示意图, 本实施例以緩存子系统中 保存客户端请求的数据为例, 参见图 8, 本实施例包括:  FIG. 6 is a schematic flowchart of a method according to a third embodiment of the present invention. In this embodiment, the data requested by the client in the cache subsystem is saved as an example. Referring to FIG. 8, the embodiment includes:
步骤 61 : 客户端向 DNS重定向子系统发送 DNS解析请求。  Step 61: The client sends a DNS resolution request to the DNS redirection subsystem.
步骤 62: DNS重定向子系统将緩存子系统的 IP地址携带在 DNS响应中, 发送给客户端。  Step 62: The DNS redirection subsystem carries the IP address of the cache subsystem in the DNS response and sends it to the client.
具体 DNS重定向子系统处理流程可以参见图 3对应实施例。  For the specific DNS redirection subsystem processing procedure, refer to the corresponding embodiment in FIG. 3.
步骤 63: 客户端根据緩存子系统的 IP地址, 向緩存子系统发送数据查询 请求。  Step 63: The client sends a data query request to the cache subsystem according to the IP address of the cache subsystem.
步骤 64: 如果緩存子系统中保存有该数据查询请求对应的数据, 则返回 数据给客户端。  Step 64: If the data corresponding to the data query request is saved in the cache subsystem, the data is returned to the client.
同样, 如果网络緩存系统中包含路由器、 L3交换机等设备, 则可以是客 户端经由路由器、 L3交换机将数据查询请求发送给緩存子系统; 相应地, 緩 存子系统经由 L3交换机、 路由器将数据发送给客户端。  Similarly, if the network cache system includes a router, an L3 switch, etc., the client may send a data query request to the cache subsystem via the router and the L3 switch; accordingly, the cache subsystem sends the data to the L3 switch and the router. Client.
另外, 在緩存子系统中可以包括负载均衡设备和緩存服务器, 负载均衡 设备用于管理各緩存服务器, 能够获知各緩存服务器的负载情况。 之后, 当 负载均衡设备接收客户端发送的数据查询请求后, 可以根据各緩存服务器的 负载情况, 将接收的数据查询请求发送给负载较轻的緩存服务器, 由该緩存 服务器进行处理后获取数据并返回给客户端。 In addition, the load balancing device and the cache server may be included in the cache subsystem, and the load balancing device is configured to manage each cache server, and can learn the load status of each cache server. After that, when After receiving the data query request sent by the client, the load balancing device may send the received data query request to the cache server with a light load according to the load condition of each cache server, and the cache server processes the data and returns the data to the client. end.
图 7为本发明第四实施例的方法流程示意图, 本实施例以緩存子系统中 没有保存客户端请求的数据为例, 参见图 7, 本实施例包括:  FIG. 7 is a schematic flowchart of a method according to a fourth embodiment of the present invention. In this embodiment, the data in the cache subsystem that does not save the client request is used as an example. Referring to FIG. 7, this embodiment includes:
步骤 71 : 客户端向 DNS重定向子系统发送 DNS解析请求。  Step 71: The client sends a DNS resolution request to the DNS redirection subsystem.
步骤 72: DNS重定向子系统将緩存子系统的 IP地址携带在 DNS响应中, 发送给客户端。  Step 72: The DNS redirection subsystem carries the IP address of the cache subsystem in the DNS response and sends it to the client.
具体 DNS重定向子系统处理流程可以参见上述实施例。  For the specific DNS redirection subsystem processing procedure, refer to the above embodiment.
步骤 73: 客户端根据緩存子系统的 IP地址, 向緩存子系统发送数据查询 请求。  Step 73: The client sends a data query request to the cache subsystem according to the IP address of the cache subsystem.
步骤 74: 如果緩存子系统中没有保存该数据查询请求对应的数据, 则向 源服务器转发该数据查询请求。  Step 74: If the data corresponding to the data query request is not saved in the cache subsystem, the data query request is forwarded to the source server.
步骤 75: 源服务器向緩存子系统返回该数据查询请求对应的数据。  Step 75: The source server returns data corresponding to the data query request to the cache subsystem.
步骤 76: 緩存子系统将源服务器返回的数据发送给客户端。  Step 76: The cache subsystem sends the data returned by the source server to the client.
另外, 緩存子系统从源服务器中获取数据后, 可以自身保存获取的数据, 以便下次客户端请求时可以提供对应的数据。  In addition, after the cache subsystem obtains data from the source server, it can save the acquired data itself, so that the corresponding data can be provided when the client requests the next time.
同样, 如果系统中包含路由器、 L3交换机等设备, 则可以是客户端经由 路由器、 L3交换机将数据查询请求发送给緩存子系统; 相应地, 緩存子系统 经由 L3交换机、 路由器将数据发送给客户端。  Similarly, if the system includes a router, an L3 switch, etc., the client may send a data query request to the cache subsystem via the router and the L3 switch; accordingly, the cache subsystem sends the data to the client via the L3 switch and the router. .
另外, 在緩存子系统中可以包括负载均衡设备和緩存服务器, 负载均衡 设备用于管理各緩存服务器, 能够获知各緩存服务器的负载情况。 之后, 当 负载均衡设备接收客户端发送的数据查询请求后, 可以根据各緩存服务器的 负载情况, 将接收的数据查询请求发送给负载较轻的緩存服务器, 由该緩存 服务器进行处理。  In addition, the load balancing device and the cache server may be included in the cache subsystem, and the load balancing device is configured to manage each cache server, and can learn the load status of each cache server. Then, after receiving the data query request sent by the client, the load balancing device may send the received data query request to the cache server with a light load according to the load condition of each cache server, and the cache server processes the data.
在图 6、 7所示的实施例中是以 DNS重定向子系统能够返回緩存子系统 的 IP地址为例, 即 DNS重定向子系统的白名单中保存有 DNS解析请求对应 的域名, 如果该白名单中没有保存 DNS解析请求对应的域名, 则可以如图 8 所示的实施例进行处理。 In the embodiment shown in Figures 6 and 7, the DNS redirection subsystem is capable of returning to the cache subsystem. For example, the IP address of the DNS redirection subsystem stores the domain name corresponding to the DNS resolution request. If the domain name corresponding to the DNS resolution request is not saved in the whitelist, the embodiment shown in Figure 8 can be performed. deal with.
图 8为本发明第五实施例的方法流程示意图,本实施例以 DNS重定向子 系统中没有保存 DNS解析请求对应的域名为例, 参见图 8, 本实施例包括: 步骤 81 : 客户端向 DNS重定向子系统以及外网 DNS服务器发送 DNS 解析请求。  FIG. 8 is a schematic flowchart of a method according to a fifth embodiment of the present invention. In this embodiment, a domain name corresponding to a DNS resolution request is not stored in the DNS redirection subsystem. For example, as shown in FIG. 8, the embodiment includes: Step 81: Client to The DNS redirection subsystem and the external network DNS server send DNS resolution requests.
参见上述实施例, 客户端在发送 DNS解析请求后, 该 DNS解析请求经 过分光器被分为两路, 一路发送给 DNS 重定向子系统, 另一路发送给外网 DNS服务器。  Referring to the foregoing embodiment, after the client sends the DNS resolution request, the DNS resolution request is split into two paths through the optical splitter, and is sent to the DNS redirection subsystem and the other to the external network DNS server.
步骤 82: DNS重定向子系统丟弃接收的 DNS解析请求。  Step 82: The DNS redirection subsystem discards the received DNS resolution request.
其中, DNS重定向子系统中会保存白名单, 如果接收的 DNS解析请求 对应的域名不在该白名单中,则 DNS重定向子系统无法提供緩存子系统的 IP 地址, 此时, DNS重定向子系统将 DNS解析请求丟弃。  The whitelist is saved in the DNS redirection subsystem. If the domain name corresponding to the received DNS resolution request is not in the whitelist, the DNS redirection subsystem cannot provide the IP address of the cache subsystem. In this case, the DNS redirector The system discards the DNS resolution request.
步骤 83:外网 DNS服务器将源服务器的 IP地址携带在 DNS响应中返回 给客户端。  Step 83: The external network DNS server carries the IP address of the source server in the DNS response and returns it to the client.
其中, 外网 DNS服务器中会保存域名与源服务器的 IP地址的对应关系, 根据 DNS解析请求对应的域名, 可以获取源服务器的 IP地址, 之后, 将源 服务器的 IP地址携带在 DNS响应中发送给客户端。  The external network DNS server stores the mapping between the domain name and the IP address of the source server. According to the domain name corresponding to the DNS resolution request, the IP address of the source server can be obtained. Then, the IP address of the source server is carried in the DNS response. To the client.
步骤 84:客户端根据源服务器的 IP地址,向源服务器发送数据查询请求。 步骤 85: 源服务器将该数据查询请求对应的数据发送给客户端。  Step 84: The client sends a data query request to the source server according to the IP address of the source server. Step 85: The source server sends the data corresponding to the data query request to the client.
当然, 如果系统中包含路由器, 则可以是客户端经由路由器向源服务器 发送数据查询请求, 之后, 源服务器经由路由器向客户端发送数据。  Of course, if the system includes a router, the client may send a data query request to the source server via the router, and then the source server sends data to the client via the router.
上述实施例中,通过单独设置 DNS重定向子系统,可以实现透明式部署、 对现网影响为零。 DPI设备旁路部署, 无单点故障隐患。 无需与源服务器三 次握手, 无网络时延, 不影响其他业务性能。 另外, 关键模块可以采用全冗 余备份, 例如, GSLB与交换机采用 1+1备份方式, 负载均衡模块也可以采 用 1+1备份方式, 网络緩存服务器(WebCache )则可以使用同构节点动态备 份技术, 从而保证整个方案的高可用。 通过资源调度可以实现用户流量动态 分流, 保证 Web Cache系统不过载。 可以配置 GSLB与緩存子系统中的负载 均衡设备的联动策略, 使得 GSLB可以接收緩存子系统中的负载均衡设备上 报的健康的网络緩存设备的数量, 以便当緩存子系统故障或者处理能力不够 时, GSLB先保证级别高的网站的 DNS解析请求, 低优先级网站的 DNS解 析请求不再被处理, 实现流量动态分流。 图 9为本发明实施例的网络緩存系统的结构示意图, 包括 DNS重定向子 系统 901和緩存子系统 902; DNS重定向子系统 901用于接收客户端发送的 域名系统 DNS解析请求, 解析出所述 DNS解析请求携带的域名, 确定所述 域名在白名单中; 获取所述域名对应的緩存子系统的网际协议 IP地址, 并将 所述緩存子系统的 IP地址发送给所述客户端, 以便于客户端根据所述緩存子 系统的 IP地址向所述緩存子系统请求数据; 緩存子系统 902, 用于接收所述 客户端根据所述緩存子系统的 IP地址发送的数据请求消息, 并向所述客户端 发送与所述数据请求消息对应的数据。 In the above embodiment, by setting the DNS redirection subsystem separately, transparent deployment and zero impact on the live network can be achieved. DPI device bypass deployment, no single point of failure. There is no need to handshake with the source server three times, no network delay, and no impact on other service performance. In addition, key modules can be fully redundant For example, GSLB and switch adopt 1+1 backup mode, load balancing module can also adopt 1+1 backup mode, and network cache server (WebCache) can use homogeneous node dynamic backup technology to ensure high availability of the entire solution. . Resource scheduling can be used to dynamically divide user traffic to ensure that the Web Cache system is not overloaded. The association between the GSLB and the load balancing device in the cache subsystem can be configured, so that the GSLB can receive the number of healthy network cache devices reported by the load balancing device in the cache subsystem, so that when the cache subsystem fails or the processing capability is insufficient. The GSLB first guarantees the DNS resolution request of the high-level website, and the DNS resolution request of the low-priority website is no longer processed, and the traffic is dynamically offloaded. FIG. 9 is a schematic structural diagram of a network cache system according to an embodiment of the present invention, including a DNS redirection subsystem 901 and a cache subsystem 902. The DNS redirection subsystem 901 is configured to receive a domain name system DNS resolution request sent by a client, and parse the Defining the domain name carried in the DNS resolution request, determining that the domain name is in the white list; obtaining an internet protocol IP address of the cache subsystem corresponding to the domain name, and sending the IP address of the cache subsystem to the client, so that The client requests data from the cache subsystem according to the IP address of the cache subsystem; the cache subsystem 902 is configured to receive a data request message sent by the client according to the IP address of the cache subsystem, and The client sends data corresponding to the data request message.
緩存子系统 902具体用于接收所述客户端发送的数据请求消息; 如果所 述緩存子系统中緩存有与所述数据请求消息对应的数据, 则所述緩存子系统 将緩存的与所述数据请求消息对应的数据发送给所述客户端; 如果所述緩存 子系统中没有緩存所述数据请求消息对应的数据, 则所述緩存子系统向源服 务器发送用于查询数据的数据请求消息, 所述緩存子系统接收所述源服务器 返回的与所述查询数据的数据请求消息对应的数据, 所述緩存子系统在本地 保存所述数据后并将所述数据发送给所述客户端。  The cache subsystem 902 is specifically configured to receive a data request message sent by the client; if the cache subsystem has data corresponding to the data request message, the cache subsystem caches the data The data corresponding to the request message is sent to the client; if the data corresponding to the data request message is not cached in the cache subsystem, the cache subsystem sends a data request message for querying data to the source server. The cache subsystem receives data corresponding to the data request message of the query data returned by the source server, and the cache subsystem saves the data locally and sends the data to the client.
緩存子系统 902还用于所述緩存子系统根据刷新策略, 从所述源服务器 获取数据, 并更新緩存的数据。 该系统还可以包括: 分光器或者路由器, 用于将客户端发送的所述上网 请求分为两路,一路发送给所述 DNS重定向子系统,另一路发送给外部网络。 本实施例通过由 DNS重定向系统实现网络緩存,可以避免基于策略路由 的网络緩存, 并且具有可靠性高, 无网络时延, 不影响其他业务性能, 不会 对现有网络拓朴造成影响的条件下, 达到节省出口带宽、 降低网间结算、 提 高网络利用效率、 降低网络运营成本、 提升用户体验的目的。 图 10为本发明实施例的 DNS重定向子系统的结构示意图, 包括 DPI设 备 1001和 DNS服务器 1002; DPI设备 1001用于接收客户端发送的域名系统 DNS解析请求, 解析出所述 DNS解析请求携带的域名, 确定所述域名在白 名单中; DNS服务器 1002用于获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系统的 IP地址发送给所述客户端, 以便于客户端根 据所述緩存子系统的 IP地址向所述緩存子系统请求数据。 所述 DPI设备 1001还可以用于对接收的 DNS解析请求进行深度分析, 以生成热点网站用于更新白名单。 The cache subsystem 902 is further configured to: the cache subsystem acquires data from the source server according to a refresh policy, and updates the cached data. The system may further include: a splitter or a router, configured to divide the Internet access request sent by the client into two paths, send the same to the DNS redirection subsystem, and send the other path to the external network. In this embodiment, the network cache is implemented by the DNS redirection system, which can avoid network caching based on policy routing, and has high reliability, no network delay, does not affect other service performance, and does not affect the existing network topology. Under the condition, it can save export bandwidth, reduce inter-network settlement, improve network utilization efficiency, reduce network operation cost, and enhance user experience. FIG. 10 is a schematic structural diagram of a DNS redirection subsystem according to an embodiment of the present invention, including a DPI device 1001 and a DNS server 1002. The DPI device 1001 is configured to receive a domain name system DNS resolution request sent by a client, and parse the DNS resolution request to carry The domain name is determined to be in the whitelist; the DNS server 1002 is configured to obtain an internet protocol IP address of the cache subsystem corresponding to the domain name, and send the IP address of the cache subsystem to the client, so as to The client requests data from the cache subsystem according to the IP address of the cache subsystem. The DPI device 1001 may be further configured to perform in-depth analysis on the received DNS resolution request to generate a hotspot website for updating the whitelist.
DNS服务器 1002具体可以用于如果所述域名对应唯一緩存子系统的 IP 地址, 则获取所述唯一緩存子系统的 IP地址; 如果所述域名对应两个以上緩 存子系统的 IP地址, 则根据 IP地址选择算法, 选择一个适应的緩存子系统 的 IP地址作为所述域名对应的緩存子系统的网际协议 IP地址。 DNS服务器 1002可以为 GSLB。  The DNS server 1002 may be specifically configured to acquire an IP address of the unique cache subsystem if the domain name corresponds to an IP address of a unique cache subsystem; and if the domain name corresponds to an IP address of two or more cache subsystems, according to the IP address The address selection algorithm selects an IP address of the adapted cache subsystem as the Internet Protocol IP address of the cache subsystem corresponding to the domain name. The DNS server 1002 can be a GSLB.
本实施例通过由 DNS重定向系统实现网络緩存,可以避免基于策略路由 的网络緩存, 并且具有可靠性高, 无网络时延, 不影响其他业务性能, 不会 对现有网络拓朴造成影响的条件下, 达到节省出口带宽、 降低网间结算、 提 高网络利用效率、 降低网络运营成本、 提升用户体验的目的。  In this embodiment, the network cache is implemented by the DNS redirection system, which can avoid network caching based on policy routing, and has high reliability, no network delay, does not affect other service performance, and does not affect the existing network topology. Under the condition, it can save export bandwidth, reduce inter-network settlement, improve network utilization efficiency, reduce network operation cost, and enhance user experience.
可以理解的是, 上述方法及设备中的相关特征可以相互参考。 另外, 上 述实施例中的 "第一" 、 "第二" 等是用于区分各实施例, 而并不代表各实 施例的优劣。 It can be understood that related features in the above methods and devices can be referred to each other. In addition, the "first", "second", and the like in the above embodiments are used to distinguish the embodiments, and do not represent the actual The advantages and disadvantages of the example.
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于计算机可读取 存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述的 存储介质包括: ROM, RAM,磁碟或者光盘等各种可以存储程序代码的介质。  A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions. The foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。  It should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

权 利 要 求 Rights request
1、 一种网络緩存方法, 其特征在于, 包括: 接收客户端发送的域名系统 DNS解析请求, 解析出所述 DNS解析请求 携带的域名, 确定所述域名在白名单中; 获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系 统的 IP地址发送给所述客户端, 以便于客户端根据所述緩存子系统的 IP地 址向所述緩存子系统请求数据。  A network caching method, comprising: receiving a domain name system DNS resolution request sent by a client, parsing a domain name carried in the DNS resolution request, determining that the domain name is in a white list; and obtaining the domain name corresponding The internet protocol IP address of the cache subsystem, and the IP address of the cache subsystem is sent to the client, so that the client requests data from the cache subsystem according to the IP address of the cache subsystem.
2、 根据权利要求 1所述的方法, 其特征在于, 所述获取所述域名对应的 緩存子系统的网际协议 IP地址, 进一步包括:  The method of claim 1, wherein the obtaining the Internet Protocol IP address of the cache subsystem corresponding to the domain name further includes:
如果所述域名对应唯一緩存子系统的 IP地址, 则获取所述唯一緩存子系 统的 IP地址;  If the domain name corresponds to the IP address of the unique cache subsystem, obtain the IP address of the unique cache subsystem;
如果所述域名对应两个以上緩存子系统的 IP地址, 则根据 IP地址选择 算法, 选择一个适应的緩存子系统的 IP地址作为所述域名对应的緩存子系统 的网际协议 IP地址。  If the domain name corresponds to the IP addresses of the two or more cache subsystems, according to the IP address selection algorithm, an IP address of the adapted cache subsystem is selected as the Internet Protocol IP address of the cache subsystem corresponding to the domain name.
3、 根据权利要求 1和 2所述的方法, 其特征在于, 所述方法还包括: 如 果确定所述 DNS解析请求携带的域名不在所述白名单中, 则丟弃所述 DNS 解析请求。 The method according to any one of claims 1 and 2, wherein the method further comprises: discarding the DNS resolution request if it is determined that the domain name carried by the DNS resolution request is not in the whitelist.
4、 根据权利要求 1至 3任一项所述的方法, 其特征在于, 所述方法还包 括: 客户端发送 DNS解析请求, 所述 DNS解析携带了域名;  The method according to any one of claims 1 to 3, wherein the method further comprises: the client sending a DNS resolution request, where the DNS resolution carries a domain name;
所述 DNS解析请求经分光器或者路由器被发送到外部网络和 DNS重定 向子系统;  The DNS resolution request is sent to the external network and the DNS redirection subsystem via a splitter or router;
所述客户端接收所述外部网络和 DNS重定向子系统分别返回的 DNS响 应, 所述外部网络返回的 DNS响应携带了所述域名对应的源服务器 IP地址, 所述 DNS重定向子系统返回的 DNS响应携带了緩存子系统的 IP地址, 所述 客户端处理先接收到的 DNS响应, 后接收到 DNS响应丟弃。 The client receives a DNS response returned by the external network and the DNS redirection subsystem, and the DNS response returned by the external network carries the source server IP address corresponding to the domain name, and the DNS redirection subsystem returns The DNS response carries the IP address of the cache subsystem, and the client processes the DNS response received first, and then receives the DNS response drop.
5、 根据权利要求 1至 4任一项所述的方法, 其特征在于, 所述方法还包 括:对接收的 DNS解析请求进行深度分析,以生成热点网站用于更新白名单。 The method according to any one of claims 1 to 4, wherein the method further comprises: performing an in-depth analysis on the received DNS resolution request to generate a hotspot website for updating the whitelist.
6、 一种域名系统 DNS重定向子系统, 其特征在于, 包括: 深层报文解析设备, 用于接收客户端发送的域名系统 DNS解析请求, 解 析出所述 DNS解析请求携带的域名, 确定所述域名在白名单中; A domain name system DNS redirection subsystem, comprising: a deep packet parsing device, configured to receive a domain name system DNS resolution request sent by a client, parse the domain name carried by the DNS resolution request, determine a location The domain name is in the white list;
DNS服务器, 用于获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系统的 IP地址发送给所述客户端, 以便于客户端根据所述緩 存子系统的 IP地址向所述緩存子系统请求数据。 a DNS server, configured to obtain an internet protocol IP address of a cache subsystem corresponding to the domain name, and send an IP address of the cache subsystem to the client, so that the client is configured according to the IP address of the cache subsystem Request data from the cache subsystem.
7、 根据权利要求 6所述的域名系统 DNS重定向子系统, 其特征在于, 所述深层报文解析设备还用于对接收的 DNS解析请求进行深度分析,以生成 热点网站用于更新白名单。 The DNS redirection subsystem of the domain name system according to claim 6, wherein the deep packet parsing device is further configured to perform in-depth analysis on the received DNS resolution request to generate a hotspot website for updating the whitelist. .
8、 根据权利要求 6或 7所述的域名系统 DNS重定向子系统, 其特征在 于, 所述 DNS服务器具体用于如果所述域名对应唯一緩存子系统的 IP地址, 则获取所述唯一緩存子系统的 IP地址; 如果所述域名对应两个以上緩存子系 统的 IP地址, 则根据 IP地址选择算法, 选择一个适应的緩存子系统的 IP地 址作为所述域名对应的緩存子系统的网际协议 IP地址。  The DNS redirection subsystem of the domain name system according to claim 6 or 7, wherein the DNS server is specifically configured to acquire the unique cache if the domain name corresponds to an IP address of a unique cache subsystem. The IP address of the system; if the domain name corresponds to the IP address of more than two cache subsystems, according to the IP address selection algorithm, an IP address of the adapted cache subsystem is selected as the Internet Protocol IP of the cache subsystem corresponding to the domain name. address.
9、 一种网络緩存系统, 其特征在于, 包括: 域名系统 DNS重定向子系统, 用于接收客户端发送的域名系统 DNS解 析请求, 解析出所述 DNS解析请求携带的域名, 确定所述域名在白名单中; 获取所述域名对应的緩存子系统的网际协议 IP地址, 并将所述緩存子系统的 IP地址发送给所述客户端,以便于客户端根据所述緩存子系统的 IP地址向所 述緩存子系统请求数据; 緩存子系统, 用于接收所述客户端根据所述緩存子系统的 IP地址发送的 数据请求消息, 并向所述客户端发送与所述数据请求消息对应的数据。 A network cache system, comprising: a domain name system DNS redirection subsystem, configured to receive a domain name system DNS resolution request sent by a client, parse a domain name carried by the DNS resolution request, and determine the domain name In the whitelist, obtaining an internet protocol IP address of the cache subsystem corresponding to the domain name, and sending the IP address of the cache subsystem to the client, so that the client is configured according to the IP address of the cache subsystem. Requesting data from the cache subsystem; a cache subsystem, configured to receive a data request message sent by the client according to an IP address of the cache subsystem, and send, to the client, a data request message corresponding to the data request message data.
10、 根据权利要求 9所述的网络緩存系统, 其特征在于, 所述緩存子系 统具体用于接收所述客户端发送的数据请求消息; 如果所述緩存子系统中緩 存有与所述数据请求消息对应的数据, 则所述緩存子系统将緩存的与所述数 据请求消息对应的数据发送给所述客户端; 如果所述緩存子系统中没有緩存 所述数据请求消息对应的数据, 则所述緩存子系统向源服务器发送用于查询 数据的数据请求消息, 所述緩存子系统接收所述源服务器返回的与所述查询 数据的数据请求消息对应的数据, 所述緩存子系统在本地保存所述数据后并 将所述数据发送给所述客户端。 The network cache system according to claim 9, wherein the cache subsystem is specifically configured to receive a data request message sent by the client; if the cache subsystem has a cache and the data request The data corresponding to the message, the cache subsystem sends the cached data corresponding to the data request message to the client; if the data corresponding to the data request message is not cached in the cache subsystem, The cache subsystem sends a data request message for querying data to the source server, and the cache subsystem receives data corresponding to the data request message of the query data returned by the source server, where the cache subsystem is locally saved. The data is then sent to the client.
11、 根据权利要求 9或 10所述的系统, 其特征在于, 所述緩存子系统还 用于根据刷新策略, 从源服务器获取数据, 并更新緩存的数据。  The system according to claim 9 or 10, wherein the cache subsystem is further configured to acquire data from the source server according to the refresh policy, and update the cached data.
12、 根据权利要求 9至 11任一项所述的系统, 其特征在于, 还包括: 分光器或者路由器, 用于将客户端发送的所述 DNS解析请求分为两路, 一路发送给所述 DNS重定向子系统, 另一路发送给外部网络。  The system according to any one of claims 9 to 11, further comprising: a splitter or a router, configured to divide the DNS resolution request sent by the client into two paths, and send the method to the The DNS redirects the subsystem and sends another route to the external network.
PCT/CN2011/073566 2011-04-29 2011-04-29 Method and system for network caching, domain name system redirection sub-system thereof WO2011116726A2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/073566 WO2011116726A2 (en) 2011-04-29 2011-04-29 Method and system for network caching, domain name system redirection sub-system thereof
CN201180000699.6A CN102301682B (en) 2011-04-29 2011-04-29 Method and system for network caching, domain name system redirection sub-system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/073566 WO2011116726A2 (en) 2011-04-29 2011-04-29 Method and system for network caching, domain name system redirection sub-system thereof

Publications (2)

Publication Number Publication Date
WO2011116726A2 true WO2011116726A2 (en) 2011-09-29
WO2011116726A3 WO2011116726A3 (en) 2012-04-05

Family

ID=44673694

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073566 WO2011116726A2 (en) 2011-04-29 2011-04-29 Method and system for network caching, domain name system redirection sub-system thereof

Country Status (2)

Country Link
CN (1) CN102301682B (en)
WO (1) WO2011116726A2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624750A (en) * 2012-04-22 2012-08-01 吴兴利 Method and system for resisting domain name system (DNS) recursion attack
CN104378452A (en) * 2013-08-14 2015-02-25 阿里巴巴集团控股有限公司 Method, device and system for domain name resolution
EP4132111A4 (en) * 2020-03-26 2023-08-30 Vivo Mobile Communication Co., Ltd. Data transmission method and electronic device

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581258B (en) * 2012-08-03 2017-11-03 中国移动通信集团公司 The method and system of network data caching
CN102801823A (en) * 2012-08-23 2012-11-28 神州数码网络(北京)有限公司 DNS (domain name server) relay method and device
CN104219335B (en) * 2013-05-30 2018-08-24 张大顺 A kind of processing method of DNS request, apparatus and system
CN104219200B (en) * 2013-05-30 2017-10-17 杭州迪普科技股份有限公司 A kind of apparatus and method for taking precautions against DNS cache attack
CN104935556B (en) * 2014-03-20 2019-06-07 腾讯科技(深圳)有限公司 A kind of network security processing method, apparatus and system
CN104065543A (en) * 2014-05-19 2014-09-24 浪潮电子信息产业股份有限公司 Network card drive design method based on data transmission management
CN104144231B (en) * 2014-08-21 2018-01-19 北京金山安全软件有限公司 Method and device for processing DNS query request
CN104243344B (en) * 2014-10-11 2018-06-19 网宿科技股份有限公司 A kind of effective data packets catching method and request Redirect Server
CN106487846A (en) * 2015-08-28 2017-03-08 中国电信股份有限公司 The white list updating method of caching system, acquisition and analysis device and caching system
CN106487607A (en) * 2015-08-28 2017-03-08 中国电信股份有限公司 A kind of reorientation method based on cache server status and Redirectional system
US10666672B2 (en) 2015-08-31 2020-05-26 Hewlett Packard Enterprise Development Lp Collecting domain name system traffic
CN106550056B (en) * 2015-09-18 2019-09-10 中国移动通信集团江苏有限公司 A kind of domain name analytic method and device
CN107872544A (en) * 2016-09-28 2018-04-03 中兴通讯股份有限公司 A kind of domain name analytic method, device, gateway and system
CN108259528B (en) * 2016-12-28 2021-01-12 华为技术有限公司 Resource caching method and device
CN108270683A (en) * 2016-12-30 2018-07-10 华为软件技术有限公司 Flow optimization method, cache server and system under DNS forthright scenes
CN107613036B (en) * 2017-09-04 2021-07-23 北京新流万联网络技术有限公司 Method and system for realizing HTTPS transparent proxy
CN108040085A (en) * 2017-11-20 2018-05-15 广州华多网络科技有限公司 Method for network access, device and server
CN111371866B (en) * 2020-02-26 2023-03-21 厦门网宿有限公司 Method and device for processing service request

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101501669A (en) * 2005-11-21 2009-08-05 杰出网络公司 Domain name resolution resource allocation
CN101626375A (en) * 2008-07-08 2010-01-13 鸿富锦精密工业(深圳)有限公司 Domain name protecting system and method thereof
CN101895589A (en) * 2010-07-26 2010-11-24 杭州华三通信技术有限公司 Wide area network router and method for establishing routing table items therein

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100375121B1 (en) * 1999-12-23 2003-03-08 주식회사 아라기술 Web contents transmission method
CN102025793A (en) * 2010-01-22 2011-04-20 中国移动通信集团北京有限公司 Domain name resolution method and system and DNS in IP network
CN101984637B (en) * 2010-11-02 2014-06-11 中兴通讯股份有限公司 Content distribution implementation method and system
CN102571997B (en) * 2010-12-29 2014-09-10 中国移动通信集团北京有限公司 Method, system and device for data access

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101501669A (en) * 2005-11-21 2009-08-05 杰出网络公司 Domain name resolution resource allocation
CN101626375A (en) * 2008-07-08 2010-01-13 鸿富锦精密工业(深圳)有限公司 Domain name protecting system and method thereof
CN101895589A (en) * 2010-07-26 2010-11-24 杭州华三通信技术有限公司 Wide area network router and method for establishing routing table items therein

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624750A (en) * 2012-04-22 2012-08-01 吴兴利 Method and system for resisting domain name system (DNS) recursion attack
CN102624750B (en) * 2012-04-22 2016-08-03 吴兴利 Resist the method and system that DNS recurrence is attacked
CN104378452A (en) * 2013-08-14 2015-02-25 阿里巴巴集团控股有限公司 Method, device and system for domain name resolution
EP4132111A4 (en) * 2020-03-26 2023-08-30 Vivo Mobile Communication Co., Ltd. Data transmission method and electronic device

Also Published As

Publication number Publication date
CN102301682B (en) 2014-02-19
CN102301682A (en) 2011-12-28
WO2011116726A3 (en) 2012-04-05

Similar Documents

Publication Publication Date Title
WO2011116726A2 (en) Method and system for network caching, domain name system redirection sub-system thereof
KR102514250B1 (en) Method, Apparatus and System for Selecting a Mobile Edge Computing Node
US11336614B2 (en) Content node network address selection for content delivery
US10333835B2 (en) Packet transmission method, apparatus, and system
EP2993853B1 (en) Method for routing and forwarding, and network controller
US9160703B2 (en) Request routing management based on network components
CA2726915C (en) Request routing using network computing components
US8756296B2 (en) Method, device and system for distributing file data
US10097616B2 (en) Methods for optimizing service of content requests and devices thereof
US20130041982A1 (en) Method and node for acquiring content and content network
EP3567813B1 (en) Method, apparatus and system for determining content acquisition path and processing request
KR20120043007A (en) Server-side load balancing using parent-child link aggregation groups
WO2015039475A1 (en) Method, server, and system for domain name resolution
Thelagathoti et al. Named data networking for content delivery network workflows
Harada et al. Data aggregation in named data networking
WO2012072045A1 (en) Method, network node and system for data transmission in cdn network
Trajano et al. ContentSDN: A content-based transparent proxy architecture in software-defined networking
EP1324546A1 (en) Dynamic content delivery method and network
US20160323365A1 (en) Content delivery method, apparatus, and system
WO2020249128A1 (en) Service routing method and apparatus
Seyyed Hashemi et al. Analytical characterization of cache replacement policy impact on content delivery time in information‐centric networks
JP7466756B2 (en) NETWORK NODE FOR INDIRECT COMMUNICATION AND METHOD THEREIN - Patent application
Cisco Configuring Services
Sarddar et al. Edge multilevel edge server co-operation in content delivery network using hierarchical classification
KR20130021729A (en) System and method to deliver contents using dynamic context in the distributed network

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180000699.6

Country of ref document: CN

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

Ref document number: 11758836

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11758836

Country of ref document: EP

Kind code of ref document: A2