I want to set up a simple replication or exact mirroring, using 2 server computers I just bought, for the following purpose:
I want to set up some websites, which, by design, may eventually need to consume all of the RAM I have. So I simply want 2 exact replicas of all my (Java based) software running (on Ubuntu Server 12.04, any Java app server, not decided yet) at the same time, including (but not necessarily) hard disk data content, so I can simply switch off one of the computers, allowing the websites to continue fully running, replace it with a new computer (maybe with more RAM), and for the replication to begin again as before.
What is the best (simplest) way of achieving this? Is there a good way to include hard disk (file) data mirroring over the 2 machines too?