Question :Is it true that servlet containers service each request by creating a new
thread? If that is true, how does a container handle a sudden dramatic
surge in incoming requests without significant performance
degradation? (Servlets)
Answer :The implementation depends on the Servlet engine. For each request
generally, a new Thread is created. But to give performance boost, most
containers, create and maintain a thread pool at the server startup time.
To service a request, they simply borrow a thread from the pool and when
they are done, return it to the pool.
For this thread pool, upper bound and lower bound is maintained. Upper
bound prevents the resource exhaustion problem associated with unlimited
thread allocation. The lower bound can instruct the pool not to keep too
many idle threads, freeing them if needed.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Saturday, March 14, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment