jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes how to handle when huge number of requests are there? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to handle when huge number of requests are there?" Watch "how to handle when huge number of requests are there?" New topic
Author

how to handle when huge number of requests are there?

Praveen palukuri
Ranch Hand

Joined: Feb 10, 2005
Posts: 65
If there are 100 requests but, server can handle 10 requests at a time. Then how to handle remaining requests. Every request should be processed. What are the different ways to achieve this?
(Is it handled by application server itself?)

Thanks in Advance.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Typically the web server, but the lines have been blurred over that it is possible for the application to manage too.

If supported, the server would have a configurable number of worker and queue threads. Workers are active threads, serving requests. When these are all taken up, requests are passed to the queue threads to hold the requests until a worker comes available. Once both workers and queue threads are all in use, requests are rejected until the system catches up. It is also possible for requests to leave the queue before getting to a worker if the client closes the connection.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39542
    
  27
E.g., in Tomcat this can be configured in the Connector element in conf/server.xml. Have a look at the maxThread, minSpareThreads and maxSpareThreads attributes: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to handle when huge number of requests are there?
 
Similar Threads
session tracking by application servers
Mutiple Http Request
grabbing servlet output in a filter
struts2 thread safety and performance
Servlet handling multiple requests?