Back to articles
Technology Insight

Scaling Beyond Redis: Deploying Dragonfly Database on High-Spec VPS for Million-Plus RPS Performance

June 2, 2026

Introduction: The Vertical Scaling Challenge in Modern In-Memory Datastores

For over a decade, Redis has been the undisputed champion of in-memory data structures, serving as the caching backbone for countless high-traffic applications. However, as modern infrastructure evolves, engineering teams increasingly face a frustrating bottleneck: the single-threaded limitation of Redis. While cloud providers and VPS hosts now offer massive virtual private servers with dozens of CPU cores and hundreds of gigabytes of RAM, a standard Redis instance can only utilize a single CPU core for its main event loop.

To utilize the full power of a large VPS, engineering teams traditionally had to resort to clustering or running multiple Redis instances on a single machine. This approach introduces significant architectural complexity, increases serialization overhead, and complicates data management. Enter Dragonfly Database—a modern, drop-in replacement for Redis designed from the ground up to utilize 21st-century hardware architectures. In this comprehensive guide, we will explore how Dragonfly achieves over a million requests per second (RPS) on a single large VPS using its innovative multi-threaded architecture.

The Architectural Pivot: Why Redis Struggles on Large VPS Hardware

To appreciate Dragonfly’s breakthroughs, it is essential to understand why traditional Redis struggles to scale vertically on high-spec hardware:

  • Single-Threaded Event Loop: Redis uses a single-threaded loop based on multiplexing (via epoll or kqueue). While this eliminates race conditions and lock contention, it means that a 64-core VPS will have 63 cores sitting idle while one core is completely saturated under heavy load.
  • Cluster Complexity: Running Redis Cluster on a single physical host requires managing multiple ports, configuring cluster bus connections, and handling data sharding via hash slots. This adds unnecessary DevOps overhead and introduces latency during cross-slot operations.
  • Memory Inefficiency During Snapshots: When performing background saving (BGSAVE), Redis relies on the OS fork() system call. Under heavy write loads, copy-on-write (COW) mechanisms can cause memory usage to double, leading to out-of-memory (OOM) crashes if the VPS does not have massive memory headroom.

Dragonfly’s Secret Weapon: The Shared-Nothing Multi-Threaded Architecture

Dragonfly addresses these limitations by abandoning the single-threaded paradigm in favor of a shared-nothing, multi-threaded architecture built on top of the advanced Seastar async framework. Instead of routing all traffic through one thread, Dragonfly spawns an execution thread for every available CPU core allocated to the VPS.

The Shared-Nothing Principle

In a traditional multi-threaded system, threads share a common memory space and rely on mutexes or spinlocks to prevent data corruption. This often leads to severe lock contention, limiting scalability. Dragonfly bypasses this by utilizing a shared-nothing approach. The entire keyspace is divided into discrete partitions (shards), and each thread is granted exclusive ownership over its specific shard. No thread ever touches another thread’s memory directly, eliminating the need for expensive CPU-locking mechanisms.

VLL (Very Large Locking) for Multi-Key Operations

What happens when a command needs to access keys spanning multiple shards? Dragonfly utilizes a novel transaction framework called Very Large Locking (VLL). When a multi-key command is executed, a coordinator thread locks the required slots across the respective shards atomically, executes the operation without classic distributed locks, and releases them. This ensures high throughput even for complex transactions.

Step-by-Step Guide: Deploying Dragonfly on a High-Spec VPS

Deploying Dragonfly as a Redis replacement is remarkably straightforward due to its high degree of API compatibility. Let us look at how to deploy and optimize Dragonfly on a modern high-spec VPS (e.g., an Ubuntu server with 32 vCPUs and 128GB RAM).

Step 1: Installing Dragonfly via Docker

The cleanest way to deploy Dragonfly on a production VPS is using Docker. Ensure your Docker daemon is configured to leverage host networking for maximum I/O performance.

docker run --name production-dragonfly 
  --network host 
  --ulimit memlock=-1 
  -v /mnt/data/dragonfly:/data 
  docker.dragonflydb.io/dragonflydb/dragonfly 
  --bind 0.0.0.0 
  --requirepass YourSecurePasswordHere 
  --maxmemory 110gb 
  --snapshot_cron "0 */3 * * *"

Step 2: Key Flags for High-Performance VPS Tuning

When running on large instances, tuning the configuration flags is vital to unlocking maximum throughput:

  • --proactor_threads: Specifies the number of threads Dragonfly will run. By default, it detects and uses all available CPU cores. On a dedicated VPS, leave this to default; if sharing the host, limit it to dedicated cores.
  • --maxmemory: Restricts Dragonfly’s memory usage. Because Dragonfly doesn’t use the standard Redis fork mechanism, you can safely allocate up to 85-90% of your total VPS RAM without fearing OOM spikes during backups.
  • --cache_mode: If you are strictly using Dragonfly as a cache, set this flag to true. It enables efficient Least Recently Used (LRU) eviction heuristics optimized for multi-threaded access.

Benchmarking Results: Reaching the Million RPS Milestone

To validate Dragonfly’s performance advantages, let us look at typical benchmark comparisons run on identical high-spec VPS environments using redis-benchmark or memtier_benchmark pipelines.

“Under a mixed read/write workload, a single Dragonfly instance utilizes 100% of the allocated vCPUs linearly. Where Redis performance plateaus around 100,000 to 150,000 RPS on a single core, Dragonfly scales linearly to 1,000,000+ RPS as more cores are introduced.”

MetricStandard Redis (Single Instance)Dragonfly Database
Max RPS (32 Cores Host)~140,000 RPS1,200,000+ RPS
Memory Efficiency (During Save)Up to 2x Overallocation RequiredNear-Zero Memory Spike (<10%)
Architecture ComplexityHigh (Requires Cluster/Sentinel)Low (Single Binary / Process)
Tail Latency (p99)Increases heavily under loadSub-millisecond stable latency

Seamless Migration: Drop-In Compatibility with Existing Stacks

One of the biggest advantages of Dragonfly is its wire-protocol compatibility with Redis. It supports standard Redis commands, data types (Strings, Hashes, Lists, Sets, Sorted Sets, HyperLogLogs, and Streams), and works natively with existing client libraries such as ioredis, redis-py, and jedis.

To migrate your application stack from Redis to Dragonfly, the transition typically requires nothing more than updating your environment variables:

# Old Redis Configuration
REDIS_URL=redis://:password@vps-ip:6379/0

# New Dragonfly Configuration
REDIS_URL=redis://:password@vps-ip:6379/0

Your application will communicate with Dragonfly seamlessly, immediately benefiting from the massive increase in available throughput and reduced p99 tail latencies.

Conclusion: Is Dragonfly Right for Your Business Infrastructure?

Transitioning from Redis to Dragonfly is an ideal strategy for mid-to-large-scale enterprises looking to simplify their data infrastructure. By consolidating complex Redis clusters into a single, highly efficient Dragonfly instance on a large VPS, engineering teams can cut operational complexity, lower cloud infrastructure costs, and confidently handle millions of requests per second.

If your application infrastructure is hitting the limits of single-threaded performance or suffering from the operational friction of cluster management, it is time to evaluate Dragonfly. It represents a major leap forward in vertical scaling efficiency for modern backend architectures.

Scaling Beyond Redis: Deploying Dragonfly Database on High-Spec VPS for Million-Plus RPS Performance | DPTCloud