On Thu, 27 Aug 2015 20:34:35 +0300 Dmitry Sivachenko <[email protected]> wrote:
> Hello, > > we have a client-server application which establish a long-living TCP > connection and generates a lot of small request-response packets which need > to be processed very fast. > Setting TCP_NODELAY on sockets speed things up to about 3 times. > > Not I want to put a haproxy in the middle so it balances traffic between > several servers. > > Something like > > defaults > mode tcp > > frontend shard0-front > bind *:9000 > default_backend shard0-back > > backend shard0-back > server srv1 srv1:3456 check > server srv2 srv2:3456 check > > In such configuration application slows significantly. I suspect that > setting frontend's and backend's sockets option TCP_NODELAY would help as it > did without haproxy involved. Is there any parameter which allows me to set > TCP_NODELAY option? Hello, The flag TCP_NODELAY is inconditionally set on each TCP (ipv4/ipv6) connections between haproxy and the serveur, and beetwen the client and haproxy. You can use "strace" for displying the system calls and ensure yourself that the TCP_NODELAY flags is set after each "accept()", and after each "connect()". Thierry

