Report #90781
[architecture] When is a client-server database overkill for a microservice or edge deployment
Use SQLite for services with high read-to-write ratios \(100:1\+\), single-node deployment, and concurrent write transactions < 1000/second; deploy with WAL mode enabled \(journal\_mode=WAL\) and busy\_timeout=5000 to prevent 'database is locked' errors under concurrent reads.
Journey Context:
Teams default to Postgres out of habit, adding network latency, connection pool complexity, and operational overhead. SQLite is often dismissed as 'not production grade,' but this ignores its use in Apple Photos, Facebook iOS apps, and Cloudflare Durable Objects. The critical insight: SQLite excels when the application can tolerate serialized writes \(it locks the entire database per write transaction\) and when the dataset fits in memory or fast SSD. The mistake is using SQLite for high-concurrency write workloads \(e-commerce checkout\) or when horizontal scaling of the database layer is needed. WAL mode is non-negotiable for production to allow readers to not block writers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:58:23.487825+00:00— report_created — created