awarnier wrote:
> 
> keenny wrote:
>> Hello all,
>> 
>> I'm currently working on a system that must be able to serve thousands of
>> requests per sec. The requests/responses contains only small amounts of
>> data
>> (ajax XMLHTTPRequests) and are not long lived (connection keep). I'm
>> using
>> java to generate the responses. Static content are served separately (by
>> lighttpd). I was just wondering if anybody has any opinions as to how
>> this
>> can be done most effectively (highest throughput, low cpu consumption
>> etc).
>> Some alternatives being:
>> 
>> lighttpd -> mod_proxy -> tomcat -> application code
>> lighttpd -> fastcgi -> application code
>> tomcat -> application code
>> asyncweb/mina -> application code
> 
> I would think that a key factor not mentioned above is : once your java 
> application gets the actual request, how long does it take it to 
> generate the response (however small the response actually is) ?
> 
> To be more explicit : you mention thousands of requests per second.  To 
> server these, if generating each response takes 1 second, you would need 
> thousands of processes in order just to keep up.
> There is also a question of bandwidth of course, even for small amounts 
> of data, thousands of requests amount to quite a bit, so to speak.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

Good points. Generating responses does take some time (several hundred ms),
but this is mainly because it involves calling other services in the cluster
(not cpu-bound that is). To avoid thousands of sleeping threads asynchronous
i/o will be used (i understand tomcat 6 has support for this?). Therefore
the overall throughput will be high, but latency not that good (however
latency is not an issue due to the application characteristics). An added
equirement for my scenario is therefore that async handeling of requests
must be used.

-- 
View this message in context: 
http://www.nabble.com/Fastest-method-to-serve-dynamic-java-content-tp22034617p22035479.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to