Introduction

What is FyroDB and why it exists.

What is FyroDB?

FyroDB is a Redis-compatible in-memory key-value store written in Rust. It speaks the RESP protocol — any Redis client, SDK, or CLI tool works without modification.

Unlike Redis (single-threaded), FyroDB uses all CPU cores via a thread-per-core architecture with a fully lock-free concurrent hash map and per-key seqlock. A single FyroDB node outperforms a 6-node Redis Cluster on every workload while consuming lower memory and less CPU.

Key Features

  • Redis-compatible — drop-in replacement, supports all major data types and 150+ commands
  • Lock-free reads — epoch-based reclamation, seqlock validation for iteration safety
  • Zero-clone writes — per-key spinlock with in-place mutation, no CAS retry loops
  • Thread-per-core — one epoll loop per CPU, SO_REUSEPORT kernel accept
  • Redis Cluster — 16384 hash slots, MOVED/ASK redirects, hash tags, gossip bus
  • Zero-copy GET — writes directly from stored value to TCP buffer
  • Full data type support — String, Hash, List, Set, Sorted Set, JSON, Stream, Bitmap, HyperLogLog, Geospatial
  • RDB persistence — automatic snapshots, atomic saves, crash-safe
  • Pub/Sub — 74.64M msg/sec delivery with lock-free Arc snapshots

Performance

BenchmarkFyroDB (1 node)Redis Cluster (6 nodes)Speedup
Pipeline-64 SET8.95M ops/sec5.75M ops/sec1.6×
Pipelined SET20.08M ops/sec7.56M ops/sec2.7×
Pipelined GET28.16M ops/sec11.29M ops/sec2.5×
Pub/Sub publish1.49M ops/sec147.1K ops/sec10.1×
Pub/Sub delivery74.64M msg/sec7.35M msg/sec10.2×
Mixed SET/GET (50/50)20.90M ops/sec7.24M ops/sec2.9×
INCR (counters)50.11M ops/sec6.32M ops/sec7.9×
HSET/HGET (sessions)33.07M ops/sec7.95M ops/sec4.2×
LPUSH/RPOP (queue)39.26M ops/sec7.19M ops/sec5.5×
SADD (sets)27.87M ops/sec6.34M ops/sec4.4×
ZADD (zsets)18.12M ops/sec4.55M ops/sec4.0×
JSON.SET/GET (docs)14.91M ops/sec3.38M ops/sec4.4×
SET+EXPIRE (TTL)10.51M ops/sec2.64M ops/sec4.0×
Hot Key (contention)44.07M ops/sec2.03M ops/sec21.7×
Producer/Consumer36.20M ops/sec981.3K ops/sec36.9×

Both sides tested on the same 6-core Intel i5-11400H (12 hardware threads): one single FyroDB node against a 6-node Redis Cluster (7 containers).

Links