problem: Enter the URL in the browser, press the ENTER key, the page appears. What process has gone through?
In fact, this problem is very able to assess the comprehensive quality of respondents, but also very difficult to answer the hardware aspects of software aspects of the network
Peripherals communicate with the CPU
The keyboard communicates with the CPU through the peripheral interface circuit, and the peripheral interface circuit initiates the interrupt request to the CPU because the interrupt request is a shielded interrupt, so if the CPU is handling other task priority higher, it will block the interrupt.
The browser resolves the IP address of the access URI
First query the local HOSTS file, if the corresponding IP found, the launch of the HTTP request.
If no queries are made, the DNS server that accesses the native settings with the UDP protocol, if the DNS server caches this record, returns directly. If the network is blocked, there may be a packet loss, but because of the UDP protocol used, it will not be retransmission. You may want to restart the query. If the DNS server does not have this record, forward it to its parent DNS server until the root DNS server is accessed, then the first level returns, and the DNS record is cached to avoid querying to the parent DNS server again.
After querying to IP, initiate HTTP request
Because the HTTP protocol is the application layer protocol, it still relies on the TCP protocol for transmission, and the TCP protocol is dependent on the IP protocol, which is run on the link layer. It is encapsulated as a packet transmitted over the link layer.
Communication between local and gateway communication
LAN communication protocol is generally Ethernet protocol, so first carrier monitoring. Scramble for bandwidth usage. If the listener finds that communication is in progress, then the timing of the re-monitoring is chosen according to the policy. Communicate with the gateway until the line is no longer busy.
Gateway or router transfer
Because the router is a three-tier device, it is used to communicate with IP. First, the route selection, according to the routing algorithm for routing, forwarding to different ports.
The last tier of routers is routed to the server
The server firewall checks the package and forwards the server software that listens to the port based on the port in the package if the packet passes through the firewall to the inbound policy. Otherwise, the package is discarded.
Load Balancing
If there is a load balancing server, it is forwarded to intranet application server through load Balancing server, depending on the website architecture
Server Processing HTTP Requests
If you are requesting a static resource, such as an HTML file or CSS, JS, or picture file. is returned directly. If it is PHP and other dynamic files, then to the PHP module or PHP CGI processing, processing and then to the server software returned to the client
Client
The browser handles the returned data, rendering the HTML file if Content-type is HTML. If Content-type is JSON data, then call the callback function to process
The author just shallow to answer, if want more detailed, more in-depth answer, in fact, every step can be said for a long time. That's a really hard question.