MEDIUM: unix: add preliminary support for connecting to servers over UNIX sockets
authorWilly Tarreau <w@1wt.eu>
Fri, 9 May 2014 20:57:47 +0000 (22:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 May 2014 23:26:38 +0000 (01:26 +0200)
commit47f48c4247d4552ad176ae0186e8f138d2bb34fd
tree1cd0e6ee9df8da6392528e433637fd0e8bd2b8eb
parent9cf8d3f46bc855e24c9f70f6518f0bd120e544c1
MEDIUM: unix: add preliminary support for connecting to servers over UNIX sockets

We've had everything in place for this for a while now, we just missed
the connect function for UNIX sockets. Note that in order to connect to
a UNIX socket inside a chroot, the path will have to be relative to the
chroot.

UNIX sockets connect about twice as fast as TCP sockets (or consume
about half of the CPU at the same rate). This is interesting for
internal communications between SSL processes and HTTP processes
for example, or simply to avoid allocating source ports on the
loopback.

The tcp_connect_probe() function is still used to probe a dataless
connection, but it is compatible so that's not an issue for now.

Health checks are not yet fully supported since they require a port.
src/proto_uxst.c