Greetings from Slack Technologies,

We are evaluating HAProxy as a load balancing solution and so far are quite
pleased with it. One feature we require is the ability to log when a
connection started (option logasap), and again when it is terminated. We
have many long lived websocket connections, and this level of introspection
is invaluable for debugging.

We are currently accomplishing this with the following patch:
diff -u -r haproxy-1.6.5-orig/src/proto_http.c
haproxy-1.6.5/src/proto_http.c
--- haproxy-1.6.5-orig/src/proto_http.c 2016-05-10 06:42:00.000000000 -0700
+++ haproxy-1.6.5/src/proto_http.c      2016-07-21 14:19:10.131437264 -0700
@@ -6926,6 +6926,7 @@
                s->logs.bytes_out = txn->rsp.eoh;
                s->do_log(s);
                s->logs.bytes_out = 0;
+              s->logs.logwait |= LW_BYTES;
        }
        return 1;
 }

Questions:
1. Is this correct? Are there unforeseen consequences of this change?
2. Would this functionality be welcomed upstream? If so, I can look into
creating a separate option for this.

Best,
Cy

Reply via email to