docker/docker — pull request #8508 by vbatts (2014-10-11 00:06:02+00:00)
Title: cleaner handling of client socket access

In the go stdlib net/http Transport, the used connections are cached
when idled. This behaviour is intended for TCP connections and does not
behave correctly for unix sockets. Despite the
DefaultMaxIdleConnsPerHost being 2, the idled connections are held open
during a session. For large sessions like `docker rm $(docker ps -a -q)`
of thousands of containers, it will cause the client _and_ the server to
open too many fails and have failures.

Having keep alives not used for only unix sockets is a work around for
this stdlib issue.

Also this includes disabling compression when communicating over the
local unix socket too.

ping @unclejack @vieux

Signed-off-by: Vincent Batts