So at long last, I'm getting to use keep-alives with HAProxy! I'm terminating http/ssl/spdy with Nginx and then passing the connections to HAProxy via an upstream pool. I've verified by packet capture that connection reuse between clients, Nginx, and HAProxy is occurring.
So I'd like to keep the connection between Nginx and Haproxy alive for a while, so I've set "timeout http-keep-alive" to a high value, is there anything else I should do? As I propagate keep-alives deeper into our stack (we've always closed every connection after every request, so this is new territory for us) I would like to reuse existing sessions to the backend servers if they are available (idle), but I don't want to wait for an existing session to become available. It looks like I would need to tweak the "max-keep-alive-queue" value to achieve this but I don't see a lot of information about it, can anyone advise me what I should do here? If it helps the backend servers are relatively close to the haproxy servers, lets say for argument that the penalty for opening a new connection over reusing an existing one is 1ms - and that eliminating the 1ms penalty would reduce my total request latency by 50%, so its worth it.

