QUICK START:PatternsErrors & FixesSecurityBenchmarksDevOps RecipesCheatsheetsInterviewCompareTopicsHTMLCSSJavaScriptTypeScriptPythonSQLReactNext.jsNode.jsLinux & UbuntuKotlinSwiftC# / .NETJavaGoRustC++DSASystem DesignDevOpsCybersecurityAI / ML
Databases & Storage

In-Memory Key-Value Stores: Redis vs Memcached vs Dragonfly

Benchmarking in-memory datastores Redis, Memcached, and Dragonfly to observe performance at 1 million queries per second (QPS).

Test Environment

CPUAWS c6gn.16xlarge
RAM128GB
OSAmazon Linux 2023
Toolmemtier_benchmark

Metrics Comparison

Max Throughput

Unit: QPS
Dragonfly
3,800,000
Redis
450,000

Detailed Analysis

Dragonfly's multi-threaded share-nothing architecture crushes single-threaded Redis in vertical scaling on modern multicore CPUs.

Redis hits a wall because it processes commands on a single thread. Dragonfly utilizes all available cores.

Command Execution

Processing read/write ops

Bottleneck: Single-thread lock contention in Redis.

Architectural Recommendations

  • Drop in Dragonfly for massive single-node scaling
  • Use Redis Cluster for distributed horizontal scaling

Frequently Asked Questions

Is Dragonfly API compatible with Redis?

Yes, it supports the vast majority of standard Redis commands.