Mysql – High Availability for MariaDB and Postgres : replication or active-passive (SAN)

high-availabilitymariadbMySQLpostgresqlreplication

During the last weeks I did a lot of research on High Availability for Postgres and MariaDB. Both by my own research and also recommended by vendor's, replications seems to have more advantages.

Some benefits as using a standby node for backup; scaling; the fact it is simpler (no need for storage replication) and the flexibility…

However; our own DBA's don't like replication. Our Oracle DBA mentions replication is only useful in addition to clustering.

Is replication a valid (or even better) alternative for active-passive clustering? What do most new HA implementations use?

— a Linux architect

Best Answer

(Relating to MySQL only...)

In my opinion, a Galera-based solution is the best HA available today. MariaDB includes Galera in the latest releases; PXC also has it; or you can tack Galera onto Oracle's MySQL.

  • "Replication" is an integral part of Galera, but there are low-level differences
  • Automatically recovers from single-point-of-failure
  • 3 node (server) minimum
  • Uses quorum voting to discover what has failed, and avoid "split-brain"
  • If the 3 nodes are in 3 different datacenters, no single natural disaster can take out the 'system'
  • Read scaling (multiple nodes providing such)

Load balancing, proxying requests, etc, are related topics.