Skip to content

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

Turso 10 min read Case study mediumAdept

Turso Cloud Goes Diskless: How We Built a Fully S3-Based Database Architecture

Turso Cloud moved to a diskless architecture where writes are acknowledged only after landing in S3 Express One Zone, so compute pods hold no durable local state and can be rescheduled freely. That makes Bring-Your-Own-Cloud deployments possible without Kubernetes StatefulSets. Benchmarks show standard S3 4kB uploads averaging 31ms with a p99 of 102ms. S3 Express stays in single-digit milliseconds, about 4ms over a local fsync, even across availability zones. Per-PUT costs are cut by batching writes across many active SQLite databases on each multi-tenant node, with local disks kept as a write-through read cache and checkpointed database files copied to standard S3 for free continuous backups.

Related posts

  • 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.

  • How does Turso Cloud keep your data durable and safe?

    Turso mediumAdept

    Turso Cloud makes every SQLite database durable on S3 and S3 Express, treating local server disk purely as a cache. Database files are split into 128kB segments grouped into generations, while recent WAL writes are acknowledged only after landing in low-latency S3 Express, with frequent checkpoints (around every 1MB). Segmenting enables lazy fetching, bounded per-tenant local storage and safe replacement of compute nodes. Continuous backups with 90-day point-in-time restore and instant metadata-only branching fall out of the same design.

  • Bringing SQLite to Vercel Functions with Turso

    Turso mediumAdept

    Turso's partial sync replicates a subset of SQLite database pages into Vercel Functions so reads run in-process with no network round-trip, while writes go to the remote Turso database for durability and consistency. On cold start the driver fetches the first 128 KiB of the SQLite file, then pulls further 128 KiB segments on demand into the ephemeral /tmp directory, so cold-start cost scales with the working set rather than total database size. The experimental @tursodatabase/vercel-experimental package also auto-provisions databases by name for database-per-tenant or per-agent-session patterns. It offers an optional local-write batching mode that trades consistency for lower write latency, and uses a waitUntil() safety net that pushes pending changes if close() is forgotten.

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

    Turso easyNovice

    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.

  • 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: