If we want to access the content on another machine while surfing the Internet , Usually you only need to enter a list of addresses directly , for example :www.upyun.com, You can accurately access the website you want to visit . But in fact, this is just a character form of network logo that is convenient for us to remember , What really allows our machine to communicate with another machine is IP Address . It's just IP The address is very troublesome both in input and memory , Therefore, the domain name system was born . So how does the domain name connect to that server IP Well ? This is similar to the domain name system we are going to talk about today DNS It's about .

DNS What is it? ?

Because a meaningful name can represent the account number of the host 、 Nature of work 、 Region and organization , So as to facilitate memory and use . So users will prefer to identify the host by name ,DNS It is developed for this need .DNS On behalf of the domain name system (Domain Name System). The system will put the domain name (example.com) Translate into actual IP Address .

DNS The logical structure of is a hierarchical domain name tree , from Internet Network Information Center (InterNIC) Manage the root of the domain name tree , be called “ Root region ”, Period for root field “.” Express , But this is usually omitted . It should be noted that there are only 13 platform IPv4 Root domain server .

Below the root domain is the top-level domain (TLD), It is divided into national top-level domains (ccTLD) And general top-level domain (gTLD). The country top-level domain uses the country and region abbreviation code , for example “cn” On behalf of China . Common top-level domains are common com/net/org etc. .

Below the top-level domain is the secondary domain , This is the only name officially registered to organizations and individuals , for example www.upyun.com Medium upyun It's the domain name registered in the cloud . Under the secondary domain , Organizations can also be divided into sub domains , Used by all branches . But the standard stipulates , The length of a domain name usually does not exceed 63 Characters , Not more than 255 Characters .

Yes, of course ,DNS It can not only point to IP Address , It also supports other forms of records . common DNS The record forms are :

  • A Record : Domain IPv4 A record of the address .

  • AAAA Record : Domain IPv6 A record of the address .

  • CNAME Record : Alias , Forward one domain or subdomain to another , Does not provide IP Address .

  • MX Record : Direct mail to e-mail server .

  • TXT Record : Enables administrators to store text notes in records .

  • NS Record : Storage DNS The name of the entry server .

A distinctive domain name , It allows users to brand the company “ It's deep in my mind ”. Although the domain name may be eternal , But record the address pointed to and used DNS The server will change frequently because of the demand . Sometimes we will encounter changes DNS After recording , The address actually accessed is not updated , This involves DNS spread .

What is? DNS spread ?

Generally, we record the domain name resolution of the website or DNS After the service provider changes , It will take some time for all servers in the world to adopt new record values , This period of time may be a few hours , It could be a few days , This transitional stage is DNS spread .

DNS Cause of transmission DNS The load of the server varies . The older the server, the longer it takes to update , So during the transition , It will appear that other providers have used the new address , But the service providers of some old servers may not have updated . This is because continuous query of new addresses will lead to excessive load , therefore DNS The server will not temporarily store the update information in the cache , Only when all servers have updated this cache , Will synchronize the new address in all places .

In addition to server load , There are also some factors that can affect DNS spread .

influence DNS Factors of communication

DNS Areas and TTL value

DNS Divided into many different areas , yes DNS Part of the namespace , Managed by a specific organization or administrator . Area files are stored in DNS Plain text files in the server , It contains the actual representation of the region , And all records of each domain in the region .

We can create a zone file for each domain name DNS Set up TTL.TTL representative “ Time to live ”, Server cache DNS Time period of information . It can define and set temporary cache 、 How long to store and when to update .TTL Value for DNS Communication is crucial , If TTL The value is 24 Hours , After the change 1 Genius can work . Of course , In order for the update to take effect faster , We can adjust TTL value . however , This adjustment must be made before the update , Because adjustment TTL Also belong to DNS spread , It will also take some time to take effect . In addition, be careful not to DNS TTL Set to 0, Because there is no number defined in the standard 0, It can lead to DNS Information is ignored or rejected .

If you use cloud resolution to modify the resolution record of the domain name , The final effective time depends on the local operators DNS Server cache refresh time , In general, it is equivalent to setting the resolution TTL Time . For example, in parsing settings TTL The value is 10 minute , After modifying the resolution, it will be in 10 Take effect globally within minutes .

If it is a modification DNS The server , Then the effective time depends on the local DNS Cached domain name DNS The name of the server TTL Time , for example “.com” The top-level domain is 48 Hours ,“.cn” yes 24 Hours . Because different top-level domains DNS Server's TTL Time is different , So in theory, change the domain name DNS Server global resolution takes the longest time to take effect 48 Hours .

ISP(Internet Service provider )

Another effect DNS The factor of propagation duration is the use Internet Service provider (ISP).ISP Will DNS Data is cached locally , Each request retrieves data in the cache instead of DNS The server . The advantage of this approach is faster response , At the same time, it also reduces the generation of data traffic . however , This may be good for DNS Communication has an impact . Besides , some ISP Will directly ignore TTL Set up , And the cache record is updated every two to three days .

Location of the server

The location of the server will also be right DNS Communication has an impact . The recorded changes can be made in the nearest DNS The server takes effect , But it usually takes longer to get to servers on the other side of the world . Because different servers need to notify each other one by one of the changes in records . And as mentioned in Article 2 , Because some servers may only update within a specific time interval , As a result, all updates will take a long time .

DNS The time of transmission

That's actually DNS How long does it take to spread ? The local server is usually updated in a few minutes or hours . however , Let all servers around the world know about these changes , And it may take quite a long time to make it effective , Usually 1 to 2 It is possible to take effect within days . And according to the settings of the service provider , It may also appear 72 It will be updated after hours . therefore , When you need to change or switch records , Arrange ahead of time DNS Communication is very important .

In some cases ,DNS Communication will have an impact on website access , There is no way to avoid it completely , However, there are some ways to minimize the duration . For example, changing DNS Before server , We can modify the TTL value , Make it smaller . etc. TTL After value update , Revise DNS The server . But even if it hasn't been spread , It also does not affect the modification of domain name resolution records . Even if DNS The server is still old , But the parsing record will be updated in real time , The website content will also be up-to-date .

Yes, of course , If the parsing record is modified , After that TTL Time discovery or access to old records , You can try clearing the local DNS cache . Or locally changed to public DNS (114.114.114.114/8.8.8.8) Try again later .

DNS Dissemination inspection

If there is no tool to determine the website DNS Whether the communication has been completed . Several local DNS Conduct DNS Spread the method of inspection to confirm . for example ,Windows、macOS and Linux Installed by default nslookup, It can display the current DNS The resolution status of the server .Dig Tools are also a good choice .

In addition to local queries , Other external DNS Check by selecting a random server and querying there DNS Information to test . Because servers are distributed all over the world , So we can't 100% determine DNS Dissemination has been completed everywhere , But at least we can confirm the general spread . for example , Use Myssl Of DNS Detection tools (https://myssl.com/dns_check.html#dns_check), It can quickly find out the speed of domain name resolution in different regions and Networks , And the domain name DNS Information .

Read here , Are you right DNS There is an answer to the question that the amendment does not take effect ? Conduct DNS Server or domain name system related changes , Still give priority to DNS spread . Though it can be done by TTL Reduce propagation time , But due to some unstable factors , It will still take some time for every server in the world to change to the latest state .

Recommended reading

What is walking index ?

About GIN Routing tree

DNS series ( One ): Why is it updated DNS Record not valid ? More articles about

  1. < turn > Detailed explanation DNS Common records of ( Next ):DNS Series three

    In the last blog, we introduced DNS There are several indispensable records in the server , Include A Record ,NS Record and SOA Record . In this blog, we will continue to introduce DNS Other common records of , I hope to know more about DNS Help . Four  MX Record MX remember ...

  2. < turn > Detailed explanation DNS Common records of ( On ):DNS The second series

    Detailed explanation DNS Common records of ( On ) In the last post , We introduced DNS The architecture of the server , We learned that if we want to register a domain name , Then the domain name we apply for must be assigned by the top-level domain name server or its subordinate domain name server , Delegate the power of analysis to ...

  3. DNS Safety discussion 、 domain name A Record (ANAME),MX Record ,CNAME Record

    Related learning materials http://baike.baidu.com/link?url=77B3BYIuVsB3MpK1nOQXI-JbS-AP5MvREzSnnedU7F9_G8l_Kvbkt_O2gKqFw ...

  4. < turn > reveal DNS Background file :DNS Series five

    reveal DNS Background file In the previous blog, we introduced DNS Architecture of , Common records , The configuration of secondary server is also introduced , Let's introduce DNS Several files behind the server . Actually DNS The work of the server depends entirely on these files , I understand DNS Of ...

  5. < turn > To configure DNS Secondary server :DNS Series 4

    To configure DNS Secondary server   In the previous post , We introduced how in DNS Create common DNS Record , In this article, we'll show you how to configure DNS Secondary server for , At the same time, we will also introduce the stub area similar to the auxiliary area . DNS Auxiliary service ...

  6. < turn > Talking about DNS Architecture :DNS One of series

    Talking about DNS Architecture DNS It is one of the most indispensable servers on the Internet , We need to surf the Internet every day DNS With the help of the .DNS The server can resolve the domain name for us , Locate the email server , Find the domain controller in the domain …… Facing such an important service ...

  7. DNS Safety discussion 、 domain name A Record (ANAME),MX Record ,CNAME Record ( turn )

    http://www.cnblogs.com/LittleHann/p/3828927.html Related learning materials http://baike.baidu.com/link?url=77B3BYIuVsB3 ...

  8. DNS Safety discussion 、 domain name A Record (ANAME),MX Record ,CNAME Record project

    The first thing to do is to configure the domain name MX  Record it : First add a A Record : mail.abc.com  Point to Your server IP! Then add the domain name MX  Record , Point to mail.abc.com A  Record (  Domain name MX  The recorded value is ...

  9. Centos7.2 Next DNS+NamedManager A complete record of highly available deployment scenarios

    Centos7.2 Next DNS+NamedManager A complete record of highly available deployment scenarios I said before NamedManager Stand alone configuration , Say below DNS+NamedManager Dual high availability configuration scheme : 1) Machine ring ...

  10. utilize Dnspod api Batch update add DNS analysis 【python Script 】 - Push cool

    utilize Dnspod api Batch update add DNS analysis [python Script ] - Push cool undefined

Random recommendation

  1. Free Edition tomcat Registered as windows System service method

    If one server needs to deploy two applications , And they are not affected , Only two ports can be used tomcat Manage separately Make complaints about it here tomcat, Stop the service for Mao and stop all applications , Update one of them , It's about to stop everything , Then update ...

  2. Explain in detail nodejs Use in socket The way of private chat

    Explain in detail nodejs Use in socket The way of private chat Last time I used nodejs+express+socketio+mysql Build a chat room , This is basically from socket.io The official website of a tutorial copy learning , however ...

  3. OCJP(1Z0-851) Analysis of simulated questions ( 8、 ... and )over

    Exam : 1Z0-851 Java Standard Edition 6 Programmer Certified Professional Exam The following analysis is all my own analysis or reference online , There must be ...

  4. In depth understanding of js——prototype Prototype

    Before ( In depth understanding of js-- Everything is an object ) Said , Function is also an object . It is also a collection of attributes , You can also customize the properties of functions . and JavaScript By default, the function is given an attribute --prototype( Prototype ). Every function has a ...

  5. ServiceStack Concept

    Catalog ServiceStack Concept ServiceStack Web Service Create and call simple Columns ServiceStack ServiceStack yes .Net and Mono Open source framework of , relative WCF ...

  6. c# Multithreading creation --- Simple

    Thread t = new Thread(new ParameterizedThreadStart(UploadCard)); t.IsBackground = false;// Background thread   Foreground Threads ...

  7. Brush together LeetCode5-Longest Palindromic Substring

    Find the algorithm you used to master , All forgotten , Ah ah ----------------------------------------------------------------------------- ...

  8. 201521123107 《Java Programming 》 The first 5 Weekly learning summary

    The first 5 Weekly assignment - Inherit . polymorphic . Abstract classes and interfaces 1. This week's learning summary 2. Written work 1. Code reading :Child Code inside the package 1.1 com.parent In bag Child.java Can the file be compiled ? Which sentence will go wrong ? Trial modification ...

  9. readfile & file_get_contents similarities and differences

    Make a note of : application memcache when , Prepare to cache the whole file into memory , Something strange happened , Because it was first used readfile To read the file , As a result, this function returns a byte number , Instead of a string , So the file can no longer be output , Finally using ...

  10. java And Pattern Class explanation

    stay JDK 1.4 in ,Java Added support for regular expressions . java The tools related to regularization are mainly java.util.regex In bag : There are two main classes in this package :Pattern.Matcher. Pattern  Statement : ...