1. Seven-layer network model The http protocol runs at the application layer 2. TCP-UDP 1. The difference between TCP and UDP protocols 2. What happens during an HTTP request? 3. How does the TCP protocol ensure reliable transmission? 4. Differences between HTTP and HTTPS 5. TCP three-way handshake and four-way wave, 6. Common status codes. 2.1 TCP-UDP Differences
There is no need to establish a connection before transmitting data, and data can be sent directly to the target machine. After receiving the UDP message, the remote host does not need to give any confirmation. UDP messages may be lost, but UDP works very efficiently in scenarios such as video streaming and live streaming (instant communication, no concern for data loss, and security) such as video and live streaming.
Connection-oriented service. Connect first and then transmit data. After the data transmission is completed, the connection must be released. TCP does not provide broadcast or multicast services. Since TCP needs to provide reliable, connection-oriented transport services (TCP's reliability is reflected in the three-way handshake to establish a connection before transmitting data, and during data transmission, there are confirmation, window, retransmission, and congestion control mechanisms. After the data is transmitted, the connection will be disconnected to save system resources), this inevitably adds a lot of overhead, such as confirmation, flow control, timer, and connection management. This not only makes the header of the protocol data unit much larger, but also takes up a lot of processor resources. TCP is generally used in scenarios such as file transfer, sending and receiving emails, and remote login. (Data transmission where information security is relatively important). 2.2 What happens in an HTTP request? 1. The user enters the URL in the browser 2. The browser gets the URL to request the IP 3. Send a TCP connection 3-way handshake to the target IP 4. The server parses the request and returns the processed HTML page (string) 5. The browser parses and renders the screen according to the rules 6. Connection Ended *** point: None Second point: The order of the browser parsing the URL entered by the user is: First check whether there is a corresponding IP address locally, and return it if found. If not found, request the next-level DNS server until it finds the root node. Browser cache --> System cache --> Router cache --> ISP DNS cache --> Recursive search from root domain name servers If none is found, an error is returned The third point: three-way handshake First handshake: The sender first sends a data packet with a SYN (synchronize) flag to the server, and waits for a response within a certain period of time. Second handshake: After the server receives the SYN packet, it returns a packet with a SYN/ACK (acknowledgement charactor) confirmation character flag to indicate confirmation of receipt of the message. The third handshake: After the receiver receives the confirmation message from the server, it sends a data packet with an ACK mark to the receiver, indicating that the handshake is successful Note: There is a waiting time in the above process. If the server or client does not respond within the waiting time, the request is considered failed and the request is made again. The reason why the server did not respond may be that the stack is full.
The role of the three-way handshake:
Step 4: ngimx + uwsgi (Django) as a column (unfinished) 1. Nginx part (unfinished) 2.Django part:
Step 5: Browser Rendering The browser gets the result and renders it according to HTML CSS JS Step 6: Wave four times to disconnect
|
<<: A brief discussion on IPv6 intrusion and defense
>>: Interesting explanation of TCP three-way handshake and four-way wave
[51CTO.com original article] Juniper Networks Glo...
Hostodo has released several promotional packages...
After the Nanjing Station in August and the Beiji...
Three years ago, 5G ushered in the first year of ...
10gbiz has launched a promotion this month, offer...
Recently, the three major operators have actively...
In the era of popular Internet, many families hav...
September 16, 2019 WiFi Alliance announces WiFi6 ...
OneTechCloud (Yikeyun) launched this year's s...
Machine learning solutions will help different ra...
Automakers are already taking the lead in incorpo...
On September 6, at the "HUAWEI CONNECT 2017&...
The Dragon Boat Festival holiday has begun. Durin...
BuyVM's Las Vegas data center VPS and storage...
In the last article, I shared the simple test inf...