傻傻分不清的TCP keepalive和HTTP keepalive

1.TCP keepalive1.1.概念

A keepalive (KA) is a message sent by one device to another to check that the link between the two is operating, or to prevent the link from being broken.
——From wiki
TCP keepalive是TCP的保活定时器 。通俗地说,就是TCP有一个定时任务做倒计时,超时后会触发任务,内容是发送一个探测报文给对端,用来判断对端是否存活 。


    推荐阅读