• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run multiple web applications on different port of a single tomcat

 
naveen jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a single instance of apache tomcat server. I want to deploy more than one application on it but each should be run on different port.means each application should be independent to each other.

is there any way for it without creating more tomcat instances??
 
Anadi Misra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In that case you crate multiple services , each service runs on its own port and (if required) its on application base directory. Some thing like this



But be careful, i have seen performance dips in such a scenario, worst if CPU or memery consumption is high you cant nail down on exactly which app is the culprit then.
 
naveen jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your reply.I have found my solution.

But as you said some performance issue is there,so is there any solution for that ?
and also give me suggestion whether i should use more than one service or not?

Thanks again
 
Anadi Misra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Not really, it depends on how well your apps have been written, but yes you can ensure that every thing from the server configuration perspective is ok and hope for the best. For example, make sure JVM is in server mode


keep a high low and maximum memory allocation ( we had to keep the low to 1GB and high to 4GB for our poor tomcat to breathe easily); and hope the the developers have not made lousy mistakes ;)

From time to time fine tuning is requiered for which I did not find any rule of thumb, so I can make a fairly accurate guess that it depends on the apps running in server.
 
naveen jain
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your suggestion.
i will try to avoid such type of mistake from developers end.

thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic