CN109698764B - Domain name resolution system configuration updating method and device - Google Patents
Domain name resolution system configuration updating method and device Download PDFInfo
- Publication number
- CN109698764B CN109698764B CN201711002898.6A CN201711002898A CN109698764B CN 109698764 B CN109698764 B CN 109698764B CN 201711002898 A CN201711002898 A CN 201711002898A CN 109698764 B CN109698764 B CN 109698764B
- Authority
- CN
- China
- Prior art keywords
- dns
- local dns
- local
- availability
- list
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000012544 monitoring process Methods 0.000 claims abstract description 68
- 238000005192 partition Methods 0.000 claims abstract description 50
- 230000004044 response Effects 0.000 claims description 40
- 238000001514 detection method Methods 0.000 claims description 13
- 239000013589 supplement Substances 0.000 claims description 10
- 230000001502 supplementing effect Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 8
- 238000012423 maintenance Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000000593 degrading effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/30—Managing network names, e.g. use of aliases or nicknames
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method and a device for updating configuration of a domain name resolution system. Relates to the field of computer internet; the problems that processing efficiency cannot be guaranteed and maintenance cost is high when a plurality of local DNS are configured are solved. The method comprises the following steps: when the availability risk of a DNS configuration file of a current local domain name resolution system is detected, a DNS monitoring list is obtained, and the DNS monitoring list contains the resolution availability and/or partition area scheduling availability information of all local DNS related to the current DNS configuration file; and selecting the DNS with better availability to replace the local DNS with poorer analysis availability and/or partition region scheduling availability information in the DNS monitoring list, adding the DNS into the local DNS list, and generating a new DNS configuration file. The technical scheme provided by the invention is suitable for a multi-local DNS configuration system, and realizes DNS configuration update based on availability.
Description
Technical Field
The invention relates to the field of computer internet, in particular to a method and a device for updating domain name resolution system (DNS) configuration.
Background
The Linux operating system is widely applied to a server side. The application service program may manage the local DNS server IP by configuring/etc/resolv.conf using the linux operating system, specifically, configure by configuring a "nameserver DNS-IP", and may implement the master/slave of the local DNS by configuring a plurality of nameservers, for example:
nameserver 10.16.40.3
nameserver 1.2.4.8
nameserver 119.29.29.29
nameserver 114.114.114.114
when a plurality of local DNS are configured, when a domain name resolution request occurs, the configured plurality of IPs are sequentially used as the IPs of the local DNS for resolution, and if the former local DNS cannot obtain a resolution result, the latter backup local DNS IP is sequentially used until the resolution result is obtained or all the attempts are finished.
The prior art has the following problems:
1. if only a single local DNS is configured, if the local DNS fails and is not replaced in time, the resolution service is unavailable, and the availability of the application service resolved by using the local DNS is influenced;
2. if a plurality of local DNS are configured and the previous local DNS configured is unavailable, the resolution is slow, and the processing efficiency of the application service resolved by using the local DNS is influenced;
3. the prior art would only determine if a local DNS is available and then select in order. Since most application services need to use domain name resolution for sub-regional scheduling at present, the final sub-regional scheduling result is affected by the consistency of the local DNS and the network where the linux server is located, and therefore the consistency of the network position cannot be judged by the current mechanism;
4. when the availability of the local DNS is in problem, the cluster application service composed of the mass servers adopts a manual replacement or manual batch replacement mode at present, so that the labor cost is high and the efficiency is low.
Disclosure of Invention
The present invention is directed to solving the problems described above.
According to a first aspect of the present invention, there is provided a method for updating a domain name resolution system configuration, including:
when the availability risk of a DNS configuration file of a current local domain name resolution system is detected, a DNS monitoring list is obtained, and the DNS monitoring list contains the resolution availability and/or partition area scheduling availability information of all local DNS related to the current DNS configuration file;
and selecting the DNS with better availability to replace the local DNS with poorer analysis availability and/or partition region scheduling availability information in the DNS monitoring list, adding the DNS into the local DNS list, and generating a new DNS configuration file.
Preferably, when it is detected that an availability risk exists in an existing DNS profile of the local domain name resolution system, before the step of obtaining the DNS monitoring list, the method further includes:
and when the first local DNS is unavailable or the proportion of unavailable local DNS in the local DNS list exceeds a first threshold value, judging that the availability risk exists.
Preferably, when it is detected that the current local domain name resolution system DNS profile has an availability risk, the step of obtaining the DNS monitoring list includes:
detecting the resolving availability and the partition region scheduling availability of each DNS in the local DNS list;
and generating the DNS monitoring list of the local DNS list according to the detection result.
Preferably, the step of detecting the resolution availability and the partition scheduling availability of each DNS in the local DNS list includes:
analyzing preset monitoring domain names one by using each local DNS in the local DNS list;
when the analysis response result can be normally received, judging that the corresponding local DNS analysis is available, and comparing the analysis response result with a preset standard response result;
and when the comparison results are consistent, judging that the corresponding local DNS partition area scheduling is available, and when the comparison results are different, judging that the corresponding local DNS partition area scheduling is unavailable.
Preferably, the step of selecting a DNS with better availability to replace a local DNS with poorer resolution availability and/or zone scheduling availability information in the DNS monitoring list to join the local DNS list includes:
acquiring DNS parameters which comprise the minimum number of each type of local DNS in a local DNS list;
counting the number of the local DNS of each type which can be used for analysis and can be used for regional scheduling in the current local DNS list;
generating a local DNS selection task according to the statistical result and the DNS parameter;
and according to the local DNS selection task, selecting local DNS which is available for analysis and is available for regional scheduling from a DNS library file to supplement the local DNS into the local DNS list, and generating a new DNS configuration file.
Preferably, the generating of the local DNS selection task according to the statistical result and the DNS parameter includes:
comparing the number of the local DNS types which can be used for analysis and can be scheduled by the sub-areas in the current local DNS list with the minimum number of the local DNS types contained in the DNS parameter;
and for the type that the analysis is available and the number of the local DNS available for the regional scheduling does not reach the minimum number, generating a local DNS selection task which needs to supplement the local DNS of the corresponding type with a first difference value, wherein the first difference value is the difference value between the number of the local DNS available for the analysis and the number of the local DNS available for the regional scheduling and the minimum number.
Preferably, the DNS parameters further include priorities of local DNS of each type, and the step of selecting, according to the local DNS selection task, a local DNS available for resolution and available for zone-by-zone scheduling from the DNS library file to be supplemented to the local DNS list, and generating a new DNS configuration file specifically includes:
and executing corresponding local DNS selection tasks one by one according to the priority sequence.
Preferably, when the resolution of the type is available and the number of local DNS available for zone scheduling in the DNS library file is not enough to complete the task of selecting the local DNS of the type, the local DNS available for resolution and available for zone scheduling is continuously selected from the local DNS of the next priority in the DNS library file.
Preferably, the method further comprises:
and sending alarm information when the analysis of the type is available and the number of the local DNS available for the zone scheduling is not enough to complete the task of selecting the local DNS of the type in the DNS library file, wherein the alarm information comprises information of the local DNS selected from other types with the priority lower than that of the type.
According to another aspect of the present invention, there is provided a domain name resolution system configuration updating apparatus, including:
the DNS monitoring module is used for acquiring a DNS monitoring list when the availability risk of the current local DNS configuration file is detected, wherein the DNS monitoring list contains the analysis availability and/or partition area scheduling availability information of all local DNS related to the current DNS configuration file;
and the configuration file updating module is used for selecting a DNS with better availability to replace a local DNS with poorer analysis availability and/or partition area scheduling availability information in the DNS monitoring list to be added into the local DNS list, and generating a new DNS configuration file.
Preferably, the apparatus further comprises:
and the risk detection module is used for judging that the availability risk exists when the first local DNS is unavailable or the proportion of unavailable local DNS in the local DNS list exceeds a first threshold value.
Preferably, the DNS monitoring module includes:
the availability monitoring unit is used for detecting the resolving availability and the partition region scheduling availability of each DNS in the local DNS list;
and the list generating unit is used for generating the DNS monitoring list of the local DNS list according to the detection result.
Preferably, the availability monitoring unit includes:
the analysis task execution subunit is used for analyzing preset monitoring domain names one by using each local DNS in the local DNS list;
an analysis availability analysis unit for judging that the corresponding local DNS analysis is available when the analysis response result can be normally received, and comparing the analysis response result with a preset standard response result,
when the analysis response result cannot be normally received, judging that the corresponding local DNS analysis is unavailable;
and the regional scheduling availability analysis unit is used for judging that the corresponding local DNS regional scheduling is available when the comparison result is consistent, and judging that the corresponding local DNS regional scheduling is unavailable when the comparison result is different.
Preferably, the configuration file updating module includes:
the parameter acquiring unit is used for acquiring DNS parameters, and the DNS parameters comprise the minimum number of each type of local DNS in a local DNS list;
the quantity counting unit is used for counting the quantity of each type of local DNS which is available for analysis and can be scheduled by a partition area in the current local DNS list;
the task generating unit is used for generating a local DNS selection task according to the statistical result and the DNS parameter;
and the file generating unit is used for selecting a local DNS which is available for analysis and can be scheduled in a sub-area mode from a DNS library file according to the local DNS selection task and supplementing the local DNS into the local DNS list to generate a new DNS configuration file.
Preferably, the task generating unit is specifically configured to compare the number of local DNS of each type that are available for resolution and are available for partition scheduling in the current local DNS list with the minimum number of local DNS of each type included in the DNS parameter,
and for the type that the analysis is available and the number of the local DNS available for the regional scheduling does not reach the minimum number, generating a local DNS selection task which needs to supplement the local DNS of the corresponding type with a first difference value, wherein the first difference value is the difference value between the number of the local DNS available for the analysis and the number of the local DNS available for the regional scheduling and the minimum number.
The invention provides a DNS configuration updating method and a device, when the DNS configuration file of a current local domain name resolution system is detected to have availability risk, a DNS monitoring list is obtained, according to the resolution availability and/or sub-region scheduling availability information of all local DNS related to the current DNS configuration file contained in the DNS monitoring list, DNS with better availability is selected to replace local DNS with poorer resolution availability and/or sub-region scheduling availability information in the DNS monitoring list to be added into the local DNS list, and a new DNS configuration file is generated. The DNS configuration updating based on availability is realized, and the problems that the processing efficiency cannot be ensured and the maintenance cost is high when a plurality of local DNS are configured are solved.
Other characteristic features and advantages of the invention will become apparent from the following description of exemplary embodiments, which is to be read in connection with the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. In the drawings, like reference numerals are used to indicate like elements. The drawings in the following description are directed to some, but not all embodiments of the invention. For a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 exemplarily shows a flow of a DNS configuration updating method provided in the second embodiment of the present invention;
FIG. 2 schematically shows a process of obtaining the DNS monitoring list in step 102 in FIG. 1;
fig. 3 exemplarily shows a flow of generating a new DNS profile in step 103 in fig. 1;
fig. 4 exemplarily shows a structure of a DNS configuration updating apparatus according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
When a plurality of local DNS are configured, when a domain name resolution request occurs, the configured plurality of IPs are sequentially used as the IPs of the local DNS for resolution, and if the former local DNS cannot obtain a resolution result, the latter backup local DNS IP is sequentially used until the resolution result is obtained or all the attempts are finished.
The prior art has the following problems:
1. if only a single local DNS is configured, if the local DNS fails and is not replaced in time, the resolution service is unavailable, and the availability of the application service resolved by using the local DNS is influenced;
2. if a plurality of local DNS are configured and the previous local DNS configured is unavailable, the resolution is slow, and the processing efficiency of the application service resolved by using the local DNS is influenced;
3. the prior art would only determine if a local DNS is available and then select in order. Since most application services need to use domain name resolution for sub-regional scheduling at present, the final sub-regional scheduling result is affected by the consistency of the local DNS and the network where the linux server is located, and therefore the consistency of the network position cannot be judged by the current mechanism;
4. when the availability of the local DNS is in problem, the cluster application service composed of the mass servers adopts a manual replacement or manual batch replacement mode at present, so that the labor cost is high and the efficiency is low.
In order to solve the above problem, embodiments of the present invention provide a method and an apparatus for updating DNS configuration, where a plurality of local DNS with optimal performance are selected to implement DNS configuration in the availability analysis of the local DNS, so that the availability of the local DNS is ensured, and the problems that processing efficiency cannot be ensured and maintenance cost is high when a plurality of local DNS are configured are solved.
The first embodiment of the present invention will be described below with reference to the accompanying drawings.
The embodiment of the invention provides a DNS configuration updating method, and the process of completing DNS configuration by using the method comprises the following steps:
1. the condition that the local DNS needs to be reselected is determined.
1) Analyzing application service program logs at intervals of a first time period, judging that a local DNS is possibly required to be selected again when a local DNSIP used by an application server is not a configured first local DNS IP or the analysis of the first local DNS IP fails, and executing next judgment; otherwise, the local DNS is determined to be normal, the processing is not needed, and the judgment and the processing are directly quitted:
A. each resolution of the application records the local DNS IP used by the resolution and the resolution result, and table 1 is an example of the resolution result.
TABLE 1
B. And when the resolution result is NULL, judging that the resolution is failed, and reselecting the local DNS.
C. And when the resolution result exists (the resolution result is not NULL), but the recorded local DNS IP is inconsistent with the configured first local DNS IP, judging that the first DNS resolution fails, and reselecting the local DNS.
Acquiring a first local DNS IP configured by a local DNS: 10.16.40.3
nameserver 10.16.40.3
nameserver 1.1.1.1
nameserver 119.29.29.29
nameserver 114.114.114.114
Obtain DNS IP for local records, for example: t1 shows a score of 1.1.1.2.
Comparing the two IPs, and judging that the first DNS analysis fails when the two IPs are different
2) And detecting the resolution availability and partition region scheduling availability of all local DNS in the local DNS configuration file every other second time period or triggered by other programs. And when the first local DNS or more than half of local DNS is unavailable, judging that the local DNS needs to be reselected. Forming a local DNS monitoring list according to a judgment result of the local DNS list in the current DNS configuration file; and if the judgment result is that the information is available, directly exiting.
A. Analyzing a preset monitoring domain name by using a local DNS in a current local DNS list, and if an analysis response is normally received, judging that the corresponding local DNS analysis is available; otherwise, marking the corresponding local DNS as unavailable for resolution, and executing the next judgment.
For example:
presetting a detection domain name: www.a.com, respectively using a set local DNS to analyze www.a.com, judging whether an analysis result can be obtained, if so, judging that the analysis is available, otherwise, judging that the analysis is unavailable;
B. and acquiring an analysis response result, comparing the response result with a preset standard response result, if the result is consistent, determining that the partition area scheduling is available, otherwise, determining that the partition area scheduling is unavailable.
The monitoring domain name is preset with sub-domain analysis, and different network domains are configured with different analysis response results.
Table 2 is an example of the different region parsing response results.
TABLE 2
www.a.com | Unicom Beijing | 3.3.3.3 |
www.a.com | Telecommunication Shanghai | 3.3.3.4 |
Each linux server locally stores monitoring domain name standard response results, such as:
dev1 www.a.com3.3.3.4
and comparing the formulated local DNS analysis response result with the standard response result, if the local DNS analysis response result is consistent with the standard response result, the partition area scheduling is available, and otherwise, the partition area scheduling is determined to be unavailable.
For example: the analytical response result is 3.3.3.4, which proved to be usable.
C. And forming a local DNS monitoring list, and triggering to reselect the local DNS.
Table 3 is an example format of the local DNS monitoring list.
TABLE 3
DNSIP | Resolving availability | Scheduling availability in partitioned areas |
10.16.40.3 | Is not available | Is not available |
1.1.1.1 | Can be used | Can be used |
3) After the linux server is started, executing operation of selecting a local DNS, adding a selected local DNS program into the automatic starting script list, and directly executing detection in the step 2);
2. and selecting a local DNS.
1) And acquiring a DNS monitoring list, local DNS parameters and local DNS library files.
And A.DNS monitoring list is output by the judgment program.
B. And the local DNS parameters and the local DNS library file are local static configuration files of the linux server, and are synchronously updated with the central server at intervals of specified time.
And setting the minimum number of local DNS of each type and the selection priority of each type of DNS in the DNS configuration file by using the local DNS parameter.
For example:
number of local DNS: x
Number of public DNS: y is
Number of local operator DNS: z
A public DNS; a local operator DNS; the operator DNS of the local area; the operator DNS; defaults.
The local DNS library file is a list of all available local DNS of the local device (the range of the local DNS related to the local DNS is more than or equal to the range of the local DNS related to the current DNS configuration file), and when the linux server synchronizes the library file to the central server, the DNS list which can be served is given according to the network position of the linux server to form the local DNS library file.
For example:
192.168.0.1 public DNS
192.168.0.2 Home operator DNS
192.168.0.3 local area operator DNS
192.168.0.4 this operator DNS
192.168.0.5 default
2) Reading the local DNS information available for analysis/zone scheduling in the DNS monitoring list, judging whether the currently configured local DNS meets the index in the local DNS parameter (namely whether the currently configured available local DNS number reaches the local DNS number of the corresponding type specified in the DNS parameter), and confirming the local DNS selection task
A. And acquiring the unavailable local DNS information for analysis/regional scheduling in the monitoring list, and confirming the number and priority order of each type of local DNS.
B. Judging whether the number of each type of local DNS meets the index in the local DNS parameter, if so, directly quitting according to the index in the local DNS parameter and the configuration sequence of the corresponding type of the local DNS meets the selection priority of each type of DNS;
if the indexes are met, generating a new local DNS configuration file according to the indexes in the local DNS parameters, and if the configuration sequence of the corresponding types of the local DNS does not meet the selection priority of each type of DNS, reordering according to the sequence, generating a new local DNS configuration file, and entering an updating link;
and if the index in the local DNS parameter is not met, generating a local DNS selection task according to the difference value between the index value and the actual value, and reselecting.
Table 5 selects an example of a task for DNS:
TABLE 5
Number of differences | Local DNS type |
1 | Public DNS |
1 | Local operator DNS |
0 | Local area operator DNS |
0 | This operator DNS |
0 | default |
3) Selecting an available local DNS according to the local DNS selection task, and combining and sequencing the existing local DNS and the newly selected local DNS to form new local DNS configuration if a new local DNS can be obtained according to the selection task; if the number of the local DNS is not met, the available local DNS is selected according to the type priority order until the number is met or no selectable DNS exists, the existing local DNS and the newly selected local DNS are combined and sorted to form new local DNS configuration, monitoring alarm information is sent to an administrator, and the content reduction or missing is notified.
A. And acquiring a DNS selection task.
B. According to the sequence of DNS selection tasks, sequentially selecting local DNS IPs to be selected of the same type from local DNS library files, sequentially checking the analysis availability and partition scheduling availability of the local DNS to be selected, if the analysis and partition are available, taking the local DNS to be selected as a newly selected local DNS, and if not, discarding the local DNS until the number of the selected tasks of the type reaches the number of the selected tasks of the DNS, and selecting the next type until all the selected tasks of the type meet the requirement.
C. If the newly selected number is still smaller than the difference number in the DNS selection task after the designated type of local DNS passes the verification, according to the type priority in the local DNS parameter, taking the DNS IP in the lower-level type as the local DNS to be selected, continuously selecting the local DNS lacking the number until the difference number is met, and sending alarm information to an administrator, wherein the information is the IP number and the number of the selected local DNS.
D. And if all local DNS in the local DNS library file is still less than the number of the differential DNS meeting the selected task after being checked, sending alarm information to an administrator, wherein the information is the number and the type of the true DNS.
E. And combining and sequencing the existing local DNS and the newly selected local DNS to form new local DNS configuration.
Table 6 is an example of selecting tasks for the local DNS.
TABLE 6
1 | Public DNS |
1 | Local operator DNS |
And selecting all local DNS IPs with the types of public DNS from the local DNS library file as the local DNS to be selected.
And randomly selecting a local DNS to be selected, checking the availability of analysis and partition area scheduling, if the availability is available, taking the selected local DNS as a new selected local DNS, otherwise, continuously checking until 1 qualified local DNS to be selected is selected.
And if the local DNS to be selected with the type of the public DNS is not qualified, continuously selecting all local DNS IPs with the type of the local operator DNS from the local DNS library file as the local DNS to be selected, continuously checking, if the local DNS IP is qualified, issuing an alarm and taking the local DNS IP to be selected as a new selection, and if the local DNS is not qualified, continuously degrading and selecting.
Continuing to carry out degradation selection until 1 qualified local DNS to be selected is found; and sequentially selecting until default is not qualified, and directly issuing alarm information.
After the number of the local DNS of each type meets the DNS parameter, a new local DNS configuration file is formed
3. Conf file, update linux server local DNS configuration.
4. Detecting an updating effect: and carrying out availability detection on the local DNS list in the newly generated DNS configuration file, finishing the detection if all the local DNS lists are available, and issuing an alarm to an administrator if the local DNS lists fail.
The second embodiment of the present invention will be described below with reference to the drawings.
An embodiment of the present invention provides a DNS configuration updating method, where a process of completing DNS configuration by using the method is shown in fig. 1, and includes:
in this step, a plurality of local DNS including a top local DNS is configured in the local DNS list of the DNS configuration file. When the first local DNS is not available, or the proportion of the local DNS in the local DNS list that is not available exceeds a preset first threshold (e.g., 50%), it is determined that there is an availability risk.
The availability related in the embodiment of the invention comprises two aspects of analysis availability and partition scheduling availability.
102, acquiring a DNS monitoring list when detecting that the current DNS configuration file of the local domain name resolution system has an availability risk;
and the DNS monitoring list contains the resolution availability and/or partition region scheduling availability information of all local DNS related to the current DNS configuration file.
As shown in fig. 2, the steps include:
1. and analyzing preset monitoring domain names one by using each local DNS in the local DNS list.
2. When the analysis response result cannot be normally received, judging that the corresponding local DNS analysis is unavailable;
and when the analysis response result can be normally received, judging that the corresponding local DNS analysis is available, and comparing the analysis response result with a preset standard response result.
3. And when the comparison results are consistent, judging that the corresponding local DNS partition area scheduling is available, and when the comparison results are different, judging that the corresponding local DNS partition area scheduling is unavailable.
103, selecting a DNS with better availability to replace a local DNS with poorer analysis availability and/or partition scheduling availability information in the DNS monitoring list, adding the DNS into a local DNS list, and generating a new DNS configuration file;
as shown in fig. 3, the present step includes:
303, generating a local DNS selection task according to the statistical result and the DNS parameter;
in this step, specifically, the number of the local DNS of each type that is available for resolution and is available for zone scheduling in the current local DNS list is compared with the minimum number of the local DNS of each type included in the DNS parameter,
and for the type that the analysis is available and the number of the local DNS available for the regional scheduling does not reach the minimum number, generating a local DNS selection task which needs to supplement the local DNS of the corresponding type with a first difference value, wherein the first difference value is the difference value between the number of the local DNS available for the analysis and the number of the local DNS available for the regional scheduling and the minimum number.
the DNS parameters also comprise the priority of each type of local DNS, and according to the local DNS selection task, the local DNS which is available for analysis and can be scheduled by regions is selected from a DNS library file and supplemented to the local DNS list, and the step of generating a new DNS configuration file specifically comprises the following steps:
and executing corresponding local DNS selection tasks one by one according to the priority sequence.
And according to the local DNS selection task, selecting local DNS which is available for analysis and is available for regional scheduling from a DNS library file to supplement the local DNS into the local DNS list, and generating a new DNS configuration file. And when the analysis of the type is available and the number of the local DNS available for the zone scheduling is not enough to complete the task of selecting the local DNS of the type, continuously selecting the local DNS available for the analysis and the zone scheduling from the local DNS of the next priority in the DNS library file.
Correspondingly, the local DNS which is not available for resolution and/or is not available for partition area scheduling in the local DNS list is removed from the local DNS list.
Preferably, when the resolution of the type is available and the number of local DNS available for zone scheduling is not enough to complete the task of selecting the local DNS of the type in the DNS library file, an alarm message is sent, where the alarm message includes information of a local DNS selected from other types having a lower priority than the type.
And sending out alarm information when at least one type of local DNS selection task is not completed, wherein the alarm information comprises the information of all local DNS selected from the DNS library file.
The third embodiment of the present invention will be described below with reference to the accompanying drawings.
An embodiment of the present invention provides a device for updating configuration of a domain name resolution system, where the structure of the device is shown in fig. 4, and the device includes:
a DNS monitoring module 401, configured to obtain a DNS monitoring list when it is detected that there is an availability risk in a current local DNS configuration file, where the DNS monitoring list includes resolution availability and/or partition scheduling availability information of all local DNS related to the current DNS configuration file;
a configuration file updating module 402, configured to select a DNS with better availability to replace a local DNS with poor resolution availability and/or poor partition scheduling availability information in the DNS monitoring list, and add the DNS to the local DNS list, so as to generate a new DNS configuration file.
Preferably, the apparatus further comprises:
a risk detection module 403, configured to determine that there is an availability risk when a first local DNS is unavailable or a ratio of unavailable local DNS in the local DNS list exceeds a first threshold.
Preferably, the DNS monitoring module 401 includes:
the availability monitoring unit is used for detecting the resolving availability and the partition region scheduling availability of each DNS in the local DNS list;
and the list generating unit is used for generating the DNS monitoring list of the local DNS list according to the detection result.
Preferably, the usability monitoring unit is configured to include:
the analysis task execution subunit is used for analyzing preset monitoring domain names one by using each local DNS in the local DNS list;
an analysis availability analysis unit for judging that the corresponding local DNS analysis is available when the analysis response result can be normally received, and comparing the analysis response result with a preset standard response result,
when the analysis response result cannot be normally received, judging that the corresponding local DNS analysis is unavailable;
and the regional scheduling availability analysis unit is used for judging that the corresponding local DNS regional scheduling is available when the comparison result is consistent, and judging that the corresponding local DNS regional scheduling is unavailable when the comparison result is different.
Preferably, the configuration file updating module 402 is configured to:
the parameter acquiring unit is used for acquiring DNS parameters, and the DNS parameters comprise the minimum number of each type of local DNS in a local DNS list;
the quantity counting unit is used for counting the quantity of each type of local DNS which is available for analysis and can be scheduled by a partition area in the current local DNS list;
the task generating unit is used for generating a local DNS selection task according to the statistical result and the DNS parameter;
and the file generating unit is used for selecting a local DNS which is available for analysis and can be scheduled in a sub-area mode from a DNS library file according to the local DNS selection task and supplementing the local DNS into the local DNS list to generate a new DNS configuration file.
Preferably, the task generating unit is specifically configured to compare the number of local DNS of each type that are available for resolution and are available for partition scheduling in the current local DNS list with the minimum number of local DNS of each type included in the DNS parameter,
and for the type that the analysis is available and the number of the local DNS available for the regional scheduling does not reach the minimum number, generating a local DNS selection task which needs to supplement the local DNS of the corresponding type with a first difference value, wherein the first difference value is the difference value between the number of the local DNS available for the analysis and the number of the local DNS available for the regional scheduling and the minimum number.
The embodiment of the invention provides a DNS configuration updating method and a device, when the availability risk of a DNS configuration file of a current local domain name resolution system is detected, a DNS monitoring list is obtained, according to the resolution availability and/or sub-region scheduling availability information of all local DNS related to the current DNS configuration file contained in the DNS monitoring list, a DNS with better availability is selected to replace a local DNS with poorer resolution availability and/or sub-region scheduling availability information in the DNS monitoring list to be added into the local DNS list, and a new DNS configuration file is generated. The DNS configuration updating based on availability is realized, and the problems that the processing efficiency cannot be ensured and the maintenance cost is high when a plurality of local DNS are configured are solved. Health evaluation is carried out on the local DNS based on analysis availability and partition scheduling availability, and factors influencing the working efficiency of the local DNS are comprehensively considered, so that the DNS configuration file is more targeted to update. When a new local DNS is selected to be added into the local DNS list, the DNS parameters are taken as the standard and are selected step by step according to the priority, so that the configuration of the local DNS with high priority is guaranteed, and the reliability of the DNS is further improved.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
Finally, it should be noted that: the above examples are only for illustrating the technical solutions of the present invention, and are not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (11)
1. A method for updating configuration of a domain name resolution system is applied to a server and comprises the following steps:
when the first local DNS is unavailable or the proportion of unavailable local DNS in the local DNS list exceeds a first threshold value, judging that the availability risk exists;
when the availability risk of a DNS configuration file of a current local domain name resolution system is detected, a DNS monitoring list is obtained, and the DNS monitoring list contains the resolution availability and/or partition area scheduling availability information of all local DNS related to the current DNS configuration file;
selecting a DNS with better analysis availability and/or partition area scheduling availability to replace a local DNS with poorer analysis availability and/or partition area scheduling availability information in the DNS monitoring list to be added into a local DNS list, and generating a new DNS configuration file;
when detecting that the current local domain name resolution system DNS configuration file has an availability risk, the step of acquiring a DNS monitoring list comprises the following steps:
detecting the resolving availability and the partition region scheduling availability of each DNS in the local DNS list;
generating the DNS monitoring list of the local DNS list according to the detection result;
the regional scheduling availability is an availability result obtained by comparing DNS analysis response results of different network regions with preset standard response results, and the analysis response results comprise the network regions.
2. The method for updating configuration of domain name resolution system according to claim 1, wherein the step of detecting resolution availability and zone partition scheduling availability of each DNS in the local DNS list comprises:
analyzing preset monitoring domain names one by using each local DNS in the local DNS list;
when the analysis response result can be normally received, judging that the corresponding local DNS analysis is available, and comparing the analysis response result with a preset standard response result;
and when the comparison results are consistent, judging that the corresponding local DNS partition area scheduling is available, and when the comparison results are different, judging that the corresponding local DNS partition area scheduling is unavailable.
3. The method for updating configuration of domain name resolution system according to claim 2, wherein the step of selecting the DNS with better resolution availability and/or partition scheduling availability to replace the local DNS with poorer resolution availability and/or partition scheduling availability information in the DNS monitoring list and adding the DNS to the local DNS list, and the step of generating the new DNS configuration file comprises:
acquiring DNS parameters which comprise the minimum number of each type of local DNS in a local DNS list;
counting the number of the local DNS of each type which can be used for analysis and can be used for regional scheduling in the current local DNS list;
generating a local DNS selection task according to the statistical result and the DNS parameter;
and according to the local DNS selection task, selecting local DNS which is available for analysis and is available for regional scheduling from a DNS library file to supplement the local DNS into the local DNS list, and generating a new DNS configuration file.
4. The domain name resolution system configuration updating method according to claim 3, wherein generating a local DNS selection task according to the statistical result and the DNS parameter comprises:
comparing the number of the local DNS types which can be used for analysis and can be scheduled by the sub-areas in the current local DNS list with the minimum number of the local DNS types contained in the DNS parameter;
and for the type that the analysis is available and the number of the local DNS available for the regional scheduling does not reach the minimum number, generating a local DNS selection task which needs to supplement the local DNS of the corresponding type with a first difference value, wherein the first difference value is the difference value between the number of the local DNS available for the analysis and the number of the local DNS available for the regional scheduling and the minimum number.
5. The method according to claim 4, wherein the DNS parameters further include priorities of local DNS of each type, and according to the local DNS selection task, a local DNS that is available for resolution and is available for zone-by-zone scheduling is selected from a DNS library file and supplemented to the local DNS list, and the step of generating a new DNS configuration file specifically includes:
and executing corresponding local DNS selection tasks one by one according to the priority sequence.
6. The method according to claim 5, wherein when the number of local DNS available for the type of resolution and available for zone-by-zone scheduling in the DNS library file is not enough to complete the task of selecting the local DNS of the type, the local DNS available for resolution and available for zone-by-zone scheduling is continuously selected from the local DNS of the next priority in the DNS library file.
7. The domain name resolution system configuration updating method according to claim 5, further comprising:
and sending alarm information when the analysis of the type is available and the number of the local DNS available for the zone scheduling is not enough to complete the task of selecting the local DNS of the type in the DNS library file, wherein the alarm information comprises information of the local DNS selected from other types with the priority lower than that of the type.
8. A domain name resolution system configuration updating device is characterized in that the domain name resolution system configuration updating device is applied to a server and comprises:
the risk detection module is used for judging that the availability risk exists when the first local DNS is unavailable or the proportion of unavailable local DNS in the local DNS list exceeds a first threshold;
the DNS monitoring module is used for acquiring a DNS monitoring list when the availability risk of the current local DNS configuration file is detected, wherein the DNS monitoring list contains the analysis availability and/or partition area scheduling availability information of all local DNS related to the current DNS configuration file;
a configuration file updating module, configured to select a DNS with better resolution availability and/or partition scheduling availability to replace a local DNS with poorer resolution availability and/or partition scheduling availability information in the DNS monitoring list, and add the DNS to the local DNS list, so as to generate a new DNS configuration file;
the DNS monitoring module comprises:
the availability monitoring unit is used for detecting the resolving availability and the partition region scheduling availability of each DNS in the local DNS list;
the list generating unit is used for generating the DNS monitoring list of the local DNS list according to the detection result;
the regional scheduling availability is an availability result obtained by comparing DNS analysis response results of different network regions with preset standard response results, and the analysis response results comprise the network regions.
9. The domain name resolution system configuration updating apparatus according to claim 8, wherein the availability monitoring unit comprises:
the analysis task execution subunit is used for analyzing preset monitoring domain names one by using each local DNS in the local DNS list;
an analysis availability analysis unit for judging that the corresponding local DNS analysis is available when the analysis response result can be normally received, and comparing the analysis response result with a preset standard response result,
when the analysis response result cannot be normally received, judging that the corresponding local DNS analysis is unavailable;
and the regional scheduling availability analysis unit is used for judging that the corresponding local DNS regional scheduling is available when the comparison result is consistent, and judging that the corresponding local DNS regional scheduling is unavailable when the comparison result is different.
10. The apparatus of claim 9, wherein the profile update module comprises:
the parameter acquiring unit is used for acquiring DNS parameters, and the DNS parameters comprise the minimum number of each type of local DNS in a local DNS list;
the quantity counting unit is used for counting the quantity of each type of local DNS which is available for analysis and can be scheduled by a partition area in the current local DNS list;
the task generating unit is used for generating a local DNS selection task according to the statistical result and the DNS parameter;
and the file generating unit is used for selecting a local DNS which is available for analysis and can be scheduled in a sub-area mode from a DNS library file according to the local DNS selection task and supplementing the local DNS into the local DNS list to generate a new DNS configuration file.
11. The domain name resolution system configuration updating apparatus according to claim 10,
the task generating unit is specifically configured to compare the number of local DNS of each type that are available for resolution and are available for partition scheduling in the current local DNS list with the minimum number of local DNS of each type included in the DNS parameter,
and for the type that the analysis is available and the number of the local DNS available for the regional scheduling does not reach the minimum number, generating a local DNS selection task which needs to supplement the local DNS of the corresponding type with a first difference value, wherein the first difference value is the difference value between the number of the local DNS available for the analysis and the number of the local DNS available for the regional scheduling and the minimum number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711002898.6A CN109698764B (en) | 2017-10-24 | 2017-10-24 | Domain name resolution system configuration updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711002898.6A CN109698764B (en) | 2017-10-24 | 2017-10-24 | Domain name resolution system configuration updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109698764A CN109698764A (en) | 2019-04-30 |
CN109698764B true CN109698764B (en) | 2020-09-29 |
Family
ID=66228129
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711002898.6A Active CN109698764B (en) | 2017-10-24 | 2017-10-24 | Domain name resolution system configuration updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109698764B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114448787A (en) * | 2021-12-27 | 2022-05-06 | 天翼云科技有限公司 | CDN system channel configuration method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101764747A (en) * | 2009-12-24 | 2010-06-30 | 北京世纪互联宽带数据中心有限公司 | Intelligent dispatching method, device and system of content delivery network flow |
CN106713020A (en) * | 2016-12-09 | 2017-05-24 | 互联网域名系统北京市工程研究中心有限公司 | Method for realizing updating and synchronization of domain name system (DNS) server cluster configuration |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9049247B2 (en) * | 2010-04-01 | 2015-06-02 | Cloudfare, Inc. | Internet-based proxy service for responding to server offline errors |
CN102035696B (en) * | 2010-12-22 | 2012-10-03 | 中国工商银行股份有限公司 | Website access performance monitoring method, device and system |
CN102572014B (en) * | 2012-03-07 | 2015-12-02 | 华为终端有限公司 | Message treatment method, device and system |
CN103561120B (en) * | 2013-10-08 | 2017-06-06 | 北京奇虎科技有限公司 | Detect method, the processing method of device and suspicious DNS, the system of suspicious DNS |
CN104468860B (en) * | 2014-12-04 | 2018-06-26 | 北京奇虎科技有限公司 | The recognition methods of domain name resolution server danger and device |
CN104883282A (en) * | 2015-06-19 | 2015-09-02 | 中国互联网络信息中心 | Method and system for monitoring DNS server of terminal |
-
2017
- 2017-10-24 CN CN201711002898.6A patent/CN109698764B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101764747A (en) * | 2009-12-24 | 2010-06-30 | 北京世纪互联宽带数据中心有限公司 | Intelligent dispatching method, device and system of content delivery network flow |
CN106713020A (en) * | 2016-12-09 | 2017-05-24 | 互联网域名系统北京市工程研究中心有限公司 | Method for realizing updating and synchronization of domain name system (DNS) server cluster configuration |
Also Published As
Publication number | Publication date |
---|---|
CN109698764A (en) | 2019-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108268372B (en) | Mock test processing method, device, storage medium and computer equipment | |
CN107872402B (en) | Global flow scheduling method and device and electronic equipment | |
CN109921925B (en) | Dial testing method and device | |
US20070130330A1 (en) | System for inventing computer systems and alerting users of faults to systems for monitoring | |
CN108737473A (en) | A kind of data processing method, apparatus and system | |
CN113810216B (en) | Fault switching method and device for cluster and electronic equipment | |
CN114884838A (en) | Monitoring method of Kubernetes component and server | |
CN109040178B (en) | Configuration information sending method and device | |
EP3291592A1 (en) | Monitoring management method and apparatus | |
CN112035579B (en) | Graph management, data storage and data query methods, devices and storage medium | |
CN109981795B (en) | Resource request scheduling method and device | |
CN112463572B (en) | Cross-border multi-service dial testing software testing system and method thereof | |
CN114185763A (en) | Dynamic allocation method, device, storage medium and electronic equipment | |
CN106383668A (en) | Information storage method, storage management device and client | |
CN109698764B (en) | Domain name resolution system configuration updating method and device | |
CN112087336B (en) | Deployment and management method and device of virtual IP service system and electronic equipment | |
CN112671813A (en) | Server determination method, device, equipment and storage medium | |
CN113765690B (en) | Cluster switching method, system, device, terminal, server and storage medium | |
CN108347465B (en) | Method and device for selecting network data center | |
CN105530323A (en) | File upgrading method, related equipment and system | |
CN119065803A (en) | Scheduled task scheduling method and system | |
CN115361379B (en) | Video uploading server allocation method and device | |
CN109347766A (en) | Method and device for resource scheduling | |
CN107919980B (en) | Evaluation method and device for clustered system | |
CN114422576A (en) | Session cleaning method and device, computer equipment and readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |