Hi Willy, 

Thank you for the answer. I checked contstats and I see it is actually working. 
HAProxy - 1.8.1. 
Even small requests are reflected in the traffic stats. 


Regards,
Sergey

> On 18 Nov 2018, at 20:47, Willy Tarreau <[email protected]> wrote:
> 
> Hi Sergey,
> 
> On Sun, Nov 18, 2018 at 05:23:23PM +0300, Sergey Arlashin wrote:
>> Hi! 
>> 
>> We have a TCP service that is load-balanced with HAProxy. It works pretty
>> well, however the stats page doesn't seem to report correct traffic
>> statistics. Even though we have data transferred all the time, stats show the
>> same amount of bytes in/out. 
>> 
>> Our traffic if mainly long running TCP sessions that once are established,
>> remain in ESTABLISHED state for a very long time. Probably it is somehow
>> related? 
>> 
>> Can anyone please help me sole this issue? 
> 
> Stats are usually updated only at session termination. There is "option
> contstats" to allow such counters to be updated upon each transfer, but
> starting around 1.3.16 or so, it became less effective since it's only
> performed at the upper layers while direct forwarding automatically
> happens at much lower layers. With this said, with this option, an
> update will be performed at least once every 2 GB, which I admit is
> already not often enough for most use cases, but it's only a side effect
> of the fact that we don't schedule more than 2 GB to be forwarded at once.
> 
> At the moment I don't know what could be done to force these counters to
> be updated more often. I suspect that it would be possible to implement
> a dummy filter to force this to happen, which could possibly be a nice
> option instead of a one-size-fits-all, but I'm not certain about this.
> 
> If anyone else has an idea, I'm interested as well :-)
> 
> Willy


Reply via email to