Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to handle when huge number of requests are there?

 
Ranch Hand
Posts: 65
  • 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.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 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.
 
Rancher
Posts: 43016
76
  • 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
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic