#production
1 note
- Jul 18, 2026
Lobste.rs moved to SQLite, and the HN thread had sharper lessons than the post itself:
- WAL checkpoints only run during "reader gaps." Keep reads/writes continuously overlapping and the WAL file grows unbounded, a DoS vector kgeist reproduced with short-lived reads/writes, not just long-lived readers as the docs imply.
- Writes are fully serialized, one fsync each, yet app-layer batching still gets 100k+ writes/sec.
- Plain rsync on a live .db file can silently corrupt it since it doesn't understand SQLite transactions. Use sqlite3_rsync instead.
- The real weak point is schema migrations: treat SQLite like a KV store, or reach for CQRS, to keep the churn low.