We have the following servers:
A. 1 x web server running MySQL (a forum).
B. 1 x web server running RT with Postgres.
C. 1 x web server running a home grown app with MonetDB as the backend
Now of course we want to add a bit of reliability here by adding an extra server to each web server in case 1 server dies, etc. But what is the best and relatively cheaper way to do it?
- Get an extra server each, and replicate the DBs using the appropriate technologies in each case? MySQL replication for A, Slony, etc for B, and I don't really know how to replicate MonetDB, but I guess it's possible.
Why I don't like this: possible data corruption due to synchronisation issues, i.e. a temporary power blip could cause data to be written to the slave, then the master comes back, and then the replication gets broken. In the case of Slony, you can't even do that, you have to promote the slave to a master first, etc, AFAIK.
The other thing I don't like about this is having to manually trudge through all this and figure out who is doing what now and syncing things across, etc.
2.Get 2 servers with a decent amount of storage and setup DRBD across them.
Since they will have a single shared IP, put all the DBs, e.g. MySQL, Postgres, and Monet on the DRBD storage. The good thing about DRBD is that we won't have a single point of failure since even if we lose a part of the cluster, the other server can take over so it's much more resilient. And my understanding it that the web servers above this level can simply fail over and back without any need for worrying about replication, and syncing things, etc.
What is best practice when using VMs to setup something like this?