← Back to articles

Turso vs Neon vs D1: Best Edge Database (2026)

Traditional databases live in one region. Your users live everywhere. Edge databases solve this — putting data closer to users for sub-10ms reads. Here's how the three leaders compare.

Quick Verdict

TursoNeonCloudflare D1
EnginelibSQL (SQLite fork)PostgreSQLSQLite
Best forMulti-region reads, embeddedServerless Postgres, branchingCloudflare Workers apps
Latency⚡ <5ms reads (edge replicas)🟡 50-100ms (single region)⚡ <5ms reads (edge)
Global replication✅ Multi-region replicas🟡 Read replicas (limited)✅ Automatic
SQL compatibilitySQLite⚡ Full PostgreSQLSQLite
Free tier9GB, 500 DBs0.5GB, branching5GB, 100K reads/day
Pricing$29/mo (Scaler)$19/mo (Launch)$5/mo (Workers paid)
EcosystemGrowing⚡ Huge (Postgres)Cloudflare only

The Edge Database Concept

Traditional (single region):
  User in Tokyo → request to US-East server → 200ms network latency
  → database query 5ms → response back 200ms
  Total: ~405ms

Edge database:
  User in Tokyo → request to Tokyo edge → local database replica 2ms
  → response from Tokyo → 5ms
  Total: ~7ms

That's 58x faster for reads.

Turso: SQLite at the Edge

Turso distributes SQLite databases across the globe:

import { createClient } from '@libsql/client'

const db = createClient({
  url: 'libsql://my-db-myorg.turso.io',
  authToken: process.env.TURSO_AUTH_TOKEN,
})

// Same SQLite syntax you know
const result = await db.execute({
  sql: 'SELECT * FROM users WHERE email = ?',
  args: ['alice@example.com'],
})

How Turso's Replication Works

Primary database (one region, e.g., US-East)
  ↓ Writes replicate automatically
Replicas (multiple regions):
  → US-West
  → EU-Frankfurt
  → Asia-Tokyo
  → Australia-Sydney

Reads: Served from nearest replica (<5ms)
Writes: Go to primary, then replicate (~50-200ms)

Why Teams Choose Turso

  • Embedded SQLite: Same engine used by billions of devices
  • Multi-region reads: Data close to every user
  • 500 databases on free tier: Database-per-tenant architecture
  • Drizzle ORM support: First-class TypeScript ORM integration
  • Embedded replicas: Run a local SQLite copy in your app for 0ms reads
  • Cheap: $29/mo for serious usage

Turso Limitations

  • SQLite, not Postgres: No JSON operators, fewer extensions, simpler type system
  • Write latency: Writes go to primary (can be 50-200ms from far regions)
  • Newer ecosystem: Fewer tools than PostgreSQL
  • Schema migrations: Less tooling than Postgres (Drizzle helps)

Neon: Serverless PostgreSQL

Neon brings full PostgreSQL with serverless scaling:

import { neon } from '@neondatabase/serverless'

const sql = neon(process.env.DATABASE_URL)

// Full PostgreSQL — JSONB, CTEs, window functions, everything
const users = await sql`
  SELECT u.*, 
    json_agg(json_build_object('id', p.id, 'title', p.title)) as posts
  FROM users u
  LEFT JOIN posts p ON p.user_id = u.id
  WHERE u.created_at > NOW() - INTERVAL '30 days'
  GROUP BY u.id
  ORDER BY u.created_at DESC
`

What Makes Neon Special

Database branching:

Production database
  ├── Branch: feature/new-checkout (full copy, instant)
  ├── Branch: staging (auto-refreshed nightly)
  └── Branch: dev/alice (personal dev environment)

Branches are copy-on-write — instant creation, minimal storage cost.

Scale to zero:

No queries? → Neon suspends the compute → $0
First query? → Neon wakes up in ~500ms → serving

Why Teams Choose Neon

  • Full PostgreSQL: Every extension, every feature, full compatibility
  • Branching: Game-changer for development workflows
  • Scale to zero: Pay nothing when not in use
  • Serverless driver: Works in edge runtimes (Vercel, Cloudflare)
  • Huge ecosystem: Every Postgres tool works (pgAdmin, Prisma, Drizzle, etc.)
  • Generous free tier: 0.5GB storage, branching included

Neon Limitations

  • Single region primary: Not truly edge-distributed (reads still go to one region)
  • Cold start: ~500ms wake from suspended state
  • Not edge-native: Serverless, yes. Edge-replicated, not yet (read replicas are newer)
  • Cost at scale: Can get expensive with high compute usage

Cloudflare D1: Native Edge SQLite

D1 is Cloudflare's SQLite database, deeply integrated with Workers:

// Cloudflare Worker
export default {
  async fetch(request, env) {
    const { results } = await env.DB.prepare(
      'SELECT * FROM products WHERE category = ?'
    ).bind('electronics').all()
    
    return Response.json(results)
  }
}

Why Teams Choose D1

  • Zero latency in Workers: Database and code run in the same location
  • Automatic replication: Data replicated across Cloudflare's 330+ PoPs
  • Dead simple: SQLite — the most widely deployed database engine
  • Cloudflare integration: Works with Workers, Pages, KV, R2 seamlessly
  • Cheap: Included with Workers paid plan ($5/mo)

D1 Limitations

  • Cloudflare lock-in: Only works within Cloudflare's ecosystem
  • SQLite limitations: No stored procedures, limited concurrent writes
  • Size limits: 10GB per database (free), larger on paid
  • Still maturing: Fewer features than Turso or Neon
  • Write performance: Single-writer model (SQLite limitation)

Decision Framework

Choose Turso When

  • Need multi-region low-latency reads
  • Building multi-tenant (database-per-tenant) architecture
  • SQLite is sufficient for your data model
  • Want embedded replicas for zero-latency reads
  • Using any hosting platform (not locked to Cloudflare)

Choose Neon When

  • Need full PostgreSQL (JSONB, extensions, complex queries)
  • Database branching matters for your workflow
  • Existing PostgreSQL codebase to migrate
  • Scale-to-zero for development/staging databases
  • Don't need sub-10ms global reads (single region is acceptable)

Choose D1 When

  • Already building on Cloudflare Workers
  • Want the simplest possible setup
  • Application is relatively simple (SQLite is sufficient)
  • Cost is the primary concern
  • Cloudflare ecosystem integration is important

FAQ

Can I use Neon at the edge?

Neon's serverless driver works in edge runtimes, but the database is still in one region. Latency is better than traditional Postgres connections but not as fast as Turso/D1 edge replicas.

Is SQLite good enough for production?

Yes — SQLite handles millions of reads per second. The limitation is write concurrency (one writer at a time). For read-heavy apps (most web apps), SQLite is excellent.

Can I migrate between these?

Turso ↔ D1: Both use SQLite, migration is straightforward. Either → Neon: Requires schema adjustments (SQLite → Postgres differences). Neon → either: Possible but you'll lose Postgres-specific features.

Which is cheapest at scale?

D1 (included in Cloudflare Workers $5/mo). Turso is next ($29/mo for generous limits). Neon can get expensive with high compute.

Bottom Line

Turso for multi-region read performance on any platform. Neon when you need full PostgreSQL power with serverless scaling. D1 for the simplest, cheapest option within Cloudflare's ecosystem.

Our pick: Turso for edge-first apps, Neon for PostgreSQL-dependent workloads.

Get AI tool guides in your inbox

Weekly deep-dives on the best AI coding tools, automation platforms, and productivity software.