0

I've got a single Tomcat 6 server that hosts a JSP app. We just spun up a new IIS 7.5 web farm to host our other internal apps. Currently the machine that hosts Tomcat is also running IIS 7 with the ISAPI filter loaded to provide front-end handling for the JSP app. I'd like to move the IIS portion to the web farm to consolidate our IIS presence and let the Tomcat server just serve and run Java and Tomcat.

Has anyone done this, is it even possible while ensuring session state is properly maintained?

I had it up and running using the IIS Tomcat Connector http://tomcatiis.riaforge.org/ but after a while the communication between the boxes slowed and pages would not load. In addition it seemed like some of our authentication tickets were timing out.

Thanks for any ideas or reference material!

Brent Pabst
  • 6,069
  • 2
  • 24
  • 36

1 Answers1

0

Tomcat can serve requests directly, you just need to configure an HTTP connector and select a port number.

If you're using the IIS Connector, then there's a complete set of configuration instructions on the Tomcat website, here: http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

Can you explain what you mean by 'ensuring sessions state is properly maintained'?

Pidster
  • 147
  • 5
  • The point is I want to leverage the power of IIS as a front-end box to terminate connections and manage network load balancing so I do not want Tomcat to serve requests directly. It goes against our security policy of keeping application servers on the internal network and load balancers in a DMZ. As for session state: the request, if terminated from a load balancer, could potentially come from Server A on the first GET request but the next request may come from Server B even though it's the same client. I want to make sure Tomcat can handle that. – Brent Pabst Apr 01 '12 at 15:28
  • I'm confused about your architecture, you're saying that there is one Tomcat and multiple IIS instances? That's the wrong way round for a load balanced architecture. – Pidster May 03 '12 at 15:21
  • Tomcat can handle multiple inbound load balancers, the client still sends the JSESSIONID cookie (or jsessionid URL path parameter) and the value of this is used to select the session. In a Tomcat cluster, the (server.xml) Engine.jvmRoute attribute is used to specify a unique value for each cluster member - this value is appended to the session id. E.g. JSESSIONID=000000000000000000.node1. In a cluster with sticky sessions, the load balancer inspects a request and uses the node identifier in the session id value to select the appropriate node. – Pidster May 03 '12 at 15:27
  • We have a larger IIS presence so we currently have two IIS boxes on the edge of our network. There are 2 IIS boxes as they handle other apps too. We only have one internal Tomcat box. I simply want to terminate external requests to IIS and forward traffic to the single Tomcat box. With the Jakarta IIS connector mentioned in the OP how would I setup or utilize JSESSIONIDs? – Brent Pabst May 03 '12 at 18:03
  • If there's only one Tomcat you don't need to do anything. As long as your Java app correctly encodes each URL on the page, it'll be fine - in most cases even if it doesn't encode them, the fact that Tomcat sets the cookie is enough. – Pidster May 04 '12 at 19:50
  • How can I easily test to make sure Tomcat is returning the right cookie(s)? – Brent Pabst May 08 '12 at 16:34
  • Use Firebug or Chrome/Safari web tools to observe whether the cookie has the same value over a series of requests from the same browser. – Pidster May 09 '12 at 06:42