On 25 September 2014 19:09, SC <[email protected]> wrote: [snip] > My confusion comes from not understanding the discrepancy between some of the > numbers. I get why frontend and backend would differ; obviously if the > request doesn't even make it to a backend server then there would be a > difference. However, I am logging different numbers for these errors in > haproxy.log than the stats page is showing.
I'm sure others will give you more in-depth guidance but, off the top of my head, there are a few reasons you could be seeing discrepancies. 1) HAProxy can emit various responses itself: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#1.3.1 2) Remember that values on the stats page get zeroed when HAProxy is restarted (you need to be persisting them elsewhere to use them long-term, across restarts) 3) You have dontlognull enabled which (IIRC!) might interact with browsers making multiple speculative connections, not using them, and closing them without any data being transferred. Perhaps there's something in this, maybe along with the behaviour detailed at http://blog.haproxy.com/2014/05/26/haproxy-and-http-errors-408-in-chrome/, which could point towards some of the discrepancies? 4) Lastly, you don't mention which version you're running, but HAProxy 1.4 operates in tunnel mode by default. This means it examines a TCP connection's first request and response only, which can deviate your logs from actual observed traffic. The 1.5 behaviours are detailed here, if it helps: http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4 As I say, others probably have more targeted advice, but these would be where I'd personally start investigating. As per #2, I'd *definitely* verify that there's a genuine problem before burning too much time on it! Are you *100%* confident that someone hasn't just seen 2 numbers that don't match and has assumed there's an issue where there isn't? HTH, Jonathan

