Litestream Writable VFS
Blog post from Fly.io
Litestream, developed by Ben Johnson and integrated into the Fly.io platform, is an open-source backup and restore system designed to synchronize SQLite databases with S3-style object storage, offering speed and simplicity while safeguarding against data loss. It plays a critical role in Fly.io's Sprites, an innovative feature that relies on Litestream for its global orchestration. Unlike the centralized Postgres cluster used in Fly Machines, Sprites use multiple SQLite databases, synchronized by Litestream, which offers scalable and efficient design. Litestream has been enhanced with a Virtual File System (VFS), allowing point-in-time queries and optional read-write capabilities, addressing the need for fast, durable storage during Sprite cold starts. The VFS also introduces a hydration feature that serves queries from object storage while pulling the entire database in the background, ensuring efficient and durable operations in environments like Sprites. While these advancements are tailored for specific storage challenges, Litestream remains a robust tool for general read/write workloads without requiring modifications to applications.