Durability boundary
The acknowledgement means the data is in object storage.
Durability is confirmed by flush, never by elapsed time. Any API instance can serve any request because mutual exclusion comes from the lease, not from request routing.
Embedded SQLite runtime
Write-Ahead Log in object storage
A horizontally scalable, multi-tenant SQLite runtime with one logical database per user.
How it works
walrusd embeds the database runtime directly in each API process. Redis/Valkey serializes writes per database, while Litestream's VFS turns object storage into the durable SQLite state.
Go services import the core directly; Node.js and Bun use the same core through @walrusd/db.
walrusd runs inside a stateless API process, so API instances remain disposable compute.
A per-database lease uses conditional CAS to serialize writes across API instances.
Writes run through Litestream write mode; reads use the remote replica without normal full local hydration.
The durable state is an ordered LTX chain in an S3-compatible store; conditional writes are not required.
Write lifecycle
Every mutation follows the same five steps. Success is acknowledged only after the LTX data is in object storage.
Before any SQLite write begins, the runtime conditionally acquires the database's Redis/Valkey lease.
The runtime opens or refreshes the remote Litestream VFS state and enables write mode.
Your callback or statement batch runs and commits inside one SQLite transaction.
Disabling write mode is the mandatory flush barrier. walrusd waits for the synchronous remote flush to succeed.
Only after the confirmed flush does the runtime conditionally release the lease and return the remote TXID.
Durability boundary
Durability is confirmed by flush, never by elapsed time. Any API instance can serve any request because mutual exclusion comes from the lease, not from request routing.
Read behavior
Reads acquire no lease. They observe only state that Litestream has committed remotely through the VFS, with no local hydration.
Runtime properties
The runtime keeps coordination narrow and leaves durable state in object storage.
Placement
Any API instance can serve any request for any user, with no writer fleet, routing layer, or sticky sessions.
Writes
Writes are acknowledged only after the transaction is flushed to object storage. Durability is confirmed by flush, never by elapsed time.
Reads
Reads see only remote-committed state through Litestream's VFS, with no local hydration.
Bindings
A Go core (CGO) is exposed to Node.js and Bun through one Node-API addon over a narrow C ABI.
Retries
Retrying with the same idempotency key is deduplicated; after a timeout or crash, the recorded result is returned instead of re-running the mutation.
Storage
Any S3-compatible store can hold the replica, including Wasabi, Backblaze B2, and Sliplane; conditional writes are not required.
Quickstart
This TypeScript example is the repository quickstart for the Node.js and Bun binding.
import { WalrusdDatabase } from "./bindings/node/src/index";
const db = new WalrusdDatabase({ owner: "my-api-instance" });
// The descriptor is issued by your control plane - never by end users.const d = { database_id: "users/user_1", // your ID; objects land at <root_prefix>/users/user_1/ storage: { provider: "file", file_root: "/tmp/walrusd-quickstart" }, credentials: {},};
// One write = one batch = one transaction = one lease = one confirmed flush.await db.write({ database: d, idempotencyKey: "schema", statements: [{ sql: "CREATE TABLE IF NOT EXISTS kv (k TEXT PRIMARY KEY, v TEXT)" }],});
const { txid } = await db.write({ database: d, idempotencyKey: "set-greeting", // retrying this key is safe: deduplicated statements: [{ sql: "INSERT OR REPLACE INTO kv (k, v) VALUES ('greeting', 'hello from walrusd')" }],});console.log("durable at txid", txid);
// Reads see only flushed, remote-committed state.const { rows } = await db.read({ database: d, sql: "SELECT v FROM kv WHERE k = 'greeting'" });console.log("read:", rows[0].v);
await db.close();Documentation
The specification explains the invariants; the usage guide covers the Go core, the Node.js and Bun binding, the C ABI, and the error model.