Turso vs Cloudflare D1: Which Serverless SQLite Database Should You Choose?

Turso vs Cloudflare D1: Which Serverless SQLite Database Should You Choose?

Noah Labhart | Technical Founder & Startup Mentor

Turso vs Cloudflare D1 is a choice between two different ways to operationalize SQLite for modern applications.

Cloudflare D1 is usually the cleaner choice for applications already built on Workers or Pages, especially when the workload is read-heavy and the team wants one integrated Cloudflare stack. Turso is usually the stronger choice when the database must work across runtimes, support database-per-tenant or database-per-agent designs, deliver local reads through embedded replicas, or handle more concurrent write activity.

Both services offer managed databases with SQLite semantics, usage-based economics and scale-to-zero characteristics. The deciding issue is not SQL syntax. It is where your application runs, how it writes, how many databases it creates and how much portability you need.

Cloudflare D1 is tightly integrated with Workers and Pages. Turso is designed to serve applications across runtimes, including local and embedded-replica deployments.

Turso vs Cloudflare D1: the quick answer

  • Choose Turso for database-per-tenant or database-per-agent architectures, write-concurrent workloads, native vector search, embedded replicas, local-first sync or runtime portability.
  • Choose Cloudflare D1 for Workers or Pages applications that benefit from a binding-based database, Cloudflare’s global network, global read replication and a consolidated vendor relationship.
  • Benchmark both when the workload is mixed. Test the same schema, indexes, write bursts, consistency requirements and user geographies instead of comparing a local demo against a production architecture.

Turso vs Cloudflare D1 comparison table

Comparison area Turso Cloudflare D1
Core product Managed SQLite-compatible database platform with cloud, embedded-replica and sync options Managed serverless database with SQLite semantics for Workers and Pages, also accessible through REST APIs and Wrangler
Best fit Multi-runtime apps, database-per-tenant or agent designs, local-first products and workloads with concurrent writes Cloudflare-native, read-heavy web applications that value low-friction integration and one operational surface
Application coupling Runtime-agnostic through HTTP and native SDKs Deepest integration is through a D1 binding in a Worker; REST and CLI access are also available
Database engine Turso Cloud offers the Turso engine and libSQL-compatible options Uses SQLite’s query engine within Cloudflare’s managed D1 architecture
Write model The Turso engine is designed for concurrent writes Each D1 database is single-threaded and processes queries one at a time; writes go to the primary
Read scaling Embedded replicas can serve reads from a local file; Turso Sync adds local reads and writes with explicit push/pull Optional global read replication serves reads from replicas; writes still go to the primary
Consistency tools Model depends on the selected engine and replication mode; embedded replicas synchronize with the primary Sessions API and bookmarks provide sequential consistency across queries in a session
Edge/local pattern Strong: local replica inside the application can serve reads without a network round trip Strong within Cloudflare’s edge platform; application code normally reaches D1 from a Worker
Database-per-tenant Paid Turso plans advertise unlimited databases, with active-database limits and enterprise options to confirm Workers Paid supports up to 50,000 databases by default, with higher limits available by request
Maximum database size Storage is plan-based rather than a published fixed 10 GB ceiling per database; confirm engine and plan limits 10 GB per database on Workers Paid and 500 MB on Free; the 10 GB per-database limit cannot be increased
Account storage Included storage and overages vary by Turso plan 1 TB maximum per paid account by default; increase may be requested
Vector search Native vector similarity search in Turso and libSQL Vector workloads use Cloudflare Vectorize as a separate product alongside D1
Branching Supports database branches for development and testing No equivalent native database-branch workflow is highlighted in D1’s core product documentation
Backup and recovery Point-in-time restore retention varies by plan Time Travel provides point-in-time recovery for 30 days on paid and 7 days on free
Import and export SQLite-compatible workflows and raw file-oriented development improve portability; validate the selected engine path Imports SQLite data via SQL dump workflow and exports with Wrangler; raw .sqlite3 files cannot be imported directly
Local development Native/embedded database patterns and SDKs support local execution Wrangler provides a local D1 environment that mirrors the production API
Billing unit Plan allowances for storage, rows read, rows written and sync, with overages on supported paid plans Rows read, rows written and stored GB; Workers Paid includes monthly allowances before overages
Free tier 100 databases, 5 GB storage, 500 million monthly row reads and 10 million monthly row writes 10 databases, 500 MB per database, 5 GB total storage, 5 million daily row reads and 100,000 daily row writes
Main tradeoff A second data-platform vendor and more architectural choices Strong platform coupling plus single-threaded per-database execution and a fixed per-database size ceiling

Published limits and prices change. Review the live pricing and limits pages before committing to an architecture.

The main difference: portable database architecture versus Cloudflare-native integration

Cloudflare D1 is part of an application platform. A Worker can access a database through a binding, so credentials, routing and service discovery largely disappear from application code. That makes D1 attractive when Workers or Pages already define the deployment model. The database, compute, CDN, object storage and AI services can live under the same provider and operational model.

Turso treats the database as an independent service that can follow the application. Teams connect through SDKs or HTTP from common runtimes, and embedded replicas can place a local database file beside the application process. This is useful for applications deployed across conventional servers, containers, edge functions, mobile clients or more than one cloud.

The tradeoff is straightforward:

  • D1 reduces integration work when Cloudflare is already the application runtime.
  • Turso reduces runtime dependence when the database needs to serve several deployment models.

Do not overvalue abstract portability. If a product is intentionally committed to Workers, D1’s coupling is an advantage. Portability matters when a team expects to run background processing elsewhere, serve latency-sensitive reads inside regional compute, support offline use, or preserve a realistic path off the platform.

Write throughput and concurrency

This is the most consequential technical difference for many teams.

Cloudflare documents that each D1 database is single-threaded and processes queries one at a time. Throughput therefore depends on query duration. Its limits page gives a rough example: a database averaging 1 millisecond per query can process about 1,000 queries per second, while a database averaging 100 milliseconds per query can process about 10. Excess concurrent work is queued, and an overloaded database can reject requests. Global read replicas improve read throughput, but writes still go to the primary.

Turso’s newer database engine is designed for concurrent writes. That does not mean every workload will automatically outperform D1. Index design, transaction size, network latency, hot rows and durability settings still shape results. It does mean Turso should be tested first when many users, agents, devices or background jobs may write to the same logical database at once.

Use a production-shaped benchmark:

  1. Import a representative schema and data volume.
  2. Replay the actual read/write ratio, including bursts.
  3. Test the slowest important query, not only primary-key lookups.
  4. Measure p50, p95 and p99 latency from the regions where code runs.
  5. Record overloads, retries, lock contention and failed transactions.
  6. Repeat with the indexes and batching strategy you would use in production.

If the design can distribute tenants across many small databases, D1’s single-threaded model may be entirely acceptable. If one database is expected to absorb a high volume of concurrent writes, Turso’s architecture is the more natural starting point.

Read latency, replication and consistency

Both platforms can reduce read latency, but they do it in different places.

Cloudflare D1 read replication

D1 can create read replicas across regions. Requests in a Session can be routed to a primary or replica while a bookmark tracks the minimum database version that later queries must observe. Cloudflare describes this as sequential consistency: each query in the session sees a version at least as recent as the previous one.

This is valuable for web sessions that need global reads without requiring every request to hit the primary. It is not the same as synchronous global replication. Replicas update asynchronously, so applications that do not use Sessions can observe lag. All writes are forwarded to the primary.

Turso embedded replicas and sync

Turso’s embedded replicas keep a local file in the application and serve reads from it. With the libSQL embedded-replica pattern, writes are sent to the cloud primary and later reflected in the local replica. Turso now recommends Turso Sync for new applications that need local reads and local writes, with explicit push() and pull() operations.

That architecture can remove a database network round trip for reads and keep an application useful during unstable connectivity. It also requires the team to define synchronization and freshness expectations deliberately.

Decision point: D1 is compelling when globally distributed web reads originate in Workers. Turso is compelling when the application process itself needs a local copy, including conventional servers and offline-capable clients.

Database-per-tenant and database-per-agent designs

Both vendors support horizontal designs built from many small databases.

Cloudflare’s paid plan supports up to 50,000 databases per account by default and says higher limits can be requested. D1’s own limits guidance describes per-user, per-tenant and per-entity designs as intended use cases. A Worker can bind to many databases, though script metadata and resource-binding limits need to be considered.

Turso’s paid plans advertise unlimited databases, while plan-specific active-database allowances and enterprise capacity still matter. Its platform API, branching and pricing shape make it a natural candidate when software creates databases programmatically for customers, agents, test branches or sessions.

For either product, ask operational questions that a headline database count does not answer:

  • How quickly can a database be created, copied, restored and deleted?
  • Can one service credential manage all tenant databases without overbroad access?
  • How are schema migrations applied across thousands of databases?
  • How are per-database metrics, backups and incidents aggregated?
  • What counts as active, billable or stored when a database is idle?
  • What quota-increase process is required before launch?

The best many-database platform is the one your team can operate safely, not simply the one with the largest published limit.

Vector search and AI applications

Turso includes vector similarity search in its database engine, allowing relational data and vector comparisons in the same SQL query. That can simplify retrieval-augmented generation, semantic search and per-agent memory when the vector set belongs naturally beside transactional data.

Cloudflare offers Vectorize as a separate vector database. D1 can store application records while Vectorize stores and queries embeddings, and a Worker joins the workflow at the application layer. This split can be beneficial when vector scale, lifecycle or pricing should be isolated from relational data. It adds another service and billing model to the architecture.

Choose based on the workload rather than the word “native.” Test filtering, metadata joins, index build time, update frequency, dimensionality, recall and p95 query latency at the expected vector count.

Pricing and total cost

Both products meter database activity in rows, but their allowances and surrounding costs differ.

Turso’s public pricing currently lists a free tier with 100 databases, 5 GB storage, 500 million monthly row reads and 10 million monthly row writes. Paid tiers increase storage, reads, writes, sync volume and point-in-time restore retention; supported tiers can add overage pricing. A row read is effectively a row scan, so an unindexed query may bill for many more rows than it returns.

Cloudflare D1 on Workers Paid currently includes 25 billion rows read, 50 million rows written and 5 GB of storage per month. Published overages are $0.001 per million rows read, $1 per million rows written and $0.75 per GB-month. The Workers plan, other Cloudflare services and Vectorize are separate cost considerations. D1’s free tier uses daily rather than monthly row allowances.

Model at least four scenarios:

  • Normal month with production traffic.
  • Peak month with a 3x traffic or write burst.
  • Inefficient month caused by a missing index or migration.
  • Growth year with more tenants, databases, stored data and regions.

Include engineering cost. D1 may remove networking and credential work inside Workers. Turso may remove a separate vector service, reduce remote-read latency through embedded replicas, or make a multi-runtime architecture easier to maintain.

Which database should you choose?

Choose Turso when

  • The application runs outside Cloudflare or across several runtimes.
  • High write concurrency is a core workload requirement.
  • You plan to create a database for each tenant, user, agent or test branch.
  • Reads should happen from an embedded local replica.
  • You need local-first synchronization or intermittent-connectivity support.
  • Native SQL vector search is preferable to operating a separate vector service.
  • Preserving SQLite-oriented portability is an architectural priority.

Choose Cloudflare D1 when

  • Workers or Pages already host the application.
  • Most database traffic is read-heavy and fits the per-database limits.
  • A Worker binding is simpler than managing a remote database connection.
  • Global read replication and Sessions match the consistency model.
  • Your team prefers one provider for compute, storage, networking and observability.
  • Time Travel and Cloudflare’s platform tooling cover the operational requirements.

Shortlist both when

  • Your workload fits comfortably below D1’s 10 GB per-database limit but may need more write concurrency later.
  • You use Workers for the request path but also run jobs or services elsewhere.
  • You are evaluating many-database architecture and need real provisioning benchmarks.
  • Total cost depends more on actual row scans and writes than on list prices.

A practical proof-of-concept scorecard

Run the same proof of concept for both products and score each test from 1 to 5.

Test What to measure Why it matters
Runtime integration Setup steps, secrets, connection management and local development Exposes the real benefit or cost of platform coupling
Write burst p95 latency, retries and failures under concurrent writes Finds single-database contention before production
Global read p95 latency and freshness from three user regions Validates the replication model, not just average speed
Tenant provisioning Create, migrate, observe, back up and delete 1,000 databases Tests database-per-tenant operations at realistic scale
Recovery Restore to a known point and verify data integrity Confirms recovery time and operator workflow
Cost model Rows scanned/written, storage, sync and adjacent services Prevents surprises from inefficient queries or separate products

Use a weighted score. If write concurrency is business-critical, it should count more than dashboard preference. If the app is permanently committed to Workers, integration should count more than theoretical portability.

Frequently asked questions

Is Turso better than Cloudflare D1?

Turso is generally better suited to multi-runtime applications, database-per-tenant or agent designs, embedded replicas, local-first sync, native vector search and concurrent writes. Cloudflare D1 is generally better suited to applications already running on Workers or Pages that want a tightly integrated serverless database. Neither is universally better.

Is Cloudflare D1 just hosted SQLite?

D1 uses SQLite’s query engine and semantics, but it is a managed Cloudflare service with bindings, HTTP and CLI access, global read replication, Sessions and Time Travel. It should be evaluated as a serverless platform database, not as a remotely mounted SQLite file.

Does Cloudflare D1 support concurrent writes?

Requests can arrive concurrently, but Cloudflare documents that each D1 database is single-threaded and processes queries one at a time. It queues excess work and can return overload errors when the queue fills. The practical ceiling depends on query duration and write behavior.

Does Turso support concurrent writes?

The Turso database engine is designed for concurrent writes. Teams should still benchmark their schema, transaction sizes and hot-row patterns because application-level contention and network latency can remain bottlenecks.

What is the Cloudflare D1 database size limit?

D1 currently limits each database to 10 GB on Workers Paid and 500 MB on Free. Cloudflare says the 10 GB per-database limit cannot be increased, though the default paid account storage limit may be increased by request.

Can Turso and D1 both support database-per-tenant architecture?

Yes. Turso’s paid plans advertise unlimited databases subject to plan and active-database conditions. D1 allows 50,000 databases per paid account by default and supports higher limits by request. Migration, monitoring and access-control operations should be tested before choosing either platform.

Which is better for vector search?

Turso includes vector similarity search inside the database, which is convenient when vectors and relational data belong together. Cloudflare uses Vectorize as a separate product that can work alongside D1. The better design depends on vector scale, filtering needs and whether service separation is desirable.

Which is cheaper, Turso or Cloudflare D1?

It depends on rows scanned, rows written, storage, sync traffic and adjacent platform services. D1 includes substantial monthly allowances on Workers Paid. Turso offers a generous free tier and paid plans with defined allowances and overages. Price the same production query trace on both.

Can I move an existing SQLite database to either platform?

Yes, but the migration paths differ. D1 imports SQL generated from a SQLite database rather than accepting a raw .sqlite3 file directly. Turso provides SQLite-compatible tools and SDKs, with details depending on whether you select the Turso engine, libSQL or a sync pattern. Test schema features and extensions before migration.

How should I evaluate Turso vs Cloudflare D1?

Use a representative schema and traffic replay. Compare runtime setup, write bursts, global read latency and freshness, multi-database operations, restore procedures and monthly cost. Make the heaviest business constraint the highest-weight score.

Conclusion

The Turso vs Cloudflare D1 decision comes down to the boundary of your application architecture.

Choose Cloudflare D1 when Workers or Pages are the center of the system and you want a low-friction, read-scalable database within the same platform. Choose Turso when the database must cross runtime boundaries, serve reads locally, support many isolated databases, include vector search or absorb concurrent writes.

If both profiles apply, run a production-shaped proof of concept. The important result is not which dashboard feels faster. It is which system meets your latency, consistency, throughput, portability and cost requirements with less operational risk.

Contributor credit

This article was informed by written input from [email protected], Chief Growth Officer at Turso. We independently checked product limits, pricing and architecture claims against current official documentation. Connect with Jeff Olson on LinkedIn.

Official sources

Product capabilities, limits and prices change. Verify the current documentation and contract terms before making a production decision.