1. What is HTTP
HTTP (hypertext Transfer Protocol, Hypertext Transfer Protocol) is the protocol specification used by the Web to complete the rules conventions for data transfer from client to server. The web is built to communicate on HTTP.
2. Network-based TCP/IP
The internet usually operates under the TCP/IP protocol family, and HTTP is a subset of it.
Hierarchical management of 2.1TCP/IP
The most important of the TCP/IP protocol family is hierarchical management, divided into the following four layers: application layer, Transport layer, network layer and link layer.
Application Layer : The communication activity is determined when the application service is provided to the user, such as FTP, DNS, HTTP protocol are all in this layer.
Transport Layer : Provides data transfer between two machines that are connected to the network. The transport layer has two different properties of the Protocol, TCP (transmission Control Protocol, Transmission Protocol) and UDP (, user data Protocol, Subscriber Datagram Protocol).
Network layer : Handles packets flowing over the network. A packet is the smallest unit of network transmission. This layer specifies the path through which to reach the other computer and pass the packets to each other.
link Layer : The hardware part that is used to process the connected network. This includes controlling the operating system, device drivers for hardware, NICs, and fiber optics.
3. Protocols that are closely related to http: IP, TCP, DNS
3.1 IP protocol for the transmission
The IP protocol is at the network layer. Note to differentiate between "IP" and "IP address." The purpose of the IP protocol is to send various packets to each other. And to make sure that it can be delivered to each other, the two most important conditions are IP address and MAC address.
3.2 Securing a reliable TCP protocol
The TCP protocol is in the transport layer and provides a reliable byte stream service by hierarchy.
A byte stream is a packet that divides big data into segments. Reliable means that TCP can accurately confirm that the other party is successfully accepted.
To ensure that the packet arrives at the destination, the sending side needs to have a three handshake with the receiving end over the TCP protocol:
3.3 DNS service for Domain name resolution
Hierarchically, DNS resides in the application layer. It provides parsing services between IP and domain names.
Because the pure number of IP addresses is too difficult for human to remember, but the computer is more suitable to remember the pure digital IP address, so the DNS service needs to resolve the domain name to the corresponding IP address for the computer to identify.
Summary: When a URL is entered in the browser, the DNS service will first convert the domain name to the corresponding IP address, after which the client initiates an HTTP request to the server of that IP address, and the request is segmented into a packet segment reliably transmitted to the server (TCP three handshake). The IP protocol is responsible for searching the IP address while the server receives the request, it will return the requested data to the client (the data callback also refer to the TCP/IP protocol), then the user can see the Web page on the browser.
Introduction to the "Learning Notes" HTTP protocol