One server is one disk, one power supply and one kernel. When any of them dies, your app stops taking orders. Every engine fixes this the same way: keep a second copy up to date, and have a way to decide which copy takes the writes. This page is the map. Each engine's own chapter has the details and the commands.
The primary already writes every change to a log before it touches the data files. The copy reads that log and replays it. The only question is how far behind it is.
Not the primary itself, and not one replica on its own. Something that can count votes: etcd for Patroni, the group in InnoDB Cluster, the replica set election, or Orchestrator watching from outside.
Anything the primary said yes to that the copy had not received yet. Unless the commit waited for the copy. That wait is the price, and what a commit waits for shows it engine by engine.
The symptoms playbooks cover replica lag and a failover that did not happen. The hands-on labs break a real Patroni cluster for you to fix. The DBA agent can run a planned switchover, and asks before each change.
How do databases actually work? From one row on disk to transactions: the words you need, PostgreSQL, MySQL and MongoDB from the files up, then Redis, Cassandra and vector search, side by side, and the query and concurrency traps.