On Tue, Jun 27, 2017 at 11:27:45AM +0200, Moemen MHEDHBI wrote:
> 
> 
> On 27/06/2017 08:58, John Cherouvim wrote:
> > Thanks a lot for the explanation.
> >
> >> Here the numbers are almost the same as your "s" server because it is
> >> the only server configured in the backend. If there was many, the
> >> backend numbers will be around the sum of the server numbers (for
> >> each column).
> >>   
> > Although this is a small detail, is there an explanation for the fact
> > that they are not always exactly equal? Is it the case that they'll
> > eventually be exactly equal but maybe due to implementation reasons on
> > how these counters are held in memory there is a slight difference?
> >
> > thanks
> >
> >
> The explanation may differ based on the number/metric in question. For
> example, the Total sessions in the backend may be not equal to the sum
> of total sessions of the servers, because there were some requests
> aborted before HAProxy chooses a backend server.

That's totally true. In addition, in large server farms, it sometimes
happens that the stats applet has to pause while sending due to the
stats page output buffer being full, and go on after some data left.
In this case, the total computed in the backend by summing the servers
can be slightly different from the visible sum of the servers, just
because they are retrieved a few tens of millisecond apart. But in
practice this is true for any monitoring tool. For example, retrieving a
switch or a router's stats over SNMP will lead to a similar situation
where the total input differs from the total output simply due to the
in and out ports being listed at different moments.

Willy

Reply via email to