Why Valkey Exists (The Short Version)
Redis Labs changed their license from BSD to a dual SSPL/RSAL license in March 2024. This made it impossible for cloud providers to offer managed Redis without a commercial agreement. AWS, Google, Oracle, and others backed the Valkey fork under the Linux Foundation with a BSD-3-Clause license.
Politics aside, the relevant question is whether the software is better. The following sections examine the actual engineering.
RESP3: The Protocol Nobody Uses (But Should)
RESP3 (Redis Serialization Protocol v3) was introduced in Redis 6 but barely anyone uses it because RESP2 still works and most client libraries default to it. This is a mistake.
RESP3 introduces typed responses. In RESP2, everything is either a string, integer, array, or error. Your client library has to guess types:
# RESP2 response to HGETALL
*4
$4
name
$5
Lucio
$3
age
$2
38
# Client must know that alternating elements form key-value pairs
# and that "38" should probably be an integer
# RESP3 response to HGETALL
%2
$4
name
$5
Lucio
$3
age
$2
38
# The % prefix means "map with 2 entries"
# Hash values remain strings; RESP3 does not infer application field types.
RESP3 changes response representation; any application CPU effect requires measurement with the actual client and workload.
See the HGETALL command reference for the response shape. To enable RESP3 on an existing connection:
# Python with valkey-py (fork of redis-py)
import valkey
client = valkey.Valkey(
host='valkey-primary.internal',
port=6379,
protocol=3 # This sends HELLO 3 on connect
)
# RESP3 preserves hash field values as strings
result = client.hgetall('user:1001')
# With the default bytes decoding: {b'name': b'Lucio', b'age': b'38'}
# Convert application fields explicitly when a number is required.
Multi-Threaded I/O: Where Valkey Actually Diverges
Redis has had io-threads since version 6, but it was limited to write operations and felt like an afterthought. Valkey took this further with both read and write threading, and the implementation is genuinely different.
The architecture:
Main Thread
┌──────────┐
│ Command │
│ Execution│
│ (single) │
└────┬─────┘
│
┌──────────┼──────────┐
│ │ │
┌────┴───┐ ┌───┴────┐ ┌──┴─────┐
│ I/O │ │ I/O │ │ I/O │
│Thread 1│ │Thread 2│ │Thread 3│
│ read/ │ │ read/ │ │ read/ │
│ write │ │ write │ │ write │
└────────┘ └────────┘ └────────┘
Command execution is still single-threaded (this is fundamental to Valkey/Redis's consistency model, no locking needed). But I/O parsing and response serialization happen in parallel across threads. Here is a configuration that works well on 8-core instances:
# valkey.conf
io-threads 4
io-threads-do-reads yes
# Don't set io-threads higher than your core count minus 2
# Main thread + background tasks need CPU headroom
# 4 threads on 8-core is typically the sweet spot
# Increase the backlog for high-connection workloads
tcp-backlog 4096
The following commands illustrate benchmark inputs; no measured comparison is published here:
# Single connection (no threading benefit expected)
valkey-benchmark -h 127.0.0.1 -p 6379 -c 1 -n 1000000 \
-t set,get -d 256 --threads 1
# 200 connections (where threading matters)
valkey-benchmark -h 127.0.0.1 -p 6379 -c 200 -n 5000000 \
-t set,get -d 256 --threads 4
# 1000 connections (stress test)
valkey-benchmark -h 127.0.0.1 -p 6379 -c 1000 -n 10000000 \
-t set,get -d 256 --threads 8
Migration checks
The official Valkey migration guide documents compatibility with Redis OSS 7.2 and earlier and distinguishes those versions from Redis CE 7.4 and later. Check the exact source and destination versions before choosing a procedure.
Record backup and restore steps, replication state, client behavior, eviction policy and rollback conditions. Validate the transition before directing application traffic to the replacement.
Measuring memory
Compare identical datasets and record server configuration, allocator statistics and resident memory. Keep raw measurements rather than inferring savings from the product name.
valkey-cli INFO memory
Client Library State
This matters more than most articles admit. The client library ecosystem determines whether migration is trivial or painful.
| Language | Library | Status |
|---|---|---|
| Python | valkey-py | Production-ready, fork of redis-py |
| Node.js | iovalkey | Production-ready, fork of ioredis |
| Java | Jedis 5.x | Native Valkey support |
| Go | go-valkey | Production-ready, Valkey-first design |
| Rust | valkey-rs | Based on redis-rs, works |
| .NET | StackExchange.Redis | Works with Valkey (protocol-compatible) |
Using iovalkey in Node.js, the migration is a package swap and config change:
// Before
import Redis from 'ioredis';
const client = new Redis({
host: 'redis-primary.internal',
port: 6379,
maxRetriesPerRequest: 3,
});
// After
import { Valkey } from 'iovalkey';
const client = new Valkey({
host: 'valkey-primary.internal',
port: 6379,
maxRetriesPerRequest: 3,
// Enable RESP3 for typed responses
protocol: 3,
});
Deciding whether to migrate
Compare compatibility, operational support, licensing requirements and measurements on your own workload. Retain rollback options and make the decision from that evidence. This guide does not establish a universal performance advantage for either product.
Editorial method and scope
Reviewed on November 10, 2026. Unsupported claims of personal production experience and numerical results were removed. The remaining examples explain techniques; their presence is not a claim that they were executed in this review. Where linked projects report measurements, those results apply only to their documented configurations and datasets. This revision is not a complete validation of every API, version or code sample in the article.