Re: mod_ratelimit working by steps ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I created a 4MB file and rate limited its directory container in the
httpd's conf, and tested 8/20/30/etc.. settings as you suggested with
curl:

curl http://localhost/test.txt > /dev/null (in this way I drop the
returned response but keep the curl's connection metadata summary).

In every case I get the expected result (average Dload speed).

Thanks a bunch for testing this, and confirming that something is wrong on my side. After more test, I'm pretty sure the problem come from a bad interaction between mod_ratelimit and mod_proxy. (sorry, I forgot to mention that the path I was trying to rate-limit is indeed a tomcat app behind mod_proxy).

Did you execute your performance tests in localhost? And also, did you
use another tool other than Firefox? I'd be curious to know your
results with curl executed in localhost.

I've tried the following (Excerpts from my config at the end of this mail):

0) rate-limit on tomcat app proxified throught mod_proxy (previous mail)
=> rate-limit works by step, and does not limit anything if rate-limit > 40
   (tried on local with wget)
1) rate-limit on a true folder, served by apache :
   => rate-limit is working as expected
2) rate-limit on file served through python's SimpleHttpServer, proxified by mod_proxy
   => rate-limit works by step.

In conclusion, tomcat is not at fault, since python's SimpleHttpServer also have a problem, and the trouble come from my reverse-proxy. In the case af a reverse proxy, I'm not sure which part of the connection get rate-limited ?
Is that an known problem ?
Or am I trying to do something totally bogus here ?
Any ideas to achieve my goal ? (that is, limiting the bandwith used by the tomcat app)

Thanks!

N

PS : for what it's worth, I've tried 1) with curl, and got the following error, wich seems to be related to the use of http2:
curl: (56) Unexpected EOF
wget is fine, though.

PS2 : Excerpts from my config
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    SSLProxyEngine      On
    SSLProxyCheckPeerCN Off
    SSLProxyCheckPeerName Off
    <Location /airsonic> # the tomcat app
        ProxyPreserveHost   On
        ProxyPass http://127.0.0.1:12345/airsonic
        ProxyPassReverse http://127.0.0.1:12345/airsonic
        SetOutputFilter RATE_LIMIT
        SetEnv rate-limit 35
   </Location>
    <Location /test> # a true folder, served by apache
        SetOutputFilter RATE_LIMIT
        SetEnv rate-limit 50
   </Location>
    <Location /test2> # a python SimpleHttpServer
        ProxyPreserveHost   On
        ProxyPass http://127.0.0.1:8000
        ProxyPassReverse http://127.0.0.1:8000
        SetOutputFilter RATE_LIMIT
        SetEnv
   </Location>

Thanks!

Luca

Links:
------
[1]
https://webmasters.stackexchange.com/questions/101988/strange-behaviour-with-apache-mod-ratelimit

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux