
Jamie Gibbon
Technical Analyst
Sierra Systems Group
Hi Guys,
Our client has requested a change in the deployment strategy for their Tomcat cluster. Instead of fronting it with Apache they want to use IIS6.
Can anyone provide me with some experienced feedback on this configuration? My brief amount of research seems to indicate that this can be done but it is not clear if Tomcat can still be clustered.
Thanks in advance for your responses.
Jamie
Edited one time. Last edit by Jamie Gibbon on Jun 14, 2010 at 4:06:54 PM (about 11 weeks ago).

Aleksandar Gargenta
Partner
Marakana, Inc.
Jamie,
Just like you can configure Apache to front one or more Tomcat instances, you can do the same thing with IIS.
In fact, you would be using the same JK Connector, just that it would come (and be configured) as a IIS plugin (
isapi_redirect.dll), as opposed to the Apache module (mod_jk).
The complete explanation of how to set this up can be found at:
http://tomcat.apache.org/connectors-doc/reference/iis.html.
Note that the Tomcat clustering (session replication) does not depend on the web-server you have in front of it. As for the load-balancing, the JK Connector's
lb worker is configured the same way on IIS as it is on Apache. The only difference is how you tell the JK Connector which requests to proxy to the Tomcat(s). The
workers.properties part is the same. See the
JK Connector documentation for more info.
Hope this helps,
Sasa

Jamie Gibbon
Technical Analyst
Sierra Systems Group
Thanks Sasa. I certainly clears up a few misconceptions and will allow the client to move ahead on the IIS6 platform. Much appreciated. - Jamie

Jamie Gibbon
Technical Analyst
Sierra Systems Group
Hi Sasa,
We have successfully deployed a Tomcat clustered and load balanced solution but are now running into a few performamce challenges.
Tomcat seems to choke after hitting the 500 users limit during testing and we can't seem to find a magic tuning paramter to correct this. Also, IIS generates ISAPI filter errors when this occurs which is understandable.
The other performance issue is tied to Tomcat serving up static content. We are considering moving the static content off Tomcat and on to IIS.
Any thoughts or suggestions Sasa?
Thanks!
Jamie

Aleksandar Gargenta
Partner
Marakana, Inc.
Jamie,
When you say 500 users, are you referring to 500 concurrent users (i.e. your maxThreads on the JK <Connector> is set to 500+)?
Also, when you say "choke", what exactly do you mean? What do you see? Errors? Crashes? Increased response times?
What kind of errors does the ISAPI filter give you? 503s?
As for moving the static content to IIS, that is quite understandable. In fact, one of the reasons why people put a web server in front of Tomcat is to have the web server serve the static files. The idea is to decrease the load on Tomcat(s) and have it (or them) only process requests for dynamic content. On the other hand, it's worth mentioning that, when properly configured, Tomcat can serve static content faster than most web servers (including IIS and Apache).

Jamie Gibbon
Technical Analyst
Sierra Systems Group
Sasa,
It appears that we have most of the settings in place right now so thanks for the insight.
We have just run into a clustering related anomaly that we are trying to isolate. Our application is generating multiple emails matching the number of Tomcat instances. Is there a way to lock one of the nodes down as the designated email provider for the application - from the Tomcat side?
Thanks again for your help Sasa. It has been invaluable.
Cheers,
Jamie

Aleksandar Gargenta
Partner
Marakana, Inc.
Jamie,
Hmm... that sounds application-specific. Emails are usually sent out in response to user requests (i.e. actions), which is normally not state (i.e. session) specific.
In general, a Tomcat instance is configured to send email via an external SMTP server (using a <Resource>), not via other nodes in a cluster.
Either way, it seems that you'll need assistance from the developers to resolve this issue, as it does not appear to be clustering-related.
Cheers,
Sasa