CN111181868A - Domain name heat based cache TTL dynamic change method and system - Google Patents

Domain name heat based cache TTL dynamic change method and system Download PDF

Info

Publication number
CN111181868A
CN111181868A CN201911400217.0A CN201911400217A CN111181868A CN 111181868 A CN111181868 A CN 111181868A CN 201911400217 A CN201911400217 A CN 201911400217A CN 111181868 A CN111181868 A CN 111181868A
Authority
CN
China
Prior art keywords
ttl
value
domain name
cache
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911400217.0A
Other languages
Chinese (zh)
Other versions
CN111181868B (en
Inventor
陈超
袁立志
毛伟
邢志杰
李晓逸
张立超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Wangji Technology Co ltd
Original Assignee
INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER
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 INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER filed Critical INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER
Priority to CN201911400217.0A priority Critical patent/CN111181868B/en
Publication of CN111181868A publication Critical patent/CN111181868A/en
Application granted granted Critical
Publication of CN111181868B publication Critical patent/CN111181868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations
    • H04L47/286Time to live
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a system for dynamically changing cache TTL based on domain name heat, wherein the method comprises the following steps: recording the number of times of using a cache of data in a DNS recursive server in a life cycle by taking a TTL value in an authoritative server as a reference; setting a gradient value and a standard interval, and adjusting the TTL value according to the number of times of using the cache; in order to avoid mutation problem, the adjusted TTL value and the existing TTL value are combined into the final TTL correction value of the domain name according to the weight.

Description

Domain name heat based cache TTL dynamic change method and system
Technical Field
The invention relates to the technical field of computer IP address management, in particular to a dynamic cache TTL changing method based on domain name heat.
Background
TTL (Time-To-Live) represents the Time of residence of a domain name resolution record in the DNS server. When DNS servers in various places receive the resolution request, the resolution request is sent to an NS server (an authoritative domain name server) specified by the domain name so as to obtain a resolution record; after obtaining this record, the record is kept in the DNS server (cache servers in various places, also called recursive domain name servers) for a period of time, and if a resolution request of this domain name is received again in this period of time, the DNS server will not send a request to the NS server, but directly return the record that was obtained just before, and the time that this record was kept in the DNS server is the TTL value.
The authoritative domain name servers are all servers of the domain name registrars, and the TTL values can only be modified at the authoritative servers. The recursive server may take a certain policy to change the TTL in consideration of the balance between performance and consistency.
If the TTL setting is very small (e.g., 1 second), it means that almost every time the user performs resolution, the recursive server needs to make a resolution request to the DNS authoritative server, which takes much more time, and the resolution of the authoritative server takes longer time than directly using the cached answer and has a higher failure rate because it needs to determine the source of the user to perform intelligent resolution, which is detrimental to the access experience and the resolution stability of the user. If the TTL is large, the longer the time to wait for validation after the modification and analysis will be, which will cause problems such as analysis errors. The TTL is appropriate, and dynamic adjustment and optimization are required according to actual conditions.
Disclosure of Invention
In order to solve the technical problem, the invention provides a dynamic cache TTL changing method based on domain name heat, which comprises the following steps:
1) and inquiring response data taken from the authority, and caching according to TTL (transistor-transistor logic) responded by the authority server.
2) The number of times the cache is used during the life cycle is recorded.
3) And setting a gradient value, and searching a TTL (transistor-transistor logic) adjustment interval according to the using times of the cache.
Further, the gradient value is not limited and fixed, and the specific gradient value should be set according to specific situations.
4) And setting a standard interval, not adjusting, reducing the TTL value of the domain name according to a certain proportion after the use frequency is higher than the interval, and increasing the target TTL value according to a certain proportion after the use frequency is lower than the interval.
Further, the standard interval is not limited in this patent, and the specific standard interval should be set according to specific situations.
Further, the TTL is adjusted in different proportions according to the setting of the TTL adjustment interval for values outside the standard interval, and the adjustment interval is not specifically limited by the present invention.
5) After the target TTL value is adjusted, the TTL value used in the previous round can be combined, and the final TTL correction value of the domain name is synthesized according to the weight, so that the mutation problem is avoided.
Further, the adjusted TTL value is combined with the TTL value before the current adjustment, and a final TTL correction value is calculated, so that the accidental mutation problem is avoided;
6) TTL maximum and minimum values are set to ensure that the maximum value and the minimum value cannot be infinitely increased or reduced.
Further, the maximum value and the minimum value of the TTL are set to avoid extreme situations, and the maximum value and the minimum value of the TTL are not limited and need to be determined according to specific situations.
Based on another aspect of the present invention, a system for dynamically changing a cached TTL based on domain name hotness is further provided, where the system includes:
the query module is used for querying the response data taken from the Wei and caching the response data according to the TTL (transistor-transistor logic) responded by the authoritative server;
the recording module is used for recording the number of times that the cache is used in the life cycle;
the interval setting module is used for setting a gradient value, searching a TTL (transistor-transistor logic) adjusting interval according to the using times of the cache, setting a standard interval and adjusting the TTL value according to the relation between the using times of the cache and the standard interval;
and the correction module combines the TTL value used in the previous round and synthesizes the final TTL correction value of the domain name according to the weight. The purpose of setting the weights of the old and new TTL is to prevent abrupt changes from occurring and to make them relatively smoothly adjustable, the weights being chosen mainly depending on which TTL value is more preferred to use.
Compared with the prior art, the method and the system for dynamically changing the cached TTL based on the domain name heat have the advantages that the visit quantity of the long-tail domain name is small, the TTL can be prolonged, and unnecessary recursive requests can be reduced. Correspondingly, the hot-spot domain name with larger access amount can properly reduce TTL (transistor-transistor logic) to reduce the delay time required for keeping the data consistent with the source, dynamically adjust and optimize, and improve the access experience and the analysis stability of the user.
Drawings
FIG. 1 is a flow chart of a method for dynamically changing a cached TTL based on domain name hotness according to the present invention;
FIG. 2 is a schematic diagram illustrating a corresponding relationship between a gradient value and an adjustment interval according to the present invention;
FIG. 3 is a schematic diagram of the adjustment intervals corresponding to different gradients according to the present invention;
Detailed Description
The present invention will be described in further detail below with reference to the accompanying drawings, but the present invention is not limited thereto.
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a dynamic change method of a cached TTL based on domain name hotness according to the present invention, where the method includes:
s101, setting the maximum value MAX and the minimum value MIN of TTL to ensure that the TTL cannot be infinitely increased or reduced.
S102, setting a gradient value, wherein the times of using different caches correspond to different TTL adjustment intervals.
Specifically, the gradient value is not limited in this patent, and the setting of the specific gradient value should be set according to specific situations.
S103, setting a standard interval and each adjusting interval, and setting the adjusting proportion of TTL in each scheduling interval.
And S104, inquiring response data taken from the authority, and caching according to TTL (transistor-transistor logic) responded by the authority server.
And S105, recording the number of times of the cache used in the life cycle, and searching a corresponding adjustment interval according to the gradient value.
And S106, judging whether the standard interval is in.
And S107, if the standard interval is within the standard interval, no adjustment is performed.
And S108, if the TTL value is not in the standard interval, correspondingly adjusting the TTL value according to the TTL adjusting interval.
Specifically, the using times are higher than that of the set standard interval, and the TTL value of the domain name is reduced according to a certain proportion. And below the interval, the target TTL value is increased according to a certain proportion.
And S109, combining the TTL values used in the previous round, and synthesizing the final TTL correction value of the area name according to the weight.
Specifically, the adjusted TTL value is combined with the TTL value before the current adjustment to calculate the final TTL correction value, so that the accidental mutation problem is avoided;
s110, judging whether the TTL correction value belongs to [ MIN, MAX ].
Specifically, the maximum value and the minimum value of TTL are set to avoid extreme situations, and the maximum value and the minimum value of TTL are not limited in the present invention and need to be determined according to specific situations;
and S111, if the domain name belongs to the range, taking the revised TTL value as the latest TTL value of the domain name.
S112, if the TTL correction value does not belong to the range, the MIN/MAX value set in the S101 is taken as the TTL correction value, and if the correction value is larger than MAX, the MAX value is taken as the final correction value; if the correction value is less than MIN, the final correction value is MIN.
And S113, storing the TTL value in the recursive server, and updating the TTL value corresponding to the domain name in the host record.
In this embodiment, a process of revising the domain name TTL values in the recursive server is described, and a round of revising the TTL values is performed in the recursive server whenever the caching time of the domain name resolution record expires.
Fig. 2 is a schematic diagram illustrating a corresponding relationship between a gradient value setting and an adjustment interval provided by the present invention. The gradient divides an integer axis into different gradient intervals starting from 0. In the recursion server, after the TTL time of a domain name record is reached, the number of times of the domain name record being accessed in the TTL time is counted, corresponding gradient intervals are searched according to the number of times of access, and each gradient interval corresponds to different TTL adjustment intervals. The gradient interval is not fixed and is customized according to the specific region and recursion, and only one of them is provided here.
Fig. 3 is a schematic diagram illustrating adjustment intervals corresponding to different gradients provided by the present invention. In this embodiment, the adjustment interval C is a standard interval, and if the counted access times of a domain name cache record in the recursive server are within the standard interval, the TTL value is not adjusted. If the number of times of use is higher than the interval (for example, in the adjustment interval D), the TTL value of the domain name is reduced according to a certain proportion according to the corresponding adjustment interval (the TTL value is reduced by 15% in the adjustment interval D), and the target TTL value is increased according to a certain proportion (the TTL value is increased by 15% in the adjustment interval A) below the interval (for example, in the adjustment interval A). The present invention is not limited in particular by the division of the adjustment ratio and the interval, and the customized setting should be performed according to the specific situation and experience.
Correspondingly to the method in the foregoing embodiment, another embodiment of the present invention further provides a system for dynamically changing a cached TTL based on domain name hotness, where the system includes:
the query module is used for querying the response data taken from the Wei and caching the response data according to the TTL (transistor-transistor logic) responded by the authoritative server;
the recording module is used for recording the number of times that the cache is used in the life cycle;
the interval setting module is used for setting a gradient value, the range of the gradient value is adjustable, searching a TTL (transistor-transistor logic) adjusting interval according to the number of times of using the cache, setting a standard interval, and adjusting the TTL value according to the relation between the number of times of using the cache and the standard interval; and when the using times are higher than the set standard interval, the TTL value of the domain name is reduced according to a certain proportion. Below the interval, the target TTL value is increased according to a certain proportion;
and the correction module combines the TTL value used in the previous round and synthesizes the final TTL correction value of the domain name according to the weight.
The system of the present invention is used for executing the method of the present invention, and it is not described in detail with reference to the method embodiments.
Compared with the prior art, the method and the system for dynamically changing the cached TTL based on the domain name heat degree enable the TTL value of the long-tail domain name with smaller access quantity to be increased properly by adjusting and changing the TTL value in the domain name resolution cache record in the recursive server layer by layer, and therefore unnecessary recursive requests are reduced. Correspondingly, for the hot-spot domain names with larger access quantity, the TTL value of the hot-spot domain names is properly reduced, the delay time required for keeping the data consistent with the source is reduced, the problems mentioned in the technical background are effectively solved, and the user experience and the access stability are improved.
The foregoing description shows and describes several preferred embodiments of the invention, but as aforementioned, it is to be understood that the invention is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments and is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the inventive concept as expressed herein, commensurate with the above teachings, or the skill or knowledge of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (7)

1. A dynamic cache TTL changing method based on domain name heat is characterized by comprising the following steps:
inquiring response data taken from authority, and caching according to TTL responded by the authority server;
recording the number of times of using the cache in the life cycle;
setting a gradient value, and searching a TTL (transistor-transistor logic) adjustment interval according to the using times of the cache;
setting a standard interval, wherein the number of times of used cache is not adjusted in the interval, the number of times of use is higher than that of the standard interval, then the TTL value of the domain name is reduced according to a certain proportion, the TTL value is lower than that of the standard interval, and then the target TTL value is increased according to a certain proportion;
and after the target TTL value is adjusted, combining the TTL value used in the previous round, and synthesizing the final TTL correction value of the domain name according to the weight.
2. The method of claim 1, wherein the method further comprises: the maximum and minimum values of TTL are set.
3. The method of claim 2, wherein the DNS recursive server counts the number of times the cache for all domain names in the server is used during a lifetime.
4. The method of claim 2, wherein the range of gradient values is adjustable.
5. The method of claim 1 wherein the adjustment intervals are different and the TTL adjustment ratio is set differently.
6. The method of claim 1 wherein the TTL values for the long tail domain names with a lower amount of access are relatively longer and the TTL values for the hot spot domain names with a higher amount of access are relatively lower.
7. A system for dynamically changing cached TTL (transistor-transistor logic) based on domain name heat is characterized by comprising:
the query module is used for querying the response data taken from the Wei and caching the response data according to the TTL (transistor-transistor logic) responded by the authoritative server;
the recording module is used for recording the number of times that the cache is used in the life cycle;
the interval setting module is used for setting a gradient value, searching a TTL (transistor-transistor logic) adjusting interval according to the using times of the cache, setting a standard interval and adjusting the TTL value according to the relation between the using times of the cache and the standard interval;
and the correction module combines the TTL value used in the previous round and synthesizes the final TTL correction value of the domain name according to the weight.
CN201911400217.0A 2019-12-30 2019-12-30 Domain name heat-based cache TTL dynamic change method and system Active CN111181868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911400217.0A CN111181868B (en) 2019-12-30 2019-12-30 Domain name heat-based cache TTL dynamic change method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911400217.0A CN111181868B (en) 2019-12-30 2019-12-30 Domain name heat-based cache TTL dynamic change method and system

Publications (2)

Publication Number Publication Date
CN111181868A true CN111181868A (en) 2020-05-19
CN111181868B CN111181868B (en) 2023-06-16

Family

ID=70655907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911400217.0A Active CN111181868B (en) 2019-12-30 2019-12-30 Domain name heat-based cache TTL dynamic change method and system

Country Status (1)

Country Link
CN (1) CN111181868B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286016A (en) * 2021-07-20 2021-08-20 中国人民解放军国防科技大学 Method and device for analyzing service range of cache domain name system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100274970A1 (en) * 2009-04-23 2010-10-28 Opendns, Inc. Robust Domain Name Resolution
CN102025795A (en) * 2010-01-22 2011-04-20 中国移动通信集团北京有限公司 DNS response message processing method, DNS server and system
US20160112500A1 (en) * 2014-10-21 2016-04-21 Samsung Sds Co., Ltd. Global server load balancer apparatus and method for dynamically controlling time-to-live
CN105610930A (en) * 2015-12-25 2016-05-25 互联网域名系统北京市工程研究中心有限公司 Data optimization method based on DNS (Domain Name Server)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100274970A1 (en) * 2009-04-23 2010-10-28 Opendns, Inc. Robust Domain Name Resolution
CN102025795A (en) * 2010-01-22 2011-04-20 中国移动通信集团北京有限公司 DNS response message processing method, DNS server and system
US20160112500A1 (en) * 2014-10-21 2016-04-21 Samsung Sds Co., Ltd. Global server load balancer apparatus and method for dynamically controlling time-to-live
CN105610930A (en) * 2015-12-25 2016-05-25 互联网域名系统北京市工程研究中心有限公司 Data optimization method based on DNS (Domain Name Server)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
曹绍华等: "基于DTTL模型的DNS自适应缓存机制研究", 《中国电子科学研究院学报》 *
蔡鹏程: "Windows操作系统DNS缓存性能分析", 《中国优秀硕士学位论文全文数据库》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113286016A (en) * 2021-07-20 2021-08-20 中国人民解放军国防科技大学 Method and device for analyzing service range of cache domain name system

Also Published As

Publication number Publication date
CN111181868B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
US10180993B2 (en) Routing based request correlation
CN111245972B (en) Domain name resolution method, device, medium and equipment
US10116584B2 (en) Managing content delivery network service providers
US11044262B2 (en) Method, apparatus and system for anti-attacking in domain name system (DNS)
AU2011307319B2 (en) Request routing in a networked environment
CN113497817B (en) Traffic scheduling method and device, edge node of CDN (content delivery network) and server
US10645062B2 (en) System and method for improving proxy server performance using local domain name system (DNS) cache and connectivity monitoring
US20170339096A1 (en) Methods and systems for implementing very large dns zones
EP2849410B1 (en) Data processing method, router and ndn system
JP2001524778A (en) Enhanced domain name service
CA2726915A1 (en) Request routing using network computing components
KR20160046667A (en) Global server load balancer apparatus and method for dynamically controlling time-to-live
CN110661862A (en) Method for preheating resource file and central management system
CN113630329A (en) Load balancing method and system based on user access amount and readable storage medium
CN111181868A (en) Domain name heat based cache TTL dynamic change method and system
CN111597213A (en) Caching method, software server and storage medium
CN112702446B (en) Distributed storage system with DNS (domain name system) cached in edge network
JP2019008645A (en) SERVER DEVICE, METHOD FOR ALLOWING SERVER DEVICE TO COMMUNICATE WITH IoT DEVICE, COMPUTER PROGRAM, COMMUNICATION SYSTEM AND IoT DEVICE
CN114500456A (en) DNS scheduling optimization method and device based on full-network sniffing and computing equipment
CN115297085B (en) Domain name resolution updating method and device, electronic equipment and storage medium
EP3288242B1 (en) Domain name system accessing method and device
JP2018527796A (en) Terminal positioning
EP3706450A1 (en) Fast query method for dynamic location information of mobile network entities
CN115811515A (en) File access method and system based on fragments under edge cloud environment
WO2020098773A1 (en) Request response method and device, edge node and authentication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230516

Address after: 518001 710 Ludan building, No. 1011 Binhe Road, Ludan village community, Guiyuan street, Luohu District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Wangji Technology Co.,Ltd.

Address before: Room 322, building 1, yard 3, Xingke south 2nd Street, Yanqi Economic Development Zone, Huairou District, Beijing

Applicant before: INTERNET DOMAIN NAME SYSTEM BEIJING ENGINEERING RESEARCH CENTER

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant