Report #66152
[architecture] when to choose SQLite over PostgreSQL for web application database
Use SQLite for read-heavy, low-concurrency \(<1000 writes/sec\), single-tenant applications where the app and database run on the same machine; use PostgreSQL for concurrent network access, strict durability, or horizontal scaling requirements
Journey Context:
SQLite is often dismissed as a 'toy' database, but it outperforms client-server databases for read-heavy workloads due to in-process execution \(no IPC overhead\) and zero-configuration deployment. It supports WAL mode for concurrent reads during writes, but has a global write lock limiting throughput. PostgreSQL requires a separate server process, connection pooling, and operational overhead, but offers row-level locking, rich indexing, network access control, and point-in-time recovery. The decision pivot is concurrency: SQLite handles 1000s of connections but only one writer at a time; it excels for embedded devices, local-first apps, or small web apps with Litestream for S3 backup. Choose Postgres when you need multi-tenant isolation, complex queries, or strict serializability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:30:47.068791+00:00— report_created — created