I have a two server machines on which I have installed Linux servers.I want to host one website with the two both machines.When there is congestion in one machine the user should be directed to the machine.Both the machines should have one database interloped together.I want both machines to share resources equally.In case of failure of one machine the other machine should continue working and the user should not notice the change.Is there any way I can change the files for those machines to work simultaneously?
Share
You may use a load-balancer top of your app-servers. See http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html
You can have DB on one of those machine and allow the user from the other-machine to have RW access to the schema of your app.
There is a fail-over setting in load-balancer you probably need to dig out to redirect all the traffic in case one of your servers goes boink.
I have moved to AWS long back, these stuffs are really easy to do with ELB.