You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tamer Abdulazim <en...@gmail.com> on 2009/07/15 18:20:05 UTC
How to limit requests per second
Hi,
We have a servlet deployed on Tomcat 5.5. Another 3rd party application
call this servlet heavily. The system works fine for 20 requests per second
but it crash if it exceeded this limit. We cannot control the 3rd party
system that call our servlet. Can we change any configuration in tomcat to
limit number of requests per second to our servlet?
Thanks a lot
Timo
R: How to limit requests per second
Posted by Leandro Dardini <l....@comune.prato.it>.
We had a similar problem with a software not made by us. We solved it placing apache in front of tomcat and using the mod_cband extension of apache. Feel free to query me directly if you need more info.
Leandro
----------------------
Dott. Leandro Dardini
Sistema Informativo
Comune di Prato
Via Cairoli, 16
59100 Prato
Tel: +39 05741835216
Fax: +39 05741835212
Mobile: +39 3474501445
> -----Messaggio originale-----
> Da: Tamer Abdulazim [mailto:eng.tamer@gmail.com]
> Inviato: mercoledì 15 luglio 2009 18.20
> A: users@tomcat.apache.org
> Oggetto: How to limit requests per second
>
> Hi,
>
> We have a servlet deployed on Tomcat 5.5. Another 3rd party
> application call this servlet heavily. The system works fine
> for 20 requests per second but it crash if it exceeded this
> limit. We cannot control the 3rd party system that call our
> servlet. Can we change any configuration in tomcat to limit
> number of requests per second to our servlet?
>
>
> Thanks a lot
>
> Timo
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: How to limit requests per second
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tamer Abdulazim [mailto:eng.tamer@gmail.com]
> Subject: How to limit requests per second
>
> We have a servlet deployed on Tomcat 5.5. Another 3rd party
> application call this servlet heavily. The system works fine
> for 20 requests per second but it crash if it exceeded this
> limit.
You could fix that underlying problem (whatever it is), rather than trying to control the trigger that someone else is holding.
> Can we change any configuration in tomcat to limit number
> of requests per second to our servlet?
You can limit the number of threads per <Connector>, but not webapp or servlet.
You can write a filter for your webapp that tracks the number of concurrent requests and rejects excess ones.
You can implement a ServletRequestListener to do essentially the same thing as described for the filter; see the servlet spec for details.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org