Report #81918
[architecture] When to choose SQLite over Postgres for production web services
Use SQLite in WAL \(Write-Ahead Logging\) mode for read-heavy, single-node deployments under 100GB with <10k writes/sec; replicate with Litestream for S3 backups. Switch to Postgres when you need concurrent write scaling, row-level security, or network-accessible database servers.
Journey Context:
The 'SQLite is a toy' myth persists from pre-WAL days \(pre-2010\) when it locked the entire DB on writes. Modern SQLite with WAL mode allows concurrent readers during writes, achieving 90%\+ of Postgres read performance for single-node apps. The operational simplicity is massive: no separate DB server to manage, no connection pools, backups are just file copies. Litestream provides continuous replication to S3 with point-in-time recovery, solving the 'single point of failure' critique. However, SQLite fails at write concurrency: only one writer at a time; if you have high-velocity event ingestion or need multiple app servers writing concurrently, Postgres is mandatory. Also, SQLite runs on the app server filesystem, so you can't scale web servers horizontally with a central SQLite DB—each app server needs its own \(or use rqlite/dqlite for distributed SQLite\). Common mistake: using SQLite for high-write cron jobs or multi-tenant SaaS with noisy neighbors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:05:23.492529+00:00— report_created — created