tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: How to limit requests per second
Date Wed, 15 Jul 2009 17:18:58 GMT
> 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


Mime
View raw message