5 ms·
High-availability is always an issue that I am concerned with self-hosting MySQL or PostgreSQL. I am always worry about the fail-over failing, in case any step
by Nican 7y ago
High-availability is always an issue that I am concerned with self-hosting MySQL or PostgreSQL. I am always worry about the fail-over failing, in case any step in the setup was not properly configured. Let me know if someone has some magical formula for easy replication.
I still find CRDB's replication interesting, since all data is replicated 3-way on every commit, and data also auto-rebalances as needed. With some exceptions, as long as you are connected to any node, you should have access to all data.
- btmiller 7y agoRegarding reliability of your failover process: test it regularly and have it monitored so you get alerted at the first sign of trouble.
- SteveNuts 7y agoWe used Percona's XtraDB Cluster for HA and have had very few issues. Just fronting it with haproxy to read/write to a single node at a time (setting others to "backup") has worked well for us, since we're not doing a huge number of queries.
- Nican 7y agoThank you! That is useful information. I will take a closer look at Percona in the future.
- muffelsong 7y agoI concur, but consider ProxySQL instead of HAProxy. Percona with XtraDB/Galera failover fronted by ProxySQL is very resilient and performant.
- candiddevmike 7y agoIs your app that critical to warrant that kind of architecture? I would wager the majority of apps people interact with use a single node database that routinely goes down for maintenance or something else.
- rbjorklin 7y agoI have an open PR for Postgres replication handled through repmgr that has been working well enough: https://github.com/ANXS/postgresql/pull/424 https://github.com/ANXS/postgresql/pull/424