The key-value store that lives inside your app

Burrow is a fast, crash safe embedded database for edge and serverless apps. Open a file, read and write, and ship.

$ cargo add burrow
$ npm install @burrow/db
$ pip install burrow-db
  • MIT licensed
  • Written in Rust
  • TypeScript and Python bindings
Your app: Worker, function or CLIYour codeBurrowembedded libraryapp.burrowNo server. No network hop.

Open a file. Read and write.

There is no server to run and no connection string to manage. Your database is a single file next to your code.

Values are plain JSON, bytes or strings. Every write is durable by default, and reads come straight from memory-mapped pages, so the same few lines behave the same on a laptop and at the edge.

import { open } from '@burrow/db';

const db = await open('./app.burrow');

await db.put('user:42', { name: 'Ada' });
const user = await db.get('user:42');
// { name: 'Ada' }

Built for places where a database server does not fit

Four design choices, each made so Burrow stays out of your way.

  • Fast reads

    Memory-mapped pages and a cache-friendly B-tree keep point lookups in the microsecond range, with no locks on the read path.

  • Crash safe

    A write-ahead log and checksummed pages mean a power cut or killed process never leaves a half-written database behind.

  • Tiny footprint

    The core compiles to under 400 KB, uses no background threads, and starts in well under a millisecond, which suits cold starts.

  • Works offline

    Everything runs in process against a local file. No network, no account, no service to be down when you need it.

Point reads, side by side

Burrow against two generic embedded alternatives on the same machine and the same data.

  • Burrow1.8M ops/s
  • Store A1.1M ops/s
  • Store B0.74M ops/s
Random point reads per second, one million keys with 4 KB values, warm cache, 2 vCPU instance. Higher is better. Illustrative results from the benchmark suite in the repository; run it yourself to see numbers for your hardware.

Used by teams shipping at the edge

A few of the projects that keep their state in a Burrow file.

  • Lumen Edge
  • Fieldnotes
  • Parcel Relay
  • Tidewatch
  • Northbeam
  • Kiln Labs

Open your first database in five minutes

The quick start walks through install, reads, writes and transactions, with a short example for each.