To understand network flow, it is important to understand the flow of HTTP communication. HTTP communication belongs to the application layer. Similarly, to understand HTTP communication deeply, you need to learn low-level layers like TCP and UDP.
Rules are needed for data to pass safely from client to server.
So set the IP address on the computer to communicate. IP transfer data by what called packets.
IP Packet includes departure IP and destination IP information, for data transmission.
In order to deliver the packet to the destination IP, each node transfer data.
When the server receives data, it responds. The server also uses the IP packet to respond.
unconnected (비연결성)
Packet is transmitted even if there is no IP destination or service is unavailable.
(This is because the client cannot know the state of the server.)
unreliability (비신뢰성)
If there is a problem in the Node during data transmission. Client can't recognize the problem.
Network protocol layer can be divided into OSI 7 layer and TCP/IP 4 layer.
TCP protocol can compensate for the limitations of the IP protocol.
TCP/IP Layer 4 was developed before OSI Layer 7. TCP/IP Layer 4 does not exactly match OSI Layer 7
When an HTTP message is generated, it is passed through the Socket library.
Sockets are designed to allow programs to send and receive data on the network.
TCP segment includes departure PORT, destination PORT, transmission control, sequence, verification information, etc. This can supplement the departure IP and destination IP information of the IP packet.
Client sends a SYN Packet request to the server.
The server receives the SYN request, response to the client with an ACK and a SYN, after client request back with an ACK.
When the client request ACK to the server, Connection is established and the request can be sent.
If the server is off, when a client sends a SYN, the server does not respond.
In TCP, when a client request to server, the server returns a response. It can compensate for unconnected, which is a limitation of IP Packet.
If the packet does not arrive in order, it can request another packet based on the information in the TCP segment. It can compensate for unreliability, which is a limitation of IP Packet.
UDP is a simple protocol with only PORT and checksum field information added to the IP protocol.
Compared to TCP, it's not easy to reliable. but UDP is faster than TCP. because it does not use 3 way handshake.
(No data delivery guarantee, no order guarantee. but it's fast.)
Used for services where speed is more important than reliability.
Livestreaming