> On 3/17/06, Rajeev Jha <[EMAIL PROTECTED]> wrote: > > > What's your ratio of Apache to Tomcat instances? You may want to look > into using squid as a reverse proxy to Tomcat, it is very good at > supporting a huge number of concurrent clients without having to spawn > a thread or process for each one.
I think that may not be possible in our case. see one aspect of keep-alive is you keep the pipe open because the same client can request for more resources. But all such requests are alive for a finite amount of time only ,so performance is always talked in terms of through-put. In our case,the servlet is interfacing to the back-end that sends async events from time to time. So we really need to hold on to a thread to receive notifications from the backend. The container spwans a thread that enters the doGet() of servlet doGet(){ initial_processing(); while(pipeOpen) { data = pipe.read(); // will block for backend events process(data); outputStream.flush(); } outputStream.close(); } Now we can not return this thread to some pool, because I do not know when the events will arive. And I need to keep the connection open to push the data + need one thread to block on events. So I need one thread to server one request. The difference from previous case is , our processing of a request is not over in finite time. we have to keep the same connection open. I really donot see a way out w/o some support from the container itself. Jetty has a feature called continuation that is supposed to solve this issue.But for the moment, I want to try tomcat first. i want to see how many threads i can support in such a scenario. I will put a separate mail for that. Thanks Rajeev. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]