Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

RE: Limit Num Requests

Peter Crowther

2006-12-20

Replies:

> From: adamle [mailto:adam@(protected)]
> I am looking for a solution that for a certain url pattern
> only allows a
> certain number of requests to be serviced at the same time.
> This would
> solve my problem, while not affecting servicing lighter pages.

Makes sense.

If you can stand for your users to get a 'Busy, please try again later'
message, then one approach would be to put a Filter in front of the
relevant pages. Whenever it sends a request for processing, it
increments a filter-wide counter; whenever a request returns from
processing, it decrements the counter; if the counter is above a certain
value when the request comes in, don't forward the request and show the
client a try-later message.

If this isn't appropriate, I'm out of ideas - but I'm a lightweight on
this forum, and have never used AJP. I suspect some of the better minds
on here will weigh in later!

   - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.