2018-07-30

Source: Internet
Author: User
Tags domain name server domain server

Build-web-application-with-golang

1. How the Web Works

2. How DNS Works

(1) See the hosts first

(2) Look at the local DNS parser cache, whether there is this URL mapping relationship

(3) First find the local DNS server, when the server receives the query, if the domain name to be queried, included in the Local Configuration zone resource, then return the parse result to the client, complete the domain name resolution, this resolution is authoritative.

If the domain name that you are querying is not resolved by the local DNS server zone, but the server has cached this URL mapping relationship, call this IP address mapping to complete the domain name resolution, which is not authoritative.

(4) If the local DNS server local zone file and cache resolution are invalidated, the local DNS server based on the settings (whether set forwarders) to query, if not in the forwarding mode, local DNS will send the request to "root DNS Server", "Root DNS Server" received the request will determine the domain name (. COM) who is authorized to administer and will return an IP that is responsible for the top-level domain name server. After the local DNS server receives the IP information, it will contact the server responsible for the. com domain. After the server that is responsible for the. com domain receives the request, if it cannot resolve itself, it will find a management. com domain's next-level DNS server address (qq.com) to the local DNS server. When the local DNS server receives this address, it will find the qq.com domain server, repeat the above action, query until the www.qq.com host is found.

If the use of the forwarding mode, this DNS server will forward the request to the first level of DNS server, by the top level of the server to resolve, the previous level of the server if it can not resolve, or find root DNS or transfer requests to the upper ancestor, in this cycle. Whether the local DNS server uses either forwarding or root hints, the result is returned to the local DNS server, which is then returned to the client.

2. Rendering HTML files

This is a function of the browser, the first request URL, the server side returned is an HTML page, and then the browser began rendering HTML: When parsing the HTML DOM inside the image connection, CSS script and JS script link, the browser will automatically initiate a request for static resources HTTP request, Get the corresponding static resources, then the browser will be rendered, and eventually all the resources to integrate, rendering, the full display in front of us on the screen.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.