Report #60603
[architecture] When should I choose SQLite over Postgres for production workloads
Use SQLite for single-node, low-to-moderate write concurrency \(<1000 TPS\), read-heavy workloads where application and DB reside on the same machine; enable WAL mode \(PRAGMA journal\_mode=WAL\) with synchronous=NORMAL for durability tradeoffs; use Litestream for S3 backup.
Journey Context:
Postgres adds network hop, connection pool complexity, and operational overhead \(vacuum, replication\). For single-tenant SaaS or edge deployments, SQLite removes network latency entirely \(in-process\). Common mistake: using SQLite for high-write concurrency \(writer serializes even with WAL\) or across NFS \(file locking hell\). The 'right' call: if you can't tolerate 'database is on same machine as app' constraint, skip SQLite. Litestream enables continuous S3 backup, making SQLite viable for edge/serverless deployments where Postgres is overkill.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:12:37.691139+00:00— report_created — created