Skip to content

frogdb/frogdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

715 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FrogDB

A Redis 8.0-compatible, memory-first database built in Rust.


What is FrogDB?

FrogDB is a memory-first database built in Rust with Tokio as the async engine (more on this below). It is fully Redis wire protocol (RESP2 and RESP3) compatible so you can use it with any existing Redis client. FrogDB aims to be faster, safer, and easier to operate than existing solutions while supporting the full Redis 8 feature set, potentially adding additional features in the future.

Goals

  • Correct
  • Fast
  • Scalable
  • Easy to operate

Features

Redis 8 Compatibility

Full RESP2/RESP3 wire protocol support with coverage across all Redis data structures:

  • Core types — Strings, Lists, Sets, Sorted Sets, Hashes, Streams
  • Bitmaps & Bitfields — BITCOUNT, BITOP, BITPOS, BITFIELD
  • JSON — RedisJSON-compatible document storage with JSONPath
  • Time Series — Gorilla-compressed time series with aggregation and downsampling
  • Vector Sets — Approximate nearest-neighbor search
  • Probabilistic — Bloom filters, Cuckoo filters, HyperLogLog, Count-Min Sketch, Top-K, T-Digest
  • Geospatial — Geohash indexing and distance queries
  • Pub/Sub — Channel and pattern-based publish/subscribe, event sourcing
  • Scripting & Transactions — Lua scripting, MULTI/EXEC
  • Search — Full text search, secondary indexing, vector search, aggregations, JSON documents

Clustering & Replication

  • Supports cluster operation with resizing and read replicas
  • Raft-based consensus for cluster state coordination
  • TODO: Automatic cluster rebalancing

Additional Features

  • Cross-slot operations allowed in single-node operation
    • MULTI/EXEC/MGET/etc
  • Event sourcing (docs incoming)
  • TBD

Persistence

  • WAL using RocksDB for storage and replication
  • Configurable durability modes (write-through or async)

Operations

  • Online configuration changes for many values
  • WIP Zero-downtime rolling upgrades
  • Prometheus metrics/alarms
  • Grafana dashboard templates
  • OpenTelemetry metrics, tracing, and logging
  • HTTP debug pages
    • JSON API
    • Monitoring UI
    • Configuration
  • DTrace probes
  • WIP: Kubernetes support
  • Tons of stats/logs and debugging information (all configurable)
  • WIP: TLS support

Testing

  • Extensive unit and integration test suite
  • Shuttle and Turmoil deterministic concurrency testing
  • Redis regression compatibility suite
  • Load testing and benchmarking
  • Fuzz testing
  • Jepsen verification using both Knossos (linearizability) and Elle (serializability)

CI

Performance

  • Profiling with custom causal profiler support
  • WIP: Comparative benchmarking against Redis, Valkey, and Dragonfly
  • TODO: io_uring/other runtimes like compio for faster I/O

Quick Start

Docker (fastest)

Note: FrogDB is pre-release software — expect breaking changes.

docker run -p 6379:6379 ghcr.io/frogdb/frogdb:dev

Then connect with any Redis client:

redis-cli PING        # PONG

From Source

Prerequisites

rustup is required — rust-toolchain.toml pins the exact Rust version automatically.

macOS — install everything from the Brewfile:

brew bundle
lefthook install  # set up pre-commit hooks

Nix (any platform) — complete dev environment:

nix-shell

Debian/Ubuntu:

sudo apt install build-essential pkg-config libclang-dev libssl-dev
cargo install just cargo-nextest

Arch Linux:

sudo pacman -S base-devel clang openssl pkg-config
cargo install just cargo-nextest

Build & Run

just build            # debug build
just run              # start server on 127.0.0.1:6379

Common Commands

just test                        # run all tests
just test frogdb-core            # test a specific crate
just test frogdb-core foo        # test matching a pattern
just lint                        # clippy
just fmt                         # format
just watch                       # watch mode type-checking
just                             # list all recipes

Connect

It should work seamlessly with your standard Redis clients, including cluster commands.

redis-cli SET hello world
redis-cli GET hello   # "world"

Documentation

Documentation lives on the FrogDB website, organized by audience:

Audience Path Description
Users Guides Commands, scripting, pub/sub, event sourcing, transactions
Operators Operations Configuration, deployment, persistence, replication, monitoring
Contributors Architecture Architecture, concurrency model, storage engine, VLL

Contributing

Contributions are welcome! See the architecture documentation for architecture guides and development setup.

License

FrogDB is tri-licensed.

Choose whichever fits your use case:

License Best for
BSL-1.1 Most users — use freely, with a restriction on competing database products. Converts to Apache 2.0 after 2 years.
AGPLv3 Users who need an OSI-approved copyleft license.
Commercial Organizations needing custom terms.

See LICENSE.md for full details.