• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat Server Configuration on different machines

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
kona krishnakumar
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the same port configuration is possible in case of different VIRTUAL IPs on same single windows VM sever system.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
What are you doing in my house? Get 'em tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic