<b>Log first, apply second.</b> The write isn’t acknowledged until its record is appended and fsync’d to the WAL — so once you tell the client "ok", the change survives a crash even if it wasn’t applied yet.
<b>Sequential writes are fast.</b> Appending to one file is far cheaper than random page updates; the WAL turns scattered writes into one ordered stream.
<b>Recovery = replay.</b> On restart, re-apply every WAL record after the last checkpoint to rebuild in-memory state; idempotent apply makes double-replay safe.
<b>Checkpoint to bound growth.</b> Periodically flush the memtable to the data files, then truncate the WAL up to that point — otherwise the log grows without limit and recovery gets slow.