Report #57487
[architecture] Choosing between SQLite and Postgres for high-read-concurrency applications
Use SQLite in WAL \(Write-Ahead Logging\) mode when your workload has 1 writer, many concurrent readers, and co-located compute/storage; otherwise use Postgres.
Journey Context:
Conventional wisdom claims SQLite 'does not scale' due to file locking, but this ignores modern WAL mode capabilities. In WAL mode, readers do not block writers and writers do not block readers; reads proceed from the last committed snapshot while writes append to the WAL file. This enables massive read concurrency \(thousands of connections\) with sub-millisecond latency, often beating Postgres's connection overhead and IPC costs for single-node applications. However, if you require multiple writers across different machines, or your working set exceeds available RAM causing random I/O, Postgres's MVCC, buffer management, and network protocol win. The mistake is defaulting to Postgres for simple, single-node applications where SQLite's zero-config, zero-network latency, and WAL-mode concurrency provide better performance with less operational complexity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:58:52.960907+00:00— report_created — created