tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Any way to deal with too many request per second?
Date Fri, 06 Jul 2012 17:42:15 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jose,

On 7/6/12 9:09 AM, Jose MarĂ­a Zaragoza wrote:
> 2012/7/6 Christopher Schultz <chris@christopherschultz.net>:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> 
>> It is unreasonable to queue requests as a mitigation for high
>> load: you will only make things worse for your clients.
>> 
> 
> If I create a valve which delays requests by source IP address ,
> how does it affect to all request ?

If you merely delay (e.g. using Thread.sleep) then you starve other
requests from getting processed. If you are able to put the request
back into the request queue and then have the thread continue on to
the next request, then you run the risk of (ultimately) starving the
IP that needs to be delayed.

> I mean, if my valve performs a sleep() for 2 min. when  receives a 
> request from certain IP ,

That's insane.

> what does it happen with others requests from other clients ?

The other requests have to wait, of course.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/3I3cACgkQ9CaO5/Lv0PCqxwCgwFP2KIs++N7CYTW1p/4lUK69
6lUAoI6hmgGOQ+0F29ztYSD+S2qTNQET
=KAZW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message