Dragonfly: A High-Performance, Redis and Memcached Compatible Data Store

Dragonfly: A High-Performance, Redis and Memcached Compatible Data Store

Summary

Dragonfly is an innovative in-memory data store designed as a modern replacement for Redis and Memcached. It offers significant performance improvements, including up to 25x higher throughput and better memory efficiency, while maintaining full API compatibility. Built with a shared-nothing architecture and novel caching, Dragonfly is ideal for demanding application workloads.

Repository Info

Updated on April 5, 2026
View on GitHub

Introduction

Dragonfly is a cutting-edge, in-memory data store engineered to serve as a modern, high-performance replacement for both Redis and Memcached. Developed in C++, it boasts full API compatibility with these traditional data stores, allowing for seamless integration into existing applications without requiring code changes. Dragonfly distinguishes itself by offering up to 25 times higher throughput, lower tail latency, and superior cache hit rates compared to its predecessors. Its design focuses on leveraging modern hardware capabilities, providing easy vertical scalability for demanding application workloads.

Installation

Getting started with Dragonfly is straightforward. The project provides comprehensive documentation, including a quickstart guide, to help you set up your instance. You can typically build it from source or use Docker for a quicker deployment.

For detailed installation instructions, please refer to the official Dragonfly Quickstart Guide.

A common way to run Dragonfly is via Docker:

docker run -p 6379:6379 dragonflydb/dragonfly

Examples

Dragonfly's compatibility with Redis and Memcached APIs means you can use existing clients and tools to interact with it. For instance, you can use redis-cli or memtier_benchmark to test its performance and functionality.

Here's an example of how memtier_benchmark can be used to test Dragonfly's performance, as highlighted in its documentation:

memtier_benchmark --ratio ... -t <threads> -c 30 -n 200000 --distinct-client-seed -d 256 \
   --expiry-range=...

Dragonfly also supports many Redis-specific arguments for configuration, such as port, bind, requirepass, and maxmemory. It introduces its own arguments like memcached_port to enable Memcached compatibility and cache_mode for its novel caching design.

Why Use Dragonfly?

Dragonfly offers compelling advantages that make it an excellent choice for modern applications:

  • Exceptional Performance: Benchmarks show Dragonfly achieving up to 25x the throughput of Redis, exceeding 3.8M QPS on SET operations and reaching 10M QPS for SET and 15M QPS for GET in pipeline mode.
  • Superior Memory Efficiency: It is 30% more memory efficient than Redis in idle states and demonstrates no visible memory increase during snapshot phases, unlike Redis which can triple its memory usage.
  • Full Compatibility: Seamlessly replaces Redis and Memcached without requiring any application code modifications, thanks to its full API compatibility.
  • Modern Architecture: Built on a shared-nothing architecture with a novel, unified adaptive caching algorithm and forkless snapshotting, designed for optimal performance on modern hardware.
  • Feature Rich: Includes a native HTTP console for debugging and management, and provides Prometheus-compatible metrics for easy monitoring with tools like Grafana.

Links