This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes How to deploy one Web application on multiple server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to deploy one Web application on multiple server?" Watch "How to deploy one Web application on multiple server?" New topic
Author

How to deploy one Web application on multiple server?

Swerrgy Smith
Ranch Hand

Joined: Mar 26, 2010
Posts: 91
Hi all,

I would like to know how we can deploy one Web application on multiple server to share the work between them?
My first thought is that we just deploy the same war file on different servers that connect to the same database. However, what will happen when a user enter something like www.webdomain.com ?
How can multiple servers share the same domain name and how the requests from different users are redirected to these different server?

Any help will be very appreciated!

Thank you very much.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41591
    
  55
You would generally direct the incoming requests to some kind of load balancer that then distributes the requests to the various app servers. Apache httpd is frequently used for that in conjunction with the mod_proxy or mod_jk modules: http://tomcat.apache.org/tomcat-7.0-doc/balancer-howto.html


Ping & DNS - my free Android networking tools app
 
Consider Paul's rocket mass heater.
 
subject: How to deploy one Web application on multiple server?