~/writing
Writing
Notes on systems, databases and performance. Mostly things I broke first, then fixed properly.
- I wrote Raft from scratch and spent a month losing electionsA three-node cluster that changed leaders every 90 seconds, and the one-line bug behind it.
- A 40% CPU regression, found with perf and one bad assumptionThe faster hash function was slower. Here's how perf proved it in about twenty minutes.
- What VACUUM taught me about batching writesPostgres's janitor is a design review for your write path, if you bother to read its complaints.