Writing·Project
Denis: why I wrote my own database
Redis-fast key-value, SQL for small tables and MCP for AI assistants. The story of Denis and the numbers I measured.
My small projects kept hitting the same wall: I'd set up Redis for a fast key-value store and then add PostgreSQL next to it for a couple of small tables. Installing, backing up and monitoring both was more work than the data itself. Denis came out of that fatigue.
The idea
Denis keeps keys and small tables in memory and writes every change to a journal on disk. Your app talks to it in one-line commands and gets one-line answers. That simplicity made the protocol easy to try by hand and easy to write clients for.
Over time I added three doors:
- a REST API and a Node.js client (
npm install denis-client) for applications, - an MCP endpoint for AI assistants, so something like Claude can query the database directly,
- a web console and the
deniscommand-line shell for humans.
Numbers, measured not promised
Same machine, same client, next to Redis 7 and PostgreSQL 16:
| Denis 0.6.1 | |
|---|---|
| Key-value read (p50) | 0.3 ms, same as Redis with one client |
| SQL point reads | ~20k/s (PostgreSQL ~17k/s) |
Acknowledged writes after SIGKILL |
9,079 / 9,079 recovered |
To be fair, Redis and PostgreSQL still win on ordered range scans and raw throughput at 64 connections. I publish both sides on the site, with instructions to reproduce them.
Denis Cloud
For people who don't want to run it themselves there's Denis Cloud: 3 databases per account, 10 MB and 50,000 keys each, 100,000 commands a day. No card required.
Denis is my most-starred project on GitHub. If you try it, I'd love to hear what you think.