← The field guide

SPECIMEN No. 024 Β· Database heresy

SQLite in Production

A file that is also a database that is also, it turns out, a production architecture.

πŸ“ˆ Resurgent
🏠 Habitat
Single-server apps and the blog posts about them
🦈 Natural predator
The second server
πŸ€’ Common symptom
Just copy the file

βœ… GOOD FIT

  • Single-server apps with a modest write load
  • Read-heavy sites, internal tools and early products
  • Teams wanting a database they can copy and inspect

🚩 TOO FAR

  • A $180k deal asks about high availability, answered with cp
  • The second server arrives and the migration happens under load
  • Backups are a cron job and the restore was tested twice

🎯 SWEET SPOT

Super Reasonable

Run SQLite on one server with WAL mode, continuous replication to object storage and a restore drill every month. Keep the data layer behind a thin interface, and plan the Postgres move when sales or a second server need it.

IN THE WILD

No sighting yet

This species has been catalogued but not yet observed in a comic. It is on the backlog.