On 23/08/2011 21:37, Christopher Schultz wrote:
> All,
> 
> I've been using Tomcat fronted by Apache httpd (terminating SSL I 
> might add) for years and I've never given any thought to which
> flavor of AJP connector I've been using. We don't build APR as part
> of our standard build process and it's unclear from the docs but I
> suspect you don't get NIO unless you specify that you want it.
> 
> I guess that means I've been stuck in BIO-ville all this time.
> 
> We're looking to upgrade to TC7 soon so I will have 3 options,
> now. I'm wondering which one would be best for us.
> 
> From my perspective, the most useful thing you get from both APR
> and NIO is the ability to service more simultaneous requests than
> you actually have threads, because of their polling capabilities.
> That also means that a slow client won't tie-up a thread for a long
> time. But, since I'm using AJP, there is a one-to-one relationship
> between request processors at the httpd level and in Tomcat, so
> being able to handle "more" requests doesn't sound like it's buying
> me anything. I'm not sure how HTTP keepalives fit into all this,
> but I suspect that mod_jk takes care of this and Tomcat has little
> to no control over any of it.

Not quite correct.
With BIO it is one thread/processor per connection.
With NIO/APR it is one thread per currently processing request (i.e
connections in keep-alive (HTTP or AJP) do not require a thread or
processor).

> So, what does either AJP or NIO buy me in an AJP environment?

In short, NIO & APR will scale better.

> We have no notable performance problems that do not involve
> obvious application slowness, so BIO has been working fine for us.
> I'm inclined to stick with it unless there are some compelling
> reasons to switch.
> 
> Any thoughts?

If it ain't broke...

Mark

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

Reply via email to