The three-way handshake "releases" the connection

We usually endorse, the TCP three-way handshake establishes the connection, and the four-way handshake releases the connection. But in fact, this is just a common phenomenon. Through packet capture, it is found that the Tcp three-way handshake "releases" the connection.

background:

192.168.40.1 host: zookeeper server, dubbo provider

192.18.40.8 host: dubbo consumer

The default port of zookeeper is 2181, the default port of dubbo service is 20880,

After the consumer calls the service, the program ends and all connections are disconnected. Use wireshark to capture the released Tcp packets:

As can be seen from the above figure, the Tcp connection between zk and the consumer is disconnected after the three-way handshake, while the connection between the consumer and the provider is released by the four-way handshake.

There is a question here: the consumer closes the program, why is zk actively releasing the connection?

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325160868&siteId=291194637