Litestream VFS
Litestream VFS is a SQLite VFS plugin that runs read-only queries directly against Litestream backups in S3 without downloading the whole database, and supports point-in-time queries via a `PRAGMA litestream_time` setting. It relies on Litestream v0.5's LTX format: compaction keeps only the latest version of each page, leveled changesets (daily snapshots, then hourly down to 30-second and per-second L0 files) give a minimal restore path, and per-file page-index trailers (about 1% of each file) let the VFS translate SQLite page reads into S3 Range requests. An LRU cache serves hot pages, and polling the L0 layer keeps the index current, giving a near-realtime replica that starts up fast while Litestream itself still handles writes.
Related posts
- Litestream Revamped: SQLite Replication
Fly.io mediumAdeptLitestream is being reworked around ideas from LiteFS. It replaces the raw-WAL "shadow WAL" with transaction-aware LTX files, sorted page changesets that can be compacted LSM-style, so point-in-time restores no longer replay every intermediate page write. Conditional writes in S3 and Tigris provide a time-based lease that guarantees a single writer per destination without Consul, which removes the need for multiple "generations" and makes failover and replica resync simpler. Planned additions are a VFS-based read-replica layer that fetches and caches pages straight from object storage, and wildcard replication of hundreds or thousands of databases from one process.
- Litestream v0.5.0 is Here
Fly.io mediumAdeptLitestream v0.5.0 replaces WAL-segment backups with the LTX file format from LiteFS, enabling efficient point-in-time recovery through hierarchical compaction (30-second, 5-minute and hourly levels), so a restore typically needs only a dozen or so files. The 'generations' concept is gone in favor of monotonically increasing transaction IDs, LTX now compresses per page with a trailing index for page-granular access, and CGO is dropped by switching to modernc.org/sqlite. Upgrading is drop-in with a backwards-compatible config, but v0.5.0 cannot restore old v0.3.x WAL segments and allows only one replica destination per database. The release also adds a NATS JetStream replica type, and a VFS for instant read replicas is planned next.
- Litestream Writable VFS
Fly.io mediumAdeptLitestream's SQLite VFS now supports an optional write mode and background hydration, built so the Sprites storage stack can serve reads and writes milliseconds after a cold boot without first downloading its JuiceFS block map from object storage. Write mode assumes a single writer, disables polling for remote LTX files, and buffers writes locally, syncing them to S3 about every second. That gives 'eventual durability' that suits Sprites but probably not most applications. Hydration serves reads from object storage while pulling a compacted full copy of the database into a temporary local file, then switches reads to that file once it is ready. Ordinary workloads should keep running Litestream as a sidecar instead.
- How does Turso Cloud keep your data durable and safe?
Turso mediumAdeptTurso 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.
- Turso Cloud on AWS is now available for everybody
Turso easyNoviceTurso 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.