How to build an HA app/DB setup?
I would like to build a highly available app/DB configuration using two nodes.
I have a database-driven web site (call it example.com). I would like a setup where my browser goes to RRDNS or something and the site keeps on working regardless if a node goes down. I don't want to build a separate DB tier.
Nodes: From two different reputable LowEndProviders in different DCs (Seattle and Las Vegas). Well, now you can guess who the providers are.
Hardware: one is 2GB, one is 4GB (or will be once @Francisco finishes satiating his legendary appetites among the fleshpots of Las Vegas and gets around to setting his new nodes up). Only budgeting 30GB of disk on each side as my 2GB node was a special and is has 40GB of total disk. I don't know how much disk the 4GB one has because @Francisco is too busy snorting cocaine off the stripper's hip bones instead of setting his new nodes up.
OS: Deb8, Cent7, and OpenBSD are my faves. LowEndDancers in hot tubs are @Francisco's.
So I need some advice:
Is RRDNS the best choice here? Is wasting his life amid the wanton excesses of Sin City @Francisco's? I believe all modern browsers understand RRDNS natively at this point. I'm OK with a brief outage if a node went down, which I anticipate to be rare. However, if a provider does some maintenance for a few hours, then I want the other node to recover when it comes back up. I could also use some kind of clustering failover but I think I'd need a VIP for that.
For the app files, binaries, and some import directories, I'm thinking of using glusterfs to keep them in sync. DRBD is another option but I've read that GlusterFS is better. I'm happy to err on the site of better recoverability if something goes wrong which is how I read GlusterFS vs. DRBD. There's also CephFS but I think that requires a minimum of 3 nodes.
BTW, since I'm building an HA clustered file system-ish thing, is there any way I could share that out to other clients? e.g., my own NAS in the sky and share it via NFS, etc.? So they'd mount someserver:/some/path local over NFS and it keeps working regardless if a node goes down? I don't recall NFS supporting RRDNS...
The DB, which is MySQL/Maria/Percona (if it's still free) or could be Postgres I guess. Percona XtraDB Cluster seems to get good press...? I only have two nodes, so I could also use MySQL's native multi-master. From everything I know about DBs, I want to do that replication at at the DB level instead of at the glusterfs/DRBD/etc. level so transactional integrity is preserved.
I could also use some kind of MySQL HA cloud service. Unfortunately these are really expensive (amazon RDS, etc.) and usually are just running on a single VM assigned to you anyway. There are more HA things like Amazon's SimpleDB, Azure Tables, etc. but I'd prefer not to lock myself into something proprietary. Google's Cloud SQL might work but it's more cost and since I need two nodes for the app anyway...
Any advice welcome!
For LET support, please visit the support desk.