Hot/warm/cold standby, health probes, witness-quorum, STONITH, DNS/VIP failover и failback. 4 сценария: steady state, automatic failover, split-brain prevention, controlled failback.
Failover moves service responsibility from an unhealthy primary to a qualified standby. The safe sequence is detection, decision, fencing, catch-up, promotion, traffic shift, client recovery, and later failback.
They are objectives, not measured guarantees. Heartbeat interval is only one component of detection time, and replication mode is only one component of data-loss behavior.
Asynchronous streaming replication can acknowledge a commit before a standby has it, so a primary/storage loss can lose acknowledged data. Synchronous replication waits for the configured standby state, adding network/durability latency and potentially reducing write availability. State exactly what the acknowledgement means: received, written, flushed, or applied.
A DNS change alone is not fencing. A paused or partitioned old primary can continue writing even when the controller cannot see it.
Only the current ownership epoch may mutate durable state. Every side-effecting dependency that matters must reject stale epochs, or the old leader can still corrupt data outside the database.
Failback is a planned migration. Require a stability window, resynchronization, new fencing decision, and explicit routing change. Immediate automatic failback can flap traffic and multiply recovery work.
The animation covers async acknowledged-data loss, synchronous commit trade-offs, the complete failover state machine, stale-primary rejection, and deliberate failback.
Введите числа или выберите пресет