当前位置:网站首页>Network planning common interview knowledge (I)

Network planning common interview knowledge (I)

2022-06-13 06:43:00 Night ask

From today on, I will probably begin to prepare for the study of spring moves , Will make the marking sequence , To record some key knowledge

Frequently asked questions

TCP Three handshakes 、 Four waves

1. Three handshakes

2. Four waves

 Four waves

Why is there TIME_WAIT state
  1. Make sure there is enough time for the other party to receive ACK package
  2. Avoid confusing old and new connections
Why do you need four handshakes to disconnect

Because full duplex , Both sender and receiver need FIN Message and ACK message

There are a lot of servers CLOSE_WAIT The reason for the State

The other side closes socket Connect , We are busy reading or writing , Not closing the connection in time

  1. Check code , Especially the code to release resources
  2. Check the configuration , In particular, thread configuration for processing requests

3.TCP And UDP The difference between

  • Connection oriented vs There is no connection
  • reliability vs Unreliability
  • Orderliness vs Disorder
  • Slow speed vs Fast
  • Magnitude 20 byte vs8zijie

4. tcp The sliding window

RTT and RTO
  1. RTT: Send a packet to the server , The server returns a ACK, The client receives the corresponding ACK, The time it takes
  2. RTO: Retransmission interval .TCP After sending a data , Will start a retransmission timer , If you receive a reply, it will reset RTO, Otherwise, the data will be retransmitted
TCP Use sliding window for flow control and out of order rearrangement
  1. Guarantee TCP The reliability of the
  2. Guarantee TCP Flow control characteristics of

5. Congestion control

Full start , Congestion avoidance , Fast retransmission , Fast recovery

Address

6.HTTP

Hypertext transfer protocol HTTP It's an application layer protocol
  1. Support customers / Server mode ( Client sends request to server , Server returns response )
  2. Simple and fast
  3. flexible
  4. There is no connection
  5. No state

、

request . Response steps
  1. The client connects to web The server
  2. send out HTTP request
  3. The server accepts the request and returns HTTP Respond to
  4. Release the connection TCP Connect
  5. Client browser parsing HTML Content

7.Cookie and Session

Cookie
  1. Is a special message sent by the server to the client , In the form of text stored in the client
  2. When the client requests again , Will be able to Cookie Postback
  3. After the server receives , Can parse Cookie Generate content corresponding to the client
Session
  1. Server side mechanism , Information saved on the server
  2. Resolve client requests and operate session id, Save status information as needed
原网站

版权声明
本文为[Night ask]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270552173024.html

随机推荐