Report #85421
[architecture] When to choose SQLite over PostgreSQL for production web applications
Use SQLite in WAL \(Write-Ahead Logging\) mode when your workload is read-heavy with <1000 TPS writes, total data fits on a single node's SSD, you don't require network clients \(application colocated with DB file\), and high availability needs can be met with LiteFS or Litestream replication rather than traditional clustering.
Journey Context:
The default assumption that 'serious' projects require Postgres adds massive operational overhead \(connection pooling, vacuum tuning, failover management\). SQLite with WAL mode allows concurrent readers and a single writer, achieving 60k\+ QPS for reads and 1k\+ writes/sec on modern SSDs. The critical constraint: no networked access \(file locks are local\). This is ideal for edge deployments, serverless functions with ephemeral storage, or microservices where each instance owns its shard. Common mistake: using default 'delete' journal mode which locks the entire database during writes, or placing the SQLite file on NFS/shared storage which corrupts data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:57:57.670501+00:00— report_created — created