SQLite Is Not a Toy Database
SQLite is the most deployed database in the world — it runs on every smartphone, browser, and IoT device. But the perception that it's "not for production" is outdated. In 2026, companies like Expensify, Tailscale, and Fly.io run SQLite in production serving millions of users. The key insight: SQLite eliminates network round-trips to a separate database server, making reads ~10x faster for single-server deployments.
When SQLite Excels
SQLite is the right choice for: single-server web apps (most startups), embedded applications (desktop, mobile, CLI tools), edge computing (database at each edge node), read-heavy workloads (content sites, analytics dashboards), and development/testing (zero-config local database). If your app runs on one server and handles fewer than 100 write transactions per second, SQLite likely outperforms PostgreSQL.
WAL Mode: Concurrent Reads and Writes
SQLite's historical limitation was single-writer locking. WAL (Write-Ahead Logging) mode solves this: readers don't block writers, writers don't block readers. Enable it with PRAGMA journal_mode=WAL. You still have a single writer at a time, but writes are fast (typically <1ms) and readers continue unblocked. For most web apps, this is more than sufficient.
Replication and Backup
Litestream continuously replicates your SQLite database to S3-compatible storage — providing point-in-time recovery and disaster protection. LiteFS (by Fly.io) enables multi-node replication with a primary writer and read replicas. These tools solve the "but what about backups?" concern that historically kept SQLite out of production.
Turso and libSQL: SQLite at the Edge
Turso builds on libSQL (an open fork of SQLite) to provide edge replication — your database runs at the edge node closest to each user with automatic sync to a primary. This combines SQLite's zero-latency local reads with global distribution. It's a compelling alternative to traditional client-server databases for latency-sensitive applications.
When NOT to Use SQLite
Don't use SQLite for: applications requiring multiple simultaneous writers at high throughput, multi-server deployments without edge replication, applications needing advanced PostgreSQL features (JSONB operators, full-text search ranking, PostGIS), or when your ORM (Prisma, Drizzle) has poor SQLite support compared to PostgreSQL.
Production Setup Tips
Enable WAL mode. Set PRAGMA busy_timeout=5000 to retry on write locks. Use PRAGMA synchronous=NORMAL for a balance of durability and speed. Run PRAGMA optimize periodically. Place the database file on fast local storage (SSD), not network-attached volumes. Monitor file size with PRAGMA page_count * PRAGMA page_size.
Conclusion
SQLite in production is not just viable — it's often the optimal choice for single-server applications, embedded systems, and edge deployments. With WAL mode, Litestream for backups, and Turso for edge distribution, the tooling is mature. Don't default to PostgreSQL out of habit — evaluate whether SQLite's simplicity and performance benefits fit your use case.