Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm seeing numbers almost on a order of magnitude in difference between the total number of sessions served up by HAProxy and the number of Visits recorded in Google Analytics (10x higher number on the HAProxy stats page). Is there something wrong in my configuration or am I misinterpreting?

share|improve this question

Sessions in HAproxy are TCP sessions. When you open a webpage, you can have 10, 20 or more TCP sessions to download the page and its components (images, css, javascript, etc...).

Session in Google Analytics are Visits. When a client visits your page, he/she download all of the components (so multiple TCP sessions) but that counts for one visit (the call to google analytic is done once when the client execute the corresponding javascript).

share|improve this answer

You've to take into account that is likely that Google Analytics visits are measured using a tracking cookie, so two different visits from the same user & browser in a given amount of time might count as just one visit, whereas HAProxy total sessions counter is, IIRC, the total number of HTTP connections made to your server, so in the previous example HAProxy will show you two total sessions instead of one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.