BranchDB

Hero Background

BranchDB

A durable, in-memory database built in C++.

Sneak Peek in 60 Sec

BranchDB at a Glance

BranchDB is an open-source, in-memory key-value database written in C++ — built from scratch for performance and developer control. It supports expiration, disk persistence, multi-threaded architecture, compact logging and multi-user architecture.

DataBase iconKey Value icon
Key Value iconCard Icon

Blazingly Fast

Built from scratch with C++. No frameworks or hidden databases. Everything is engineered for low-level performance.

Key Value iconCard Icon

Secure

Built with a crash-safe log, your data is durably stored. You have full control over persistence.

Key Value iconCard Icon

Dev First

Connect and interact using the official JS SDK. Experience a clean, asynchronous API that handles all the protocol complexities for you.

The Arsenal of Features

In-Memory Database

Blazing-fast. Just pure RAM-powered speed with built-in persistence.

TTL Expiry

Time-bound keys vanish automatically—no bloat.

Secure Data Isolation

Data is partitioned by an authId to prevent access conflicts, ensuring each project's data remains private and secure.

Write-Ahead Log

Every write is logged for crash safety, keeps startup times fast.

Log Compaction

Cleans up redundant logs to keep storage lean and recovery fast.

Multi-Threaded Handling

Serves concurrent clients on separate threads, no waiting in line.

LRU Cache

Evicting least used keys, when LRU cache capacity hits.

Flexible Payloads

The protocol supports strings and arrays of strings with structured responses.

Efficient Command Protocol

A custom TCP interface with a binary protocol that is lightweight, precise, and highly performant.

Performance Test

10 Million

Requests ⚡

1,000

Concurrent Clients

Move in

0 Crashes

Note: Performance tests were conducted on Lenovo ideapad Slim 3, 64-bit operating system with 8 GB RAM, 11th Gen Intel(R). Results may vary on different hardware.

Blog Bytes

Card Icon

Why I Spent 500+ Hours Building a Database from Scratch in C++

Start Reading
Card Icon

The Persistence Dilemma

Start Reading
Card Icon

Logs are great… until they become baggage. 🧹 This is where log compaction saves the day

Start Reading

Blown away? Give us a boost!

Star Us On GitHub
Meet Developer Background Image
Developer Name

The Brains

Chandan Khamitkar's Profile Pic

I'm an Engineer fascinated by the art of system design and databases.

2x Full Stack Developer Intern | 3x Hackathon Winner

The more rooted in the core, the better.

" Design for scale.
Build for clarity.

Future Drop 🚀

Dev Controllable WAL

Developers can control wheather to choose Explicit or Implicit WAL.

Connection Pooling

Thread pool that reuses a fixed number of threads.

Metrics & Observability

Built-in Prometheus/Grafana metrics and tracing support.