tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Byrom Robert-LRB005 <>
Subject RE: multi threading in tomcat
Date Sat, 11 Aug 2001 19:13:37 GMT
>The precise details depend on which version of Tomcat you're talking
>about.  Here's how it works in Tomcat 4:
>* A single thread running HttpConnector is listening on whatever
>  TCP/IP socket (say, 8080).
>* When an incoming socket connection is accepted, it is handed off
>  to an HttpProcessor running on another thread (up to a configurable
>  maximum number of threads) while the connector thread goes back
>  and waits for another incoming connection.

This is a point I'm unclear about, ie adding more threads to deal with requests, does it really
improve overall performance? Why not have a single thread waitting on on the HttpConnector
to service all requests , the code can be made faster by reducing context switching and in
addition make it thread safe. I dont believe that Java threading can be used to really boost
performance, even if you're running the app on a multi-processor. I'm not confident that threading
in java is useful for optimisation rather it just complicates design and makes the application
more buggy if it isnt crucial.


View raw message