selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

KeyDB logo

Self-host KeyDB

v6.3.4

Multithreaded Redis-compatible in-memory database

ReleaseOpen SourceBSD-3-Clause
Updated2 years ago
LanguageC++
Setup difficultyEasy
Stars
12 499
Docker
eqalpha/keydb
Install with Linux

What is KeyDB?

KeyDB is a high-performance fork of Redis aimed at developers and infrastructure teams who want more throughput from a single node without changing their Redis-based application code. It is multithreaded, keeps the Redis protocol, modules and scripts fully compatible, and acts as a drop-in replacement for existing Redis deployments. Notable capabilities include active-replication for multi-master and hot-spare failover without sentinel, an MVCC architecture that lets KEYS and SCAN run without blocking, subkey expirations, TLS encryption, RDB and AOF persistence, FLASH storage that pages from local SSD, and direct backup to AWS S3. You run it by compiling on Linux, installing DEB/RPM packages, or pulling the eqalpha/keydb Docker image; cluster and active-replica topologies let you scale horizontally. FLASH storage is described as experimental/beta. KeyDB is maintained as part of Snap Inc., is fully open source under BSD-3, and has no separate commercial product or paid support.

KeyDB alternatives

All self-hosted alternatives to Redis →

Should you self-host KeyDB?

KeyDB scores 67/100 on selfhost.directory (how scoring works) and ranks #17 of 38 in Databases. It has 12 499 GitHub stars, -4 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is BSD-3-Clause-licensed and written mostly in C++.

Its closest alternative on selfhost.directory is llm-app (72/100, 58 720 stars). It scores higher overall, so compare the two before you pick. See KeyDB vs llm-app side by side.

Features

  • Active replication / multi-master
  • Cluster mode sharding
  • FLASH storageConsidered experimental (beta) in the sources.
  • Multithreaded engine
  • MVCC non-blocking queries
  • RDB and AOF persistence
  • Redis protocol compatibility
  • S3 dump/load backup
  • Subkey expiration
  • TLS Encryption

KeyDB README

Current Release CI StackShare

KeyDB is now a part of Snap Inc! Check out the announcement here
Release v6.3.0 is here with major improvements as we consolidate our Open Source and Enterprise offerings into a single BSD-3 licensed project. See our roadmap for details.
Want to extend KeyDB with Javascript? Try ModJS
Need Help? Check out our extensive documentation.
KeyDB is on Slack. Click here to learn more and join the KeyDB Community Slack workspace.

What is KeyDB?

KeyDB is a high performance fork of Redis with a focus on multithreading, memory efficiency, and high throughput. In addition to performance improvements, KeyDB offers features such as Active Replication, FLASH Storage and Subkey Expires. KeyDB has a MVCC architecture that allows you to execute queries such as KEYS and SCAN without blocking the database and degrading performance.

How to install KeyDB

Install KeyDB with Linux

Init and clone submodule dependencies:

% git submodule init && git submodule update

Install dependencies:

% sudo apt install build-essential nasm autotools-dev autoconf libjemalloc-dev tcl tcl-dev uuid-dev libcurl4-openssl-dev libbz2-dev libzstd-dev liblz4-dev libsnappy-dev libssl-dev

Compiling is as simple as:

% make

KeyDB relies on SO_REUSEPORT, available only in Linux; plans to support FreeBSD later.

How to configure KeyDB

  • server-threads2Number of threads used to serve requests; default is two, recommended four.

    values: N

  • server-thread-affinityPin threads to cores.

    values: true/false

  • min-clients-per-thread50Minimum clients on a thread before assigning new connections to another thread.
  • replica-weighting-factor2Treats a replica client as the equivalent of N normal clients when balancing threads.
  • active-client-balancingyesMake active attempts to balance clients across threads.

    values: yes/no

KeyDB releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Databases

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…