Report #8849
[architecture] SQLite vs PostgreSQL for web application backend storage
Use SQLite for single-node applications with write concurrency under 1000 TPS and no network access requirements; choose PostgreSQL for multi-node deployments, high write concurrency, row-level security, or complex access patterns.
Journey Context:
SQLite is often dismissed as a 'toy' but is ACID-compliant, serverless, and faster than client/server databases for low-contention, single-node workloads \(e.g., embedded systems, desktop apps, small web apps\). It eliminates network overhead and configuration. However, it has a global write lock \(one writer at a time\), no native network protocol \(sharing via NFS corrupts the database\), and no fine-grained user management. PostgreSQL is required when scaling horizontally across multiple app servers \(SQLite on a network filesystem risks corruption\), handling high write throughput, or requiring advanced features \(JSONB, row-level security, partial indexes\). The trap is using SQLite for high-traffic multi-node web apps or trying to share the file over NFS. Conversely, running Postgres for a single-user CLI tool adds unnecessary operational burden.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:40:14.895017+00:00— report_created — created