Skip to content
All articles
Articlesqlitetursoedgedatabases

SQLite at the Edge in 2026: Turso, libSQL, D1, and the Renaissance

Why SQLite is suddenly winning workloads that used to belong to Postgres. Turso, libSQL, Cloudflare D1 explained, when to pick each, and the limits to know about.

12 min read

SQLite was always the "just for local dev" database. In 2026 it's genuinely competing for production workloads against Postgres, MongoDB, and DynamoDB. The reason isn't that SQLite got bigger; it's that the world realised most workloads were smaller than they pretended to be.

Here's where SQLite actually fits in 2026, what Turso / libSQL / D1 added, and the limits that still matter.

Why SQLite is having a moment

Three threads converged:

  1. Edge compute made "run the database on the same box as the function" viable. SQLite is the only mature database that runs in 10MB of memory and starts in microseconds.
  2. The serverless connection problem burned everyone enough times that "no connection" (just an in-process file or HTTP-based API) started looking attractive.
  3. Replication finally became a solved problem for SQLite in 2023 (Litestream, then LiteFS, then libSQL). Suddenly SQLite could be replicated, backed up continuously, and distributed across regions.

The result: a class of workloads that used to need Postgres now runs perfectly on SQLite-shaped systems.

What actually changed in 2023-2026

libSQL (open-source SQLite fork)

Turso shipped libSQL in 2023 as a community-maintained fork of SQLite with the features SQLite chooses not to add: native HTTP access, embedded replicas, server-side functions. By 2025 it was the de facto choice for "SQLite as a service".

Litestream and LiteFS for self-hosters

Ben Johnson's tools that backed up SQLite continuously to S3 (Litestream) and replicated SQLite across nodes (LiteFS) changed what was operationally possible. Even if you don't use them directly, the tooling pushed the conversation forward.

sqlite-vec, sqlite-vss, and friends

Vector search extensions matured. sqlite-vec in particular is fast enough that small-scale RAG on SQLite is viable. For per-user-database architectures, this is significant.

Production replication patterns

The shape that won: a primary database (write path) plus embedded replicas everywhere else (read path). Reads happen locally with no network call; writes round-trip to the primary. For read-heavy apps with strong consistency tolerance, this is a quiet revolution.

Turso and libSQL

Turso is a managed libSQL platform with a generous free tier and a strong per-database isolation story. The headline feature: you can create thousands of databases per account. Each one is genuinely a separate SQLite file (logically) with its own RLS-equivalent isolation.

What Turso gets right:

  • Database-per-user as a pricing tier. For consumer apps where each user's data is isolated, Turso's economics are unbeatable.
  • Embedded replicas. Your app holds a local replica synced from the primary; reads are local SQLite (microseconds); writes go remote (millis).
  • Branching. Like Neon for SQLite. Preview environments get their own database fork.

What to know going in:

  • Write concurrency per database is still SQLite-bounded. Two writers contending on one database serialise.
  • ACID transactions still work, but distributed transactions across many databases are not Turso's model. Design around it.
  • The libSQL TypeScript client is well-typed but doesn't have the corpus depth that postgres-js or Prisma do.

Cloudflare D1

D1 is Cloudflare's SQLite-on-the-edge offering, bundled with their Workers platform. The pitch: if your compute already lives on Cloudflare, your database can live in the same data centre as the request.

What D1 gets right:

  • Latency floor at the edge is hard to beat. Single-digit milliseconds from any region.
  • Tight Workers integration: bindings, no connection strings, no IAM dance.
  • Generous free tier; pricing scales smoothly.

What to know:

  • D1 is most attractive when the rest of your stack is on Cloudflare. If you're running on Vercel or AWS, the cross-cloud round-trip cost cancels most of D1's edge benefit.
  • Write throughput per database is limited. D1 is read-optimised.
  • Migrations are functional but less mature than Drizzle Kit on Postgres.

The limits that haven't gone away

SQLite is good at a lot of things. It is not magic.

  • One writer at a time per database. Concurrent writes serialise. Workloads where many clients write the same database at once (chat apps with hot rooms, ad-tech ingestion) still want Postgres.
  • No real row-level security. SQLite doesn't have RLS. Turso's database-per-tenant model is the workaround.
  • Smaller extension ecosystem. There's no libSQL equivalent of pg_partman or PostGIS at parity.
  • No native server-side aggregates across many databases. If you need analytics across thousands of per-user databases, you'll be writing a sidecar pipeline.

When SQLite wins

Concrete workloads where we'd pick a SQLite-shaped database over Postgres in 2026:

  • Notes apps, personal CRMs, agent-per-user products: per-user isolation + low write rate per user. Turso owns this.
  • Documentation sites + read-heavy CMS: embedded replicas + microsecond reads. Local-first for static-leaning sites.
  • Edge functions on Cloudflare: D1 + Workers as a stack is unbeatable for latency.
  • Desktop apps and CLIs that ship with embedded data: SQLite has been the only credible answer here for decades, and libSQL adds optional sync.
  • Test fixtures and ephemeral environments: spin-up cost is zero.

Vibe-coding with SQLite

AI agents are surprisingly good at SQLite work, partly because the corpus of SQLite code on the public internet is enormous (every SQLite tutorial ever written), and partly because the surface is small.

The patterns that work:

  • Use drizzle-orm/libsql or drizzle-orm/sqlitewith generated types. The agent reads them and produces correct queries first try.
  • Commit your schema file as the canonical source of truth. The agent reads it every turn.
  • Embed a local SQLite for tests; spin up a fresh database per test file. Agents love deterministic environments.
  • For Turso specifically, the embedded replica pattern means your agent's local dev experience and your production read path are the same code. That alignment is unique.

The SQLite renaissance is one of the more genuinely surprising platform shifts of the LLM era. A 25-year-old database, mostly unchanged at its core, is now winning workloads that the latest cloud-native systems are designed for. That's not nostalgia; it's a real architectural fit. Worth knowing where it applies.

Suparbase is an admin workspace for Supabase. Encrypted credentials, server-side proxy, RLS debugger, SQL playground, AI assistant with diff-confirmed writes. Free tier for solo projects.

Related articles