OoO En cette matinée pluvieuse du mardi 11 octobre 2011, vers 10:39, je disais:
> I have run some bench with stud + haproxy (1.5-dev7) and found that > stud with "--write-proxy" parameter adds 40 ms of latency. stunnel has > recently added (4.45) PROXY support too and enabling it does not add > any latency. Therefore, I think the problem does not lie in HAProxy > but maybe there is some bad interaction. I have modified stud to do a > strcpy of a static proxy line: > strcpy(ring_pnt, "PROXY TCP4 1.1.1.1 172.31.10.15 56732 > 443\r\n"); > written = 43; > Still, 40 ms of latency. I have also modified stud to not send the > proxy line until there is something else to send (by commenting out > "ev_io_start" in "if (OPTIONS.WRITE_PROXY_LINE)" section of > handle_connect(). No change. Since the code handling PROXY protocol is > so small in stud, I have no other idea of what to do. See here for the > relevant code: > https://github.com/bumptech/stud/blob/master/stud.c#L489 > Any idea where the latency could lie? The problem was stud did not disable Nagle's algorithm on the backend side. Therefore, nothing to do with HAProxy. -- Vincent Bernat ☯ http://vincent.bernat.im HARDFAIL("Not enough magic."); 2.4.0-test2 /usr/src/linux/drivers/block/nbd.c