Hi,

On Mon, Jan 06, 2014 at 06:07:21PM +0800, Delta Yeh wrote:
> Hi,
>  I have run into an issue that http download stop with busy low speed link
> if haproxy doing  reverse  proxy for a file about 5MB.
>  The topo is like:
>    browser1---------traffic shape box allow 128Kb
> --------------haproxy----------1Gb link-------web server
>                    |
>    browser2---|
> 
>    The traffic shape box allow 128Kb bandwidth.
> 
>    Without haproxy , download is OK(about 125Kbps).
> 
>    I run a stress tool   on browser2 box to make link busy and then start a
> download on browser1 box.
> 
>    Without haproxy, download is 60Kbps.
> 
>     With haproxy doing the reverse proxy, after several seconds, the
> download speed become  5Kbps, and then  download stopped.

The problem when doing traffic shaping is that the behaviour varies *a lot*
depending on the network stacks, buffer sizes, etc... and that it is very
possible that it causes more drops with haproxy than without because the
traffic would be slightly more bursty.

You must *always* use two network sniffers when deploying a traffic shaper,
one before the shaper and one after, and observe the behaviour. The drop
rate must remain very low and queuing must be used as much as possible. And
when drops happen, they should happen randomly enough so as not to impact
TCP congestion control algorithms.

My guess would be that your haproxy box is tuned for larger windows than
the other ones and may have a larger initcwnd, and that it tries to send
more packets at once, resulting in the traffic shaper to drop more packets.
But it's only a guess, only a network analysis can tell what happens.

Best regards,
Willy


Reply via email to