Register now for early access to concurrent writes in the Turso Cloud. Join the waitlist

What is Turso?

Turso is an open-source, SQLite-compatible database written in Rust that lets developers create millions of small, file-based databases for AI agents, multi-tenant SaaS applications, and edge workloads. Unlike traditional databases that run as a single shared server process, Turso treats each database as a lightweight file that can be spun up instantly, replicated globally, or synced to a device.

At a Glance

Category

Distributed SQL database, SQLite-compatible

Created by

Turso, Inc

Written in

Rust

License

MIT

Compatible with

SQLite SQL dialect, file format and C API

Hosting Model

Self-hosted (Turso Database) or managed (Turso Cloud)

Built-in features

Vector Search, async I/O, concurrent writes, replication

Primary Use cases

AI Agent memory, per-tenant SaaS, edge apps, local-first apps

How Turso Works

The many-database architecture

Turso departs from the conventional database model in one decisive way: a database is a file, not a long-running server process.

In a traditional database such as PostgreSQL or MySQL, all tenants, users, and applications typically share a single instance. Scaling means giving that instance more CPU, more memory, or more replicas.

Turso flips the model. Every user, tenant, or AI agent can have its own dedicated database, and an idle database costs only its storage footprint, because there is no process running when nobody is querying it.

Because each Turso database is a file rather than a process, there are no cold starts and no wake-up penalty. The database is always available the moment it is needed. This makes the model practical at scale: Turso Cloud is designed to host millions or even billions of small databases, where most of them are idle most of the time.

The Turso Cloud Storage Layer

In Turso Cloud, durability is handled by Amazon S3 and S3 Express. Database files are split into 128 kB segments, and the collection of segments that make up a file is called a generation. When a write transaction is committed, the write-ahead log (WAL) is persisted to S3 Express before the transaction is acknowledged.

This produces three useful properties:

01 / Durability

Eleven nines of data durability

Turso Cloud inherits AWS S3 durability guarantees of 99.999999999%, with continuous backups and point-in-time restore up to 90 days.

02 / Branching

Instant copy-on-write branches

Branching a database is a metadata-only operation. New branches share existing segments until they diverge, so creating a branch is effectively instant.

03 / Replication

Lazy fetch and replication

When a database is moved or replicated, segments are pulled on demand. The destination starts serving queries before the full file has arrived.

04 / Idle Cost

No process, no scale-to-zero

There is nothing to scale to zero. An idle database is simply a set of files in object storage and costs only storage, not compute.

Key Features of Turso

What sets it apart from vanilla SQLite

Turso is described by its maintainers as a ground-up rewrite of SQLite in Rust, intended as a drop-in replacement. The rewrite adds capabilities that classical SQLite does not offer out of the box.

01

Concurrent writes via MVCC

Turso introduces BEGIN CONCURRENT for improved write throughput using multi-version concurrency control (MVCC). Classical SQLite serializes writes; Turso allows multiple writers to make progress at once.

02

Native vector search

Vector similarity search is built into the database. No extensions are required. This makes Turso a practical store for embeddings used in retrieval-augmented generation (RAG) and other AI workloads, including on-device RAG.

03

Async I/O Architecture

Turso is built with an async-first I/O model, which suits both serverless runtimes and edge environments where blocking I/O is expensive or unavailable.

04

Browser and WebAssembly support

Turso can run in the browser through WebAssembly, which makes it usable in client-side applications, sandboxed agent runtimes, and other environments where embedding a database directly is desirable.

05

Native Encryption

Native encryption at the page level for security-oriented use cases. No extensions. With the Turso Cloud, encrypt each database at rest with your key with the BYOK model.

06

Change Data Capture, Full Text Search, and more.

Recent and experimental additions include change data capture (CDC) for tracking database changes in real time, full-text search powered by the Tantivy library, a strong type system, and incremental view maintenance using DBSP.

What Turso Is Used For

Five common workloads

01

AI agent memory and state

Each AI agent gets its own database to track files, store memories, log actions, and coordinate tasks. Because branching is instantaneous, agents can fork their state, try something, and roll back if it fails.

02

Multi-tenant SaaS applications

Per-tenant databases give each customer hard data isolation without paying the full cost of a dedicated server. This pattern is well-suited to platforms that need fast onboarding, custom schemas per tenant, or data residency in specific jurisdictions.

03

Edge applications with low-latency reads

Replicas can be placed in regions close to users so reads are served at edge latency. Useful for product catalogs, user settings, cache layers, and similar read-heavy workloads.

04

Local-first and offline-capable apps

An embedded replica syncs with the cloud on demand, so applications can write locally while offline and reconcile later. This pattern is common in mobile, desktop, and IoT apps.

05

On-device retrieval-augmented generation

With native vector search and small file-based databases, embeddings and source documents can live directly on a phone, laptop, or other device, enabling private RAG without round-tripping to a server.

Turso vs SQLite vs Traditional Databases

How the model differs

Turso is most commonly compared to SQLite, since it is positioned as a SQLite-compatible drop-in. It is also worth contrasting with traditional client-server databases such as PostgreSQL.

DimensionTursoSQLitePostgreSQL
ArchitectureIn-process plus cloud, file-basedIn-process, file-basedClient-server
LanguageRustCC
Concurrent WritesYes, MVCCNo, Serialized WriterYes, MVCC
Vector SearchNative, built-inVia extensionsVia pgvector extension
Many-database scaleMillions of databasesManual, one file eachNot designed for it
Cold startNoneNoneProcess must be running
Cloud OptionTurso CloudNone first-partyMany providers
LicenseMITPublic DomainPostgreSQL License

Quickstart Example

Creating and querying a Turso database

A minimal Turso Cloud workflow uses the Turso CLI to create a database, then a client library to query it. The example below shows a Node.js client using the official libSQL client.

import { createClient } from "@tursodatabase/api";

const turso = createClient({
  org: process.env.TURSO_ORG!,
  token: process.env.TURSO_PLATFORM_TOKEN!,
});

// Create a database
const db = await turso.databases.create("user-abc123", { group: "default" });

Turso Pricing Overview

Using Turso as an Embedded database is obviously free. The Turso Cloud architecture with millions of databases as lightweight isolated files, not processes, allow us to offer the most generous free plans in the market. 100 databases for free.

All paid Turso Cloud plans offer unlimited databases. Our Developer plan starts from $4.99 a month and caters to individual developers building their AI applications. The Scaler plan helps small teams scale, and the Pro plan is designed for secure and compliant production workloads.

Frequently Asked Questions

Direct answers

Try Turso for Yourself

Spin up your first database in under a minute on the free Starter plan, or fork the open-source Turso Database on GitHub.