Cache TTL dynamic change method and system based on domain name popularity

By dynamically adjusting the TTL value of DNS cache and optimizing the cache strategy based on the popularity of domain names, the problem of insufficient management of long-tail and hot-spot domain names in traditional DNS cache policies is solved, and DNS resolution efficiency and user experience are improved.

CN119135659AInactive Publication Date: 2024-12-13BUNNING DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411245515.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional DNS caching strategies rely on fixed TTL values, resulting in insufficient management of long-tail domain names, delay problems of hot domain names, and lack of dynamic adaptability, affecting cache efficiency and user experience.

Method used

By collecting domain name access data, analyzing access frequency and mode, setting gradient values ​​and standard intervals, dynamically adjusting TTL values, adjusting TTL values ​​according to domain name heat to reduce unnecessary recursive requests and synchronization delays, data collection, heat analysis, and TTL adjustment are adopted. and cache management modules to achieve flexible adjustments.

Benefits of technology

It significantly improves DNS resolution efficiency, reduces DNS server load and user access latency, and improves the flexibility and adaptability of cache management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
Patent Text Reader

Abstract

The invention relates to the technical field of computer networks, in particular to a cache TTL dynamic change method and system based on domain name popularity, and the method comprises the steps: S1, collecting access data of a domain name, analyzing the access frequency and mode, and calculating a popularity value of the domain name; s2, setting a plurality of gradient values and corresponding standard intervals according to the access popularity of the domain name; s3, classifying the domain name into a corresponding standard interval according to the access times of the domain name in the cache life cycle, and adjusting the TTL value according to a preset gradient value; and S4, prolonging the TTL value to reduce unnecessary recursion requests. By dynamically adjusting the TTL value of the domain name, unnecessary recursion requests are reduced, the load of the DNS server is reduced, and the DNS resolution efficiency is remarkably improved; by reducing the TTL value, the synchronization delay with the authoritative server during user access is reduced, so that the user experience is improved; according to the method and the system, the TTL value can be flexibly adjusted according to the actual access condition of the domain name, and the method and the system have relatively high adaptability and expandability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer network technology, and in particular to a method and system for dynamically changing a cache TTL based on domain name popularity. Background Art

[0002] In the existing Internet architecture, the DNS (Domain Name System) cache mechanism is an important means to improve network access speed and reduce latency. DNS cache is used to store domain name resolution results so that the results can be quickly returned in subsequent requests, thereby reducing the query burden on the authoritative DNS server. However, traditional DNS cache strategies usually rely on a fixed TTL (time to live) value to determine the validity period of cached data. This fixed TTL strategy has the following problems:

[0003] Insufficient management of long-tail domain names: For long-tail domain names with low traffic, the fixed TTL value may be too long. This will cause the cache time of the long-tail domain name to be too long, thereby increasing unnecessary recursive requests and affecting the efficiency of cache usage.

[0004] Delay problem of hotspot domain names: For hotspot domain names with large traffic, the fixed TTL value may be too short. This will cause the hotspot domain names to frequently synchronize data from the authoritative server, increase synchronization delay and DNS server burden, and reduce user access experience.

[0005] Lack of dynamic adaptability: Existing DNS cache mechanisms usually cannot dynamically adjust TTL values ​​according to actual access conditions. Fixed TTL settings cannot cope with changes in domain name access patterns, resulting in insufficient flexibility in cache management. Summary of the invention

[0006] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method and system for dynamically changing cache TTL based on domain name popularity, which can effectively solve the problems in the prior art.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0008] The present invention provides a method for dynamically changing a cache TTL based on domain name popularity, comprising the following steps:

[0009] S1: Collect domain name access data, analyze access frequency and patterns, and calculate the popularity value of the domain name;

[0010] S2: Set multiple gradient values ​​and corresponding standard intervals according to the access popularity of the domain name;

[0011] S3: Classify the domain name into the corresponding standard interval according to the number of visits during the cache life cycle, and adjust the TTL value according to the preset gradient value;

[0012] S4: Extend the TTL value to reduce unnecessary recursive requests, perform weighted synthesis of the adjusted TTL value and the existing TTL value to obtain the final TTL correction value.

[0013] Furthermore, in the DNS recursive server, based on the TTL value in the authoritative server, the number of visits to each domain name within the cache life cycle is recorded, that is, the access popularity data of the domain name.

[0014] Furthermore, multiple gradient values ​​and corresponding standard intervals are set, and each standard interval corresponds to a TTL adjustment strategy to ensure that the TTL value can be flexibly adjusted according to the actual access situation of the domain name.

[0015] Furthermore, for long-tail domain names with less traffic, the TTL value is appropriately extended to reduce unnecessary recursive requests; for hot domain names with more traffic, the TTL value is appropriately reduced to reduce the synchronization delay with the authoritative server.

[0016] Furthermore, the adjustment strategy of the TTL value includes but is not limited to linear adjustment based on access frequency, nonlinear adjustment based on request mode, etc.

[0017] A system for dynamically changing cache TTL based on domain name popularity.

[0018] Data collection module: used to record the access popularity data of domain names;

[0019] Heat analysis module: used to analyze the heat of domain names and classify them into corresponding standard intervals;

[0020] TTL adjustment module: used to adjust the TTL value according to the gradient value;

[0021] Cache management module: used to achieve smooth transition of TTL values ​​and cache management.

[0022] Compared with the known prior art, the technical solution provided by the present invention has the following beneficial effects:

[0023] By dynamically adjusting the TTL value of the domain name, unnecessary recursive requests are reduced, the load on the DNS server is reduced, and the DNS resolution efficiency is significantly improved; by reducing the TTL value, the synchronization delay with the authoritative server during user access is reduced, thereby improving the user experience; the method and system of the present invention can flexibly adjust the TTL value according to the actual access situation of the domain name, and have strong adaptability and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] The present invention will be further described below in conjunction with the embodiments.

[0028] Embodiment: A method and system for dynamically changing cache TTL based on domain name popularity, comprising the following steps:

[0029] S1: Collect the access data of the domain name, analyze the access frequency and pattern, and calculate the popularity value of the domain name; in the DNS recursive server, based on the TTL value in the authoritative server, record the number of visits to each domain name within the cache life cycle, that is, the access popularity data of the domain name; set multiple gradient values ​​and corresponding standard intervals, each standard interval corresponds to a TTL adjustment strategy to ensure that the TTL value can be flexibly adjusted according to the actual access situation of the domain name.

[0030] S2: Set multiple gradient values ​​and corresponding standard intervals according to the access popularity of the domain name;

[0031] S3: According to the number of visits to the domain name during the cache life cycle, it is classified into the corresponding standard interval, and the TTL value is adjusted according to the preset gradient value; for long-tail domain names with less visits, the TTL value is appropriately extended to reduce unnecessary recursive requests; for hot domain names with more visits, the TTL value is appropriately reduced to reduce the synchronization delay with the authoritative server. The TTL value adjustment strategy includes but is not limited to linear adjustment based on access frequency, nonlinear adjustment based on request pattern, etc.

[0032] S4: Extend the TTL value to reduce unnecessary recursive requests, perform weighted synthesis of the adjusted TTL value and the existing TTL value to obtain the final TTL correction value.

[0033] A system for dynamically changing cache TTL based on domain name popularity.

[0034] Data collection module: used to record the access popularity data of domain names;

[0035] Heat analysis module: used to analyze the heat of domain names and classify them into corresponding standard intervals;

[0036] TTL adjustment module: used to adjust the TTL value according to the gradient value;

[0037] Cache management module: used to achieve smooth transition of TTL values ​​and cache management.

[0038] Take linear adjustment as an example: when the popularity of a domain name exceeds the threshold, the TTL is reduced by a fixed percentage; when it is lower than the threshold, the TTL is increased by a fixed percentage.

[0039] Take nonlinear adjustment as an example: according to the changing trend of the heat value, more complex adjustment algorithms are adopted, such as exponential backoff and dynamic smoothing.

[0040] By flexibly adjusting the TTL value, the efficiency and flexibility of DNS cache management are significantly improved, which is of great significance to improving the quality of network services.

[0041] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for dynamically changing cache TTL based on domain name popularity, characterized in that: The following steps are involved: S1: Collect domain name access data, analyze access frequency and patterns, and calculate the popularity value of the domain name; S2: Set multiple gradient values ​​and corresponding standard intervals according to the access popularity of the domain name; S3: Classify the domain name into the corresponding standard interval according to the number of visits during the cache life cycle, and adjust the TTL value according to the preset gradient value; S4: Extend the TTL value to reduce unnecessary recursive requests, perform weighted synthesis of the adjusted TTL value and the existing TTL value to obtain the final TTL correction value.

2. According to claim 1, a method for dynamically changing cache TTL based on domain name popularity is characterized in that: In the DNS recursive server, the TTL value in the authoritative server is used as a benchmark to record the number of visits to each domain name within the cache life cycle, that is, the access popularity data of the domain name.

3. According to the method of dynamically changing cache TTL based on domain name popularity according to claim 1, it is characterized in that: Set multiple gradient values ​​and corresponding standard intervals. Each standard interval corresponds to a TTL adjustment strategy to ensure that the TTL value can be flexibly adjusted according to the actual access situation of the domain name.

4. According to the method of claim 1, the method is characterized in that: For long-tail domain names with less traffic, appropriately extend the TTL value to reduce unnecessary recursive requests; for hotspot domain names with more traffic, appropriately reduce the TTL value to reduce the synchronization delay with the authoritative server.

5. According to the method of dynamically changing cache TTL based on domain name popularity according to claim 1, it is characterized in that: The adjustment strategy of the TTL value includes but is not limited to linear adjustment based on access frequency, nonlinear adjustment based on request mode, etc.

6. A system for dynamically changing cache TTL based on domain name popularity as described in claim 1, characterized in that: Data collection module: used to record the access popularity data of domain names; Heat analysis module: used to analyze the heat of domain names and classify them into corresponding standard intervals; TTL adjustment module: used to adjust the TTL value according to the gradient value; Cache management module: used to achieve smooth transition of TTL values ​​and cache management.