Turso vs Neon vs D1: serverless database 2026
3 serverless DB dengan pendekatan berbeda. Turso = SQLite distributed. Neon = Postgres branching. D1 = SQLite edge. Saya tes ketiganya untuk klien SMB.
TL;DR
- Turso: SQLite distributed multi-region. Recommended untuk read-heavy SaaS.
- Neon: Postgres dengan branching. Recommended untuk write-heavy SaaS atau yang butuh Postgres features.
- D1: SQLite native di Cloudflare. Conditional — masih ada gotcha untuk write workload.
Konteks tes
3 klien project:
- Klinik dental SaaS: D1 (lock-in dengan Workers stack)
- Fotograf billing: Neon (butuh Postgres trigger + JSON)
- Marketing site dengan dynamic data: Turso (read-heavy)
Turso
Apa itu
SQLite-based distributed database. Compatible dengan SQLite, deploy multi-region edge.
Pricing (Mei 2026)
- Starter: free — 5 DB, 1GB total, 500M row reads/bulan, 10M row writes
- Scaler: $29/bulan — 10GB, 2.5B reads, 25M writes
- Business: $99/bulan — 100GB, lebih dari Scaler
Pro
- SQLite syntax familiar (similar to SQLite)
- Multi-region replicas: setup 1-click
- Embedded replicas: SQLite di laptop dev / mobile sync to cloud
- Pricing transparent + reasonable untuk SMB
Con
- SQLite limit: complex JSON query terbatas (vs Postgres
jsonb) - Tidak ada full-text search yang sekuat Postgres
- Branching feature kurang mature (vs Neon)
- Community Indonesia kecil (most docs English)
Pengalaman
Untuk marketing site klien e-commerce (read-heavy directory of 8K products): Turso menang setup smooth, replicas Indonesia (Singapore + Jakarta planned), query latency 5-15ms dari Jakarta.
Saving vs Postgres: 30-40% dalam cost untuk traffic 100K page view/bulan.
Neon
Apa itu
Serverless Postgres dengan branching, autoscale, scale-to-zero.
Pricing (Mei 2026)
- Free: 0.5GB storage, 1 project, 7-day point-in-time recovery
- Launch: $19/bulan — 10GB storage, 5 projects, 30-day PITR
- Scale: $69/bulan — 50GB, unlimited projects
Pro
- Full Postgres features (JSON, full-text search, extensions, triggers, materialized views)
- Branching: create database branch like Git, isolate tests
- Autoscale: handle traffic spike
- Compatible dengan all Postgres tooling (Drizzle, Prisma, pg, psql)
Con
- Cold start: free tier scale-to-zero, first query setelah idle 1-2 detik
- Latency dari Indonesia: provider region Asia-Pacific Singapore, latency 80-120ms
- Pricing scale dengan compute + storage
- Limited region: tidak ada Indonesia direct
Pengalaman
Untuk SaaS billing fotograf (transactional, butuh ACID + complex JOIN): Neon adalah pick. Postgres triggers handle subscription state, JSON column untuk metadata customer.
Cold start latency hampir tidak issue setelah user warm up (first request ke dashboard yang slow, subsequent OK).
Cloudflare D1
Apa itu
SQLite-based serverless database, native di Cloudflare Workers ecosystem.
Pricing (Mei 2026)
- Free (Workers Free): 1 DB, 5GB storage, 5M row reads/hari
- Workers Paid ($5/bulan): 25 DB, 100GB storage, 25B row reads/bulan, 50M writes
Pro
- Distributed read at edge: query dari Jakarta = read dari Jakarta PoP
- Pricing very reasonable: $5/bulan untuk most SMB
- Native integration Cloudflare Workers
- Scale otomatis
Con
- Write performance: semua write route ke primary region
- Limit query timeout 30 detik
- Schema migration tooling developing
- Limited compared to Postgres (no triggers, no full-text search yang advanced)
- D1 client API less mature dari Drizzle/Prisma untuk Postgres
Pengalaman
Untuk klinik dental SaaS (Workers-first stack, read-heavy untuk patient listing + appointment): D1 work great.
Read latency dari Jakarta: 5-12ms (vs Postgres 80-120ms). 8-10x improvement.
Write throughput acceptable untuk 200-300 write/hari (klinik appointment booking volume). Tidak akan handle 10K write/hari without optimization.
Comparison table
| Aspect | Turso | Neon | D1 |
|---|---|---|---|
| Database engine | SQLite | Postgres | SQLite |
| Free tier | Yes (decent) | Yes | Yes (within Workers free) |
| Paid entry | $29 | $19 | $5 |
| Indonesia latency | 5-15ms | 80-120ms | 5-15ms |
| Read replicas | Yes (multi-region) | Yes (paid) | Yes (edge distributed) |
| Write region | Single primary | Single primary | Single primary |
| ACID transactions | Yes | Yes (full) | Yes |
| JSON support | Basic | Excellent (jsonb) | Basic |
| Full-text search | Basic (FTS5) | Excellent | Basic |
| Triggers | Yes (SQLite-level) | Yes (full) | Limited |
| Branching | No | Yes (native) | No |
| Drizzle/Prisma | Yes | Yes | Yes (Drizzle), Limited (Prisma) |
Decision matrix
| Use case | Recommended |
|---|---|
| Read-heavy SaaS, simple schema | Turso atau D1 |
| Read-heavy + Indonesia latency critical | D1 (or Turso kalau need multi-region beyond CF) |
| Write-heavy, complex schema | Neon |
| Need Postgres features (JSON, FTS, triggers) | Neon |
| Cloudflare Workers stack (lock-in OK) | D1 |
| Budget < $10/bulan | D1 atau Turso free |
| Need branching for staging/test | Neon |
| Migration from existing Postgres app | Neon |
| Edge-first architecture | D1 atau Turso |
Konteks Indonesia
Untuk SMB Indonesia 2026, latency adalah faktor signifikan. D1 dan Turso menang karena ada PoP Asia atau edge replicas.
Untuk SMB yang butuh Postgres features specifically (complex JOIN, triggers, JSON yang kompleks), Neon worth premium latency.
Migration
Postgres → Turso
Schema mostly compatible, butuh adjust:
- Datatype:
serial→integer primary key autoincrement - JSON: native vs
jsonb(limited functionality) - Trigger: SQLite trigger syntax different
Time: 4-8 jam untuk medium schema (10-15 tables).
Postgres → D1
Similar to Turso. SQLite compatible.
Turso → D1 (atau sebaliknya)
Trivial — both SQLite. Hampir 1-1 schema migration.
Yang surprising
D1 untuk write-heavy ternyata acceptable untuk SMB scale. Saya thought “write akan jadi bottleneck karena single primary region”, tapi reality:
- SMB klinik: 200-300 write/hari = 0.003 write/detik average
- D1 handle ~1000 write/detik primary region
- 300K x headroom
Bottleneck biasanya bukan database — biasanya API server logic atau external API call.
Verdict
Conditional Recommend semua tiga, depend on shape:
- Default SMB Indonesia read-heavy: D1 (kalau pakai Workers) atau Turso (kalau pakai non-CF)
- Postgres feature needed: Neon
- Budget < $10/bulan: D1 ($5/bulan)
- Multi-region beyond Cloudflare: Turso
Hindari:
- D1 untuk schema yang heavily depend pada triggers / FTS / complex JSON
- Neon untuk read-heavy SaaS yang customer mostly Indonesia (latency)
- Turso kalau Anda butuh Postgres-specific features
Untuk stack non-teknis SMB klien: setup Meta Business Suite untuk SMB.
Ditulis oleh Asti Larasati