• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there a way to set Maxim request for an application ?

 
Steve Yu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since running my application is quite time consuming, I am wondering if I can limit a maxim request limit on this application ONLY ? If yes, how ?
I mean, if there are more than that number of request coming in, just show a busy page.
Thanks,
steve
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me you could have the servlet keep track of the number of requests it is working on currently - incrementing a count when it accepts one and decrementing when finished. Of course you would have to be very sure that every path through the servlet resulted in the count being decremented and synchronize access to the counter.
Then just redirect to a busy page if the count is at the maximum.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!