aspose file tools*
The moose likes Tomcat and the fly likes Tomcat Server Configuration on different machines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Server Configuration on different machines" Watch "Tomcat Server Configuration on different machines" New topic
Author

Tomcat Server Configuration on different machines

kona krishnakumar
Ranch Hand

Joined: Dec 03, 2011
Posts: 32
Hi All,

We will install Apache Tomat on single server (aa.bb.cc.d1) and we will have 3 Tomcat application instances on same server with virtual IP ( aa.bb.cc.d2, aa.bb.cc.d3,aa.bb.cc.d4) and can we assign the same port for all four apache tomcat servers.
Also, will it work with 4 CPU, 16 GB RAM.

Kindly share the suggestions.


Thanks in Advance
Krishna
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

Tomcat will be quite happy with 4 cores and 16GB RAM, although whether or not you can use all that memory will depend on the OS version you're using (you need a 64-bit OS) and (sometimes) on the JVM.

You cannot share the same port number between multiple Tomcat servers on a single OS instance, however, because only one application can ever own a TCP/IP port, regardless of what the application is or what the OS is.

The way to deal with that is to front (proxy) the Tomcat instances with a hardware or software load-balancer so that traffic all comes in to common ports (typically 80 and 443) and then is routed by the load balancer to the port of whichever of the 3 Tomcats it figures needs the work.

One of the most popular choices for this task is the Apache HTTPD web server.


Customer surveys are for companies who didn't pay proper attention to begin with.
kona krishnakumar
Ranch Hand

Joined: Dec 03, 2011
Posts: 32
Is the same port configuration is possible in case of different VIRTUAL IPs on same single windows VM sever system.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

kona krishnakumar wrote:Is the same port configuration is possible in case of different VIRTUAL IPs on same single windows VM sever system.


Yes, but those are the ports INSIDE the guest VMs. As I said, you cannot share the port between different apps in an OS instance, but each VM has its own OS instance.

In order for the different Tomcats in these VMs to be externally accessible, you'll need to set up appropriate virtual networking and routing.

Incidentally, although I'm, very much into VMs myself, if the only purpose of the VMs are to house Tomcat instances, my normal approach would be not to use per-Tomcat guest VMs, since the JVMs are sufficiently self-contained (and secure) themselves and have less overhead than a complete OS instance. I'd only go the extra step in cases where I was being exceptionally paranoid.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat Server Configuration on different machines
 
Similar Threads
App Architecture
In HFSJ, why was IIS not mentioned?
Unable to get Client IP
Accessing Cookie
Can I use mod_jk + Tomcat and mod_jserv + JServ with the same Apache server?