recentpopularlog in


« earlier   
PostgreSQL Features You May Not Have Tried But Should - pgDash
Use postgres native pubsub/topic messaging, table inheritance, table partitioning, triggers, full text search, etc. Great examples.
database  postgresql  tips  notification 
yesterday by Tknvbe
PostgreSQL + ZFS Best Practices and Standard Procedures
Best practices and suggestions to run psql on ZFS
postgresql  zfs 
2 days ago by orange
MySQL High Availability at GitHub | Hacker News
Am I mistaken or it seems to me that promoting a slave to a master is kind of fragile operation(detecting that it did really fail). I mean there are more robust methods:
1. There is a bookkeeper cluster providing replicated log. (No Kafka! Hold on a second, move to 4)

2. All nodes of a single MySQL cluster have a service on them that has two responsibilities: 1. accepting writes. 2. following the log. MySQL service only serves reads. Write will be performed indirectly from the writer service which is running besides MySQL service.

3. Bookkeeper (and DistributedLog on top of it) enforces single writer. So essentially one node is appending to log, the others are following it.

4. Whenever one of slaves thinks master is failed (or maybe partially-failed), it issues a FENCE request to bookkeeper, which either stops current master from appending to log, or fails to get majority vote from bookkeeper nodes. In either way log stays consistent. (There exist no two masters at a single point in time)

5. If one slave is able to fence the current master, it just notifies service discovery component to redirect clients. This operation doesn't have to happen atomically. Since old master is fenced and it can't append to log, anyway. So client operation will be safely rejected.

This approach can convert any data store to a consistent, highly available store. It is even capable of running multiple databases grouped as one cluster. Replicated log is a separate module. It is possible to replicate from MongoDB to SQL Server as an example. It has the advantage that, you don't have to adopt any untested databases. Just use good old MySQL/PG/...

I understand that, it requires quite a lot of work to refactor already running infrastructure. But it is more robust and somewhat safer. Bookkeeper's built-in fence mechanism precludes any random writes from any partially failed master.
scaling  architecture  mysql  postgresql  database  high-availability 
2 days ago by hellsten

Copy this bookmark:

to read