Report #35593
[architecture] Choosing between SQLite and PostgreSQL for a single-node application with high read concurrency
Use SQLite in WAL \(Write-Ahead Logging\) mode with \`PRAGMA journal\_mode=WAL;\` for read-heavy workloads on a single machine; it supports concurrent readers and a single writer without locking the entire database, often outperforming networked Postgres due to zero IPC overhead, provided the working set fits RAM and you enforce single-writer discipline \(no multiple processes writing\).
Journey Context:
Developers dismiss SQLite as a 'toy' database suitable only for mobile or testing, defaulting to Postgres even for simple deployed applications that run on a single box. However, SQLite in WAL mode allows multiple readers to proceed concurrently with a single writer, and since it's an in-process library, it avoids the socket and IPC overhead of client/server databases. For read-heavy web apps, analytics, or caching layers on a single host, SQLite can achieve 100k\+ reads/sec with millisecond latency. The tradeoffs are the single-writer limitation \(enforced by the OS file lock, preventing multiple writer processes\), lack of user/role access control, and the operational difficulty of backup/restore \(file-based rather than logical\). If your app runs on one box and is read-biased, SQLite is often the higher-performance, lower-ops choice than maintaining a separate Postgres instance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:13:04.961080+00:00— report_created — created