Dockerclient are used by other tools like swarm. Swarm manager normally maintains 2-6 established TCP connections with an engine thru HTTP keepalive. When an engine goes offline abruptly, like engine crash, host pause, network failure, these connections remain in Established state. By default swarm manager relies on system dead connection detection mechanism to fail requests. In typical Linux system it's around 13-20 minutes, depending on tcp_retries1, tcp_retries2 and retransmit timeout value. From user perspective, docker CLI hangs.
RFC5482 defines TCP_USER_TIMEOUT so a sender can break the connection faster. While Golang doesn't support this socket option. Linux and Windows have different options to support user timeout.
Dockerclient are used by other tools like swarm. Swarm manager normally maintains 2-6 established TCP connections with an engine thru HTTP keepalive. When an engine goes offline abruptly, like engine crash, host pause, network failure, these connections remain in
Established
state. By default swarm manager relies on system dead connection detection mechanism to fail requests. In typical Linux system it's around 13-20 minutes, depending on tcp_retries1, tcp_retries2 and retransmit timeout value. From user perspective, docker CLI hangs.RFC5482 defines TCP_USER_TIMEOUT so a sender can break the connection faster. While Golang doesn't support this socket option. Linux and Windows have different options to support user timeout.
Signed-off-by: Dong Chen dongluo.chen@docker.com