DEV Community

Alex Spinov
Alex Spinov

Posted on

Valkey Has a Free Redis Fork That Is Truly Open Source

Redis changed its license. Valkey is the Linux Foundation-backed fork that keeps Redis open source — with the same API, same performance, and growing faster.

Why Valkey Exists

In March 2024, Redis switched from BSD to a dual-license (RSALv2 + SSPLv1). This means:

  • Cloud providers cannot offer Redis-as-a-service
  • Some commercial uses are restricted
  • It is no longer truly open source

Valkey is the community response: a BSD-3 licensed fork, backed by AWS, Google Cloud, Oracle, Ericsson, and the Linux Foundation.

Drop-in Redis Replacement

# Install Valkey
docker run -p 6379:6379 valkey/valkey:latest

# Use your existing Redis client — no code changes
redis-cli -p 6379
> SET hello world
> GET hello
"world"
Enter fullscreen mode Exit fullscreen mode

Every Redis client library works with Valkey. ioredis, redis-py, jedis — all compatible.

Node.js Usage

import Redis from "ioredis";

const redis = new Redis(6379, "localhost");

// Same API as Redis — zero changes needed
await redis.set("user:1", JSON.stringify({ name: "Alice" }));
const user = JSON.parse(await redis.get("user:1"));

// Pub/Sub
const sub = new Redis();
sub.subscribe("notifications");
sub.on("message", (channel, message) => {
  console.log(`${channel}: ${message}`);
});

const pub = new Redis();
await pub.publish("notifications", "New order received");

// Streams
await redis.xadd("events", "*", "type", "order", "total", "99.99");
Enter fullscreen mode Exit fullscreen mode

Valkey-Specific Improvements

Valkey is not just a fork — it is actively improving:

  1. Multi-threaded I/O — better performance on multi-core servers
  2. RDMA support — low-latency networking for data centers
  3. Improved cluster rebalancing — faster slot migration
  4. Per-slot dict — memory optimization for cluster mode

Cloud Availability

  • AWS ElastiCache: Migrating from Redis to Valkey
  • Google Cloud Memorystore: Adding Valkey support
  • Self-hosted: Docker, Kubernetes, any Linux server

Migration from Redis

# Step 1: Stop Redis
systemctl stop redis

# Step 2: Start Valkey (uses same data directory)
valkey-server /etc/valkey/valkey.conf

# Step 3: There is no step 3. You are done.
Enter fullscreen mode Exit fullscreen mode

Valkey reads Redis RDB/AOF files directly. Zero data migration needed.

Valkey vs Redis vs DragonflyDB

Redis 7 Valkey 8 DragonflyDB
License RSALv2/SSPL BSD-3 BSL 1.1
Truly open source No Yes No
API compatible 100% 99%
Multi-threaded No Partial Yes (full)
Max memory Single-thread bound Improved Multi-core
Backed by Redis Inc Linux Foundation Dragonfly Inc

Need caching or data infrastructure? I build developer tools and web scraping solutions. Email spinov001@gmail.com or check my Apify tools.

Top comments (0)