Databases 3 min read

Why Dragonfly DB Claims 25× Redis Speed and How to Get Started

Dragonfly DB is a high‑performance, Memcached‑ and Redis‑compatible in‑memory database that reportedly delivers up to 25× Redis throughput, with a shared‑nothing, multithreaded architecture; this guide shows quick Docker deployment on Linux/macOS, client access methods, Spring cache integration, and key usage notes.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
Why Dragonfly DB Claims 25× Redis Speed and How to Get Started

Dragonfly DB is a high‑performance, Memcached and Redis API compatible in‑memory database that claims 25× the performance of Redis and supports up to a million QPS per instance.

Quick Start

On Linux

<code>docker run --network=host --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly</code>

On macOS

<code>docker run -p 6379:6379 --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly</code>
On macOS the host network mode is not supported. See the related issue for details.

Windows version not supported

Using Client Access

Browser HTTP endpoint

http://127.0.0.1:6379

redis-cli access

Use redis-cli to query server version and other info.

<code>~  redis-cli
127.0.0.1:6379> info
# Server
redis_version:df-v0.13.1
redis_mode:standalone
arch_bits:64
multiplexing_api:iouring
tcp_port:6379
uptime_in_seconds:11
uptime_in_days:0
</code>

Spring Cache (Lettuce) client

Maven dependency

<code><dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
</code>

Application configuration

<code>spring:
  data:
    redis:
      host: 127.0.0.1
      port: 6379
</code>

RedisTemplate operations with DragonflyDB

<code>@Autowired
private RedisTemplate redisTemplate;
redisTemplate.opsForValue().set(key, value);
</code>

Summary

Since version 0.13, Dragonfly fully implements compatibility with all Redis server commands and protocols, allowing applications to connect to Dragonfly using the existing Redis ecosystem.

References

[1] Dragonfly DB: https://github.com/dragonflydb/dragonfly

[2] Related issue: https://github.com/docker/for-mac/issues/1031

Redis compatibilityIn-Memory DatabaseDocker DeploymentSpring CacheDragonflyDB
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.