> From: Tamer Abdulazim [mailto:eng.ta...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to