Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
What are you looking to replicate - just the web application, or do you need to keep things like session state for use by a load balancer? What do you mean by "Ubuntu replication"? –  Shane Madden Jun 14 '12 at 5:21
    
Ideally everything, so I can abruptly switch off either one of the computers without any interruption in anybody's experience, replace it with a new computer or add more RAM, switch it on and get the whole thing going again. Load balancing isn't a priority at all, just the ability to hotswap computers while live, that's all. The reason is the potential of the RAM filling up (necessarily RAM intensive apps in my case). –  Navigateur Jun 14 '12 at 22:53

1 Answer 1

IMHO it is almost always best to use the applications own means of replication.

In your case this will be a Java-based software running on the Glassfish application server.

So IF your application is able to be clustered (i.e. it must use the right java-calls to enable glassfish to replicate state information) use it.

I am not sure about Glassfish, but with Tomcat 5.5 the method was called serialization.

Be aware that you have to use some kind of load-balancing in front of Glassfish so you can transparently fail over (normally a service-ip or two).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.