Dragonfly DB Over Redis:The Future of In-Memory Datastores

Published On: 24 February 2025.By .
DragonflyDB vs Redis in 2025: Performance, Architecture & When to Switch
In-Memory Databases · Backend Engineering · 2025  ·  Updated May 24, 2026 by Suman Yubraj

Redis changed its license twice in a year. Valkey took over every major cloud. DragonflyDB now hits 3.8 million QPS on a single node. Here is everything your team needs to know.

DragonflyDB vs Redis 2025 — in-memory database comparison overview by Auriga IT
What changed since February 2025 Redis 8 launched (May 2025) under AGPLv3 with up to 87% faster commands and new Vector Sets. Valkey — the Linux Foundation fork backed by AWS, Google, and Oracle — is now the default Redis-compatible engine on all three major clouds. This article has been fully updated.

01What is Redis and why does it still matter?

Redis (Remote Dictionary Server) is an open-source, in-memory data structure store created by Salvatore Sanfilippo in 2009. For over a decade it has been the de-facto standard for caching, session management, pub/sub messaging, and real-time leaderboards. Its API is simple, its community is vast, and its ecosystem spans virtually every programming language.

Redis's atomic, single-threaded event loop means every command executes fully before the next begins — no locks, no contention, and highly predictable latency. It uses I/O multiplexing to handle thousands of concurrent connections without multi-threading.

Data Structures

Strings, Hashes, Lists

Core primitives for counters, objects, and ordered data.

Data Structures

Sets & Sorted Sets

Tag indexes, leaderboards, and range queries.

Messaging

Pub/Sub & Streams

Event pipelines and real-time messaging at scale.

Spatial

Geo-spatial Indexes

Radius queries and proximity-based lookups.

Analytics

Bitmaps & HyperLogLog

Compact cardinality estimation and bit operations.

New in Redis 8

Vector Sets

Native vector similarity search for AI and ML workloads.

Persistence options include RDB snapshots, Append-Only File (AOF) logging, or no persistence at all. TTL-based expiry, LRU eviction, Lua scripting, and transactions via MULTI/EXEC complete a feature set that has kept Redis relevant for fifteen years.

02The 2025 Redis ecosystem: license drama, Valkey & Redis 8

Understanding the current landscape requires knowing what happened to Redis over the past eighteen months — arguably the most disruptive period in its history.

Redis ecosystem timeline 2024 to 2025: SSPL license change, Valkey Linux Foundation fork, Redis 8 AGPLv3 launch The Redis ecosystem shifted dramatically between March 2024 and May 2025.
March 2024
Redis drops BSD, switches to SSPL & RSALv2. The goal was to prevent AWS and Google from monetising Redis without contributing back. The result was an immediate rupture with the open-source community and removal from major Linux distributions.
April 2024
Linux Foundation launches Valkey. Backed by AWS, Google Cloud, Oracle, Ericsson, and Snap under the BSD license. Within weeks: 150+ contributors, 1,000+ commits, production-ready.
Late 2024
AWS, Google, and Microsoft standardise on Valkey. ElastiCache, Google Memorystore, and Azure Cache all switch. No major cloud provider maintains dual Redis/Valkey support.
November 2024
Salvatore Sanfilippo (antirez) rejoins Redis Inc. The original creator returns as developer evangelist and pushes immediately for a license reversal and new capabilities.
May 2025
Redis 8 launches under AGPLv3. Returns to open source with up to 87% faster commands, 2× higher throughput, native Vector Sets, and Redis Stack modules (JSON, TimeSeries, Search) folded into core. Cloud providers remain committed to Valkey.

What this means for your teamRedis 7.2 and below remain BSD-licensed and can be used indefinitely. Redis 8 AGPLv3 is OSI-approved but its network copyleft clause means SaaS services exposing Redis 8 to external users may need to open-source their application code. For internal caching, it is usually fine.

03What is DragonflyDB?

Founded in March 2022 by Oded Poncz and Roman Gershman — former Google engineers — DragonflyDB was built from scratch to solve the scaling limits they experienced firsthand. Written in C++ and designed around a fundamentally different concurrency model, it is not a Redis fork.

3.8M QPS on a single AWS c6gn.16xlarge node
25× throughput vs Redis single-threaded process
80% lower memory usage vs Redis for same workload
0 code changes needed for most Redis migrations

Dragonfly is fully compatible with both the Redis protocol and Memcached protocol. In pipeline mode it reaches 10 million QPS for SET and 15 million QPS for GET on the same hardware. At peak throughput, P99 latency stays below 1ms.

"A single DragonflyDB instance can replace an entire Redis cluster for many production workloads — with zero application code changes."

04Architecture: single-thread vs. multi-thread

DragonflyDB multi-threaded shared-nothing architecture vs Redis single-threaded event loop diagram Redis routes all commands through one thread. Dragonfly assigns each shard its own dedicated CPU core.

Redis: single-threaded event loop

Redis processes all commands in a single thread using I/O multiplexing. This guarantees command atomicity without locks and is efficient at low concurrency — but the single thread becomes a CPU bottleneck as traffic scales. Redis scales horizontally via clustering, which adds network round-trips, rebalancing overhead, and data-loss risk during mismanaged failovers.

DragonflyDB: shared-nothing multi-threaded sharding

Dragonfly splits its keyspace into independent shards, each owned by a dedicated thread on a separate CPU core. No shard shares memory with another — no mutexes, no lock contention. Threads run fully in parallel, allowing Dragonfly to scale vertically as you add CPU cores without a cluster.

For disk I/O, Dragonfly uses io_uring — Linux's modern async I/O interface — so snapshots never block the event loop. During BGSAVE, Redis memory can spike to nearly 3× normal usage via copy-on-write. Dragonfly's memory during the same event is flat.

Property Redis 7 / 8 DragonflyDB Valkey
Threading modelSingle-threaded + I/O threadsMulti-threaded, shared-nothingSingle-threaded (Redis-style)
Max QPS (single node)~150–200K3.8M+ (25× Redis)~200K
Memory efficiencyBaseline30–80% lowerSimilar to Redis
Snapshot memory spikeUp to 3× during BGSAVENegligible — io_uring asyncSimilar to Redis
Redis API compatibility100% (it is Redis)Very high, growing100% (Redis fork)
LicenseAGPLv3/SSPL/RSAL (v8), BSD (v7)BSL 1.1BSD
Horizontal clusteringMature Redis ClusterIn developmentMature, Redis-compatible

05Benchmark results: throughput, latency & memory

All benchmarks use memtier_benchmark on AWS Graviton2/3 instances with 10 million pre-populated keys, run on c6gn.16xlarge network-optimised instances. Always test with your own workload mix before migrating.

Throughput — SET operations (QPS)

DragonflyDB3,800,000 QPS
3.8M QPS
Valkey~210,000 QPS
Redis 8~180,000 QPS

Note: Redis 8 claims up to 2× throughput over Redis 7 in its own benchmarks on different hardware. On identical hardware Dragonfly still leads by approximately 15–20×.

DragonflyDB vs Redis benchmark charts: throughput QPS, P99 tail latency, and memory usage during snapshotting Throughput, P99 tail latency, and memory efficiency during snapshotting — DragonflyDB vs Redis benchmark results.

P99 tail latency at peak throughput

Despite operating at 25× the QPS of Redis, Dragonfly maintains P99 latency below 1ms across SET, GET, and SETEX. Independent 2025 benchmarks show Redis 8 leads on p95 latency for simple GET patterns at low concurrency, while Dragonfly leads on throughput and memory efficiency. Valkey leads on batched pipeline workloads.

Memory during snapshotting

Redis's BGSAVE triggers copy-on-write mechanics that can nearly triple memory usage during the snapshot window — a serious risk on memory-constrained instances. Dragonfly is 30% more memory-efficient at idle and shows no visible spike during snapshotting. At peak, Redis memory during BGSAVE reached almost 3× Dragonfly's usage in controlled tests.

064-way comparison: Redis 8, Dragonfly, Valkey, KeyDB

Use caseWinnerReason
Raw write throughputDragonflyDBMulti-threaded sharding, best single-node QPS
Read throughput (cache hits)DragonflyDBScales with cores; Redis single thread saturates early
Batched / pipeline requestsValkeyLeads pipeline benchmarks clearly
P95 read latency (simple GET)Redis 8Consistently lowest p95; Dragonfly slightly higher
Memory efficiencyDragonflyDB30–80% lower vs Redis; no spike during snapshots
Ecosystem & modulesRedis 8JSON, Search, TimeSeries in core; biggest community
Cloud-managed serviceValkeyDefault on AWS, GCP, Azure; no AGPL concern
Vertical scale without clusterDragonflyDBSingle instance replaces multi-node cluster for many workloads

07Decision guide: which should you choose?

Choose DragonflyDB when

  • You need >200K QPS on a single node without cluster complexity
  • Memory footprint is a cost concern — saves 30–80%
  • You are migrating off Redis with zero code changes
  • Snapshotting memory spikes are hitting production
  • You are building AI inference caching or LLM pipelines
  • You want vertical scaling simplicity over cluster ops

Stick with Redis or Valkey when

  • You rely on RedisGraph, RedisTimeSeries, or deep module integrations
  • You need mature Redis Cluster semantics
  • You are on a managed cloud — use Valkey, it is the default
  • Your workload is heavily pipeline-batched — Valkey leads there
  • P95 read latency on simple patterns is your primary metric
  • Existing Redis 7.2 BSD deployments are running fine

The pragmatic 2025 verdictSelf-hosted high-throughput workloads: DragonflyDB wins. Cloud-managed: use Valkey — AWS, Google, and Azure have standardised on it. AI workloads needing Vector Sets or bundled Search/JSON: Redis 8, subject to AGPLv3 compliance review.

08Migration guide: Redis to DragonflyDB in 5 steps

Migrating from Redis to DragonflyDB requires zero code changes to your application. The two paths are live replication (zero downtime) and RDB file import.

Option A — Live replication (recommended, zero downtime)

1
Start a Dragonfly instance alongside Redis

Map it to an alternative port during testing.

docker run -p 6380:6379 docker.dragonflydb.io/dragonflydb/dragonfly
2
Point Dragonfly at Redis as a replica

Dragonfly syncs all data from your live Redis instance.

redis-cli -p 6380 REPLICAOF  6379
3
Verify sync is complete
redis-cli -p 6380 INFO replication
# Look for: master_link_status:up
# And:      master_sync_in_progress:0
4
Promote Dragonfly to primary

Stop writes to Redis, promote Dragonfly, then update your app connection string.

redis-cli -p 6380 REPLICAOF NO ONE
5
Monitor with built-in Prometheus metrics
curl http://localhost:6380/metrics

Option B — RDB snapshot import

# 1. Dump Redis to file
redis-cli BGSAVE

# 2. Copy snapshot to Dragonfly data directory
cp /var/lib/redis/dump.rdb /var/lib/dragonfly/

# 3. Start Dragonfly pointing at that directory
dragonfly --dbfilename dump.rdb --dir /var/lib/dragonfly/
Compatibility note Most Redis commands are fully supported. Module-specific commands (RedisGraph, full RedisTimeSeries) have partial or no support in Dragonfly. Run redis-cli --scan | xargs redis-cli TYPE to audit your data types before migrating.

09Frequently asked questions

Is DragonflyDB faster than Redis?
Yes, significantly for throughput. On identical hardware, DragonflyDB reaches 3.8 million QPS — roughly 25× Redis — by using all available CPU cores via shared-nothing sharding. For simple p95 latency on GET-heavy workloads at low concurrency, Redis 8 benchmarks slightly better. At high concurrency, Dragonfly wins decisively.
Can I use DragonflyDB as a drop-in replacement for Redis?
Yes. DragonflyDB is API-compatible with both Redis and Memcached protocols. For the vast majority of deployments you update your connection string and redeploy with zero code changes. Exceptions include advanced module usage — RedisGraph is unsupported and RedisSearch has partial support.
What is Valkey and how does it differ from DragonflyDB?
Valkey is a Redis fork launched April 2024 under the Linux Foundation, backed by AWS, Google, Oracle, and others under the BSD license. It maintains the traditional Redis single-threaded model and is positioned as the community continuation of Redis. DragonflyDB was built from scratch with a modern multi-threaded architecture — it is not a fork.
What happened to the Redis open-source license?
In March 2024, Redis Inc. switched from BSD to SSPL. In May 2025 with Redis 8, it adopted AGPLv3 as the primary open-source option. AGPLv3 is OSI-approved and genuinely open source — but the network copyleft clause may require SaaS providers to open-source their application code when exposing Redis 8 to external users. Cloud providers continue to back Valkey's simpler BSD license.
Does DragonflyDB support persistence?
Yes. DragonflyDB supports both RDB snapshots (via BGSAVE) and AOF logging. Snapshots use io_uring async I/O so they do not block the main event loop or cause the memory spikes seen in Redis during BGSAVE.
When should I choose Redis 8 over DragonflyDB?
Choose Redis 8 if you need its bundled module stack (JSON, Search, TimeSeries, Vector Sets for AI workloads), the most mature clustering semantics, managed cloud hosting without AGPL concerns (use Valkey via your cloud provider), or if your workload is heavily pipeline-batched where Valkey currently leads.
Your next step

Need help choosing the right in-memory datastore for your stack?

Auriga IT helps engineering teams evaluate, migrate, and optimise backend infrastructure — from Redis and DragonflyDB to full-stack application development. If your datastore is becoming a bottleneck, let's talk.

Backend engineering Database architecture Cloud infrastructure

Related content

Stay Close to What We’re Building

Get insights on product engineering, AI, and real-world technology decisions shaping modern businesses.

Go to Top