This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to handle when huge number of requests are there?

 
Praveen palukuri
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic