SQLite was always the world's most deployed database (every phone, every browser). Now it is becoming a serious choice for web application backends, powered by new platforms and the edge computing movement.
What Changed
Three developments transformed SQLite from "embedded-only" to "web-ready":
- Turso (libSQL): A fork of SQLite with server mode, replication, and multi-tenancy
- LiteFS by Fly.io: Distributed SQLite with automatic replication across regions
- Cloudflare D1: SQLite at the edge, integrated with Cloudflare Workers
Why SQLite for Web Apps?
Zero latency: The database runs on the same machine as your application. No network round trip to a database server. Queries return in microseconds, not milliseconds.
Simplicity: No database server to manage, no connection pooling, no database cluster maintenance.
Cost: A SQLite file on disk costs nothing beyond storage. No per-connection pricing.
Edge deployment: Deploy your application and database together to 300+ locations globally.
Performance Numbers
| Operation | PostgreSQL (same region) | SQLite (same machine) |
|---|---|---|
| Simple query | 1-5ms | 0.01-0.05ms |
| Complex join | 5-20ms | 0.1-1ms |
| Write | 2-10ms | 0.05-0.5ms |
| Connection overhead | 5-50ms (first query) | 0ms |
Real-World Adoption
- Basecamp/Hey: 37signals moved to SQLite for Campfire
- Tailscale: Uses SQLite for coordination database
- Cloudflare: D1 powers millions of edge applications
- Turso: Used by Drizzle ORM projects, Astro DB
- Litestream: Continuous replication to S3 for backups
When SQLite Works for Web Apps
- Read-heavy workloads: Content sites, dashboards, API backends
- Single-region deployments: One server, one database file
- Edge applications: Database lives next to the compute
- Per-tenant databases: Each customer gets their own SQLite file
- Embedded analytics: Fast local queries without external service
When SQLite Does Not Work
- High write concurrency: Write-ahead logging helps but has limits
- Multi-writer scenarios: Only one writer at a time
- Complex replication: PostgreSQL's replication is more mature
- Full-text search at scale: PostgreSQL's text search is more capable
- JSON queries at scale: PostgreSQL's JSONB is more optimized
Implications for Businesses
The SQLite renaissance means simpler, cheaper, faster applications. For read-heavy use cases (most websites, content platforms, dashboards), deploying SQLite at the edge provides sub-millisecond database queries globally without managing database infrastructure.
This is particularly relevant for businesses serving global audiences where database latency directly impacts user experience.