posted 14 years ago
Welcome to the JavaRanch, Peter!
Tomcat isn't a very hungry program, but if there were 2 instances of Tomcat setup on that box, there was probably a good reason (at the time, anyway).
Multiple Tomcats don't automatically mean twice as many connections. TCP/IP architecture means that each Tomcat listens on a distinct port, and when a connection request is made to that port, the actual send/receive sockets are created to handle the request/response cycle. However, these connections are closed and freed once the web request has been processed. Unlike client/server systems, HTTP servers don't hold long-term connections.
Well, that's not entirely true, since there's a keep-alive mechanism that helps reduce the overhead of repeated request/response cycles, but it's not a long-term resource consumer and you can switch it off if it annoys you.
Long-term connections are held by things like database connection pools, but there's not usually enough of them to matter.
The upshot is that there's probably no reason why you HAVE to get rid of one of the Tomcats. However, if you do, there are 2 critical things to address:
1. You must deploy all the webapps you intend to keep onto the remaining Tomcat server
2. You have to ensure that the URLs that targeted to vanishing server are redirected to the remaining server.
The things that determine which Tomcat server gets given a URL are the URL's host address and port. When 2 Tomcats are on the same machine, the host address is usually going to be the same for both of them, but each Tomcat will have a different set of ports. If you're fronting the Tomcats with Apache, you can probably just change the Tomcat connector config in Apache. For more complex operations, mod_rewrite can help.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.