Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Turso 8 min read Case study easyNovice

2 million databases and counting: the architecture behind Sauna's AI teammate

Sauna, a proactive AI work assistant, gives every session, agent and connected inbox or calendar its own Turso database, creating about 90,000 databases a day and over 2 million in total. The team moved from Cloudflare Durable Objects to Containers with Litestream, which proved slow and expensive, and switched to Turso once per-database pricing was removed. Turso Sync keeps each database as a local file with two-way sync: on a conflicting pull it atomically rolls back to the last synced state, applies remote changes and replays local writes. The database-per-connection model simplifies isolation between users and lets storage outlive compute when changing hosting providers.

Related posts

  • Building AI Agent Databases: A Complete Guide to Database-per-Agent Architecture

    Turso mediumAdept

    Giving each AI agent its own SQLite-style database, instead of sharing tables keyed by tenant_id or using schema-per-tenant, makes isolation, debugging and cleanup trivial: deleting an agent is a single API call. Four patterns are shown on Turso: a cloud database per agent, embedded on-device databases, embedded databases synced to the cloud via push/pull, and hub-and-spoke with a shared coordination database, plus native F32_BLOB vectors with cosine-distance search for per-agent semantic memory. Per-request billing means idle or nearly idle agent databases cost little beyond storage. The main tradeoffs are cross-agent analytics, which need fan-out queries or a separate aggregate store, and the lack of ACID guarantees across agents, so the pattern suits many agents with independent state rather than a few with heavy cross-agent queries.

  • A database per agent: how Turso and Neon give different answers

    Turso easyNovice

    Neon and Turso both support a database per agent but differ in the unit: Neon gives each agent a Postgres project with its own autoscaling compute that suspends after 5 minutes idle and is billed by CU-hour, while Turso treats each SQLite-compatible database as a file managed by a shared server, billed by rows read/written and storage with unlimited databases on paid plans. For bursty agent workloads with many mostly idle databases, Turso avoids per-database compute clocks and adds per-database BYOK encryption, BYOC, on-device sync, and BEGIN CONCURRENT writes (about 9,500 TPS at 64 connections in 0.8). Neon remains better for branching a full production backend per agent, and Supabase Postgres is the recommended fit for Postgres-specific needs or storage-heavy, rarely queried data.

  • How Sample Vault syncs gigabyte-scale databases from cloud to local with Turso

    Turso easyNovice

    Sample Vault, an AI sample browser for music producers, gives each premium user a dedicated Turso database. Processing (spectral analysis, ML classification, AI tagging) runs in the cloud and syncs down to a full local embedded replica, so libraries of 100K to 1.2M+ audio files are queryable offline. Supabase failed on connectivity and upload speed, PGLite used too much RAM and had no sync layer, and Electric SQL and PowerSync were too expensive and synced in the wrong direction. Sync runs on launch, every 5 minutes, and on demand, and database-per-user tenancy avoids noisy neighbours without any custom sync code.

  • Turso Cloud on AWS is now available for everybody

    Turso easyNovice

    Turso Cloud is now generally available on AWS, built on an S3-native architecture where every commit is made durable on S3 Express One Zone and local disks serve as a read cache. Two factors make object storage viable for an OLTP write-ahead log: massive multitenancy, which lets commits be batched across many databases, and S3 Express latency in the single-digit milliseconds, comparable to fsync on EBS. Because each database is just a SQLite file on an always-up multitenant server, there are no cold starts, and databases can move between servers as load shifts. Paid Fly.io customers may stay or migrate; free-tier databases are auto-migrated to mapped AWS regions starting March 21.

  • Databases as Variables: What Unlimited Databases Actually Changes

    Turso mediumAdept

    Turso Cloud's paid plans no longer meter active databases, so a database costs only its storage while idle. That changes the cost math behind choosing a shared tenant_id schema. Because a Turso database is a file stored as 128 kB segments in object storage with copy-on-write branching, per-tenant, per-agent-session, per-experiment, per-regulated-user and per-PR databases become cheap, and provisioning takes two Platform API calls seeded from a template. Real costs remain: cross-tenant analytics pipelines (CDC helps), fleet-wide migration runners, routing and monitoring, so shared schemas still suit early, unregulated or analytics-heavy products, and a hybrid is often best.

The quest for software engineering knowledge.

Look:
Layout: