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
π Would reach for it
RileyThe MinimalistβOne server, one file, backups by cron and cp: the fewest moving parts a database can have.β
ChrisThe SovereignβA database he can inspect, copy and own outright, on a $40 server, with nothing to page anyone.β
MayaThe VisionaryβHow we run on a $40 server hit the front page; migrate when the sales pipeline says so.β
RuthThe MaintainerβSQLite is older than most databases pitched to replace it, and better tested than all of them.β
π Would push back
PatThe Enterprise AdultβQuestion 47 asks for a high-availability cluster, and a one-sentence answer loses a $180k deal.β
HugoThe PerfectionistβNo replica, no failover, a restore tested twice: that is not how proper production databases run.β
AlexThe ArchitectβThe second server is coming, and a single-file architecture makes that day a migration under load.β
β 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.