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.
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.
An IDE is no substitute for an Intelligent Developer.
Joined: Dec 03, 2011
Is the same port configuration is possible in case of different VIRTUAL IPs on same single windows VM sever system.
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.