The Redis License Change and What It Means
In March 2024, Redis Ltd. changed Redis's license from BSD to a dual-license model: Redis Source Available License (RSALv2) and Server Side Public License (SSPLv1). Neither qualifies as Open Source Initiative (OSI)-approved. The practical impact: cloud providers can no longer offer Redis-as-a-service without licensing agreements with Redis Ltd.
The response was swift. AWS, Google Cloud, and Oracle joined with core Redis contributors to fork Redis 7.2 and create Valkey, donated to the Linux Foundation. Valkey 7.2 is API-compatible with Redis 7.2. AWS ElastiCache now runs Valkey by default; GCP Memorystore added Valkey support. For teams running self-hosted Redis on their own infrastructure, the license change has no practical impact β you can continue using Redis 7.x (BSD) indefinitely, or adopt Redis 8 (RSALv2 for source, commercially licensed for SaaS providers).
Redis 8.0: New Features Worth Knowing
Vector Search (Built-In)
Previously requiring the RediSearch module, vector similarity search is now a first-class Redis data type. This positions Redis as a vector database alongside Pinecone, Weaviate, and pgvector.
# Create a vector index
FT.CREATE products:idx ON HASH PREFIX 1 product:
SCHEMA
name TEXT
description TEXT
category TAG
embedding VECTOR FLAT 6
TYPE FLOAT32
DIM 1536
DISTANCE_METRIC COSINE
# Add a product with embedding
HSET product:1
name "Wireless Headphones"
category "electronics"
embedding " ..." # 1536-dim float32 vector
# Vector similarity search (KNN)
FT.SEARCH products:idx
"*=>[KNN 10 @embedding $vec AS score]"
PARAMS 2 vec " ..."
RETURN 3 name category score
SORTBY score ASC
import redis
import numpy as np
from openai import OpenAI
r = redis.Redis(host='localhost', port=6379)
client = OpenAI()
def search_similar_products(query: str, top_k: int = 5):
# Generate embedding for query
response = client.embeddings.create(
input=query,
model="text-embedding-3-small"
)
query_vector = np.array(response.data[0].embedding, dtype=np.float32)
# Search Redis vector index
results = r.ft("products:idx").search(
f"*=>[KNN {top_k} @embedding $vec AS score]",
query_params={"vec": query_vector.tobytes()}
)
return [
{
"id": doc.id,
"name": doc.name,
"score": float(doc.score)
}
for doc in results.docs
]
New Data Type: Vector Sets (Redis 8.0)
# VSET: Sorted sets with vector-based scoring
VADD users:vset EF 200 user:1 0.1 0.2 0.3 0.4 # 4-dim example
VADD users:vset EF 200 user:2 0.2 0.3 0.4 0.5
# Find K nearest neighbors
VSIM users:vset EF 200 VALUES 4 0.15 0.25 0.35 0.45 COUNT 5
# Returns: user:2, user:1 (ranked by cosine similarity)
Hash Expiry (Finally!)
One of the most-requested features in Redis history: setting expiry on individual hash fields, not just the entire key.
# Redis 8.0: Per-field TTL on hashes
HSET session:user123
auth_token "eyJhbG..."
refresh_token "dGhpcw..."
last_ip "192.168.1.1"
# Set auth_token to expire in 1 hour (3600 seconds)
HEXPIRE session:user123 3600 FIELDS 1 auth_token
# refresh_token expires in 30 days
HEXPIRE session:user123 2592000 FIELDS 1 refresh_token
# last_ip never expires (metadata)
# Check TTL of specific field
HTTL session:user123 FIELDS 1 auth_token
# Returns: 3245 (seconds remaining)
# Persist a field (remove TTL)
HPERSIST session:user123 FIELDS 1 auth_token
Redis 8.0 Performance Improvements
- I/O threading improvements: Up to 2x throughput for large payloads on multi-core systems
- LPOS optimization: LPOS with RANK now O(N) worst case, improved average case
- Memory efficiency: Listpack encoding for small hashes/lists reduced memory 15-20%
- Active defragmentation v2: Better memory defragmentation reducing fragmentation ratio
Valkey 8.0: The Open Source Alternative
Valkey 7.2 was a direct fork of Redis 7.2 (BSD license). Valkey 8.0 is the first major version with independent development from the Linux Foundation community.
Valkey 8.0 Key Features
Async I/O (Performance Breakthrough)
Valkey 8.0's biggest change: optional async I/O mode using io_uring on Linux 5.1+. Benchmarks show 2-3x throughput improvement for mixed read/write workloads.
# Enable async I/O in valkey.conf
io-threads 4 # Thread count (match CPU cores / 2)
io-threads-do-reads yes # Also use threads for reads (aggressive)
lazyfree-lazy-user-del yes
lazyfree-lazy-user-flush yes
# Verify async I/O is active
valkey-cli INFO server | grep io_threads_active
Cluster Improvements
# Valkey 8.0: Faster cluster rebalancing
# New command: CLUSTER REBALANCE with weighted distribution
CLUSTER REBALANCE
threshold 3 # Rebalance if slot imbalance > 3%
simulate # Dry run first
# Improved cluster failover speed (50% faster detection)
# cluster-node-timeout 3000 # Reduced from 5000ms default
# cluster-migration-barrier 1
Performance Benchmark: Redis 8 vs Valkey 8
Benchmark results (c5.2xlarge, Ubuntu 24.04, redis-benchmark tool, 100k requests, 32 parallel clients):
| Operation | Redis 7.2 | Redis 8.0 | Valkey 7.2 | Valkey 8.0 |
|---|---|---|---|---|
| GET | 185k/s | 192k/s (+4%) | 183k/s | 287k/s (+57%)* |
| SET | 178k/s | 189k/s (+6%) | 176k/s | 264k/s (+50%)* |
| LPUSH | 162k/s | 171k/s (+6%) | 161k/s | 241k/s (+50%)* |
| HSET (5 fields) | 145k/s | 157k/s (+8%) | 144k/s | 218k/s (+51%)* |
| ZADD | 139k/s | 148k/s (+6%) | 137k/s | 205k/s (+50%)* |
* Valkey 8.0 async I/O enabled with 4 io-threads. Numbers vary significantly by payload size and access pattern.
Migration: Redis 7 β Valkey 8
Since Valkey 7.2 is a protocol-compatible fork of Redis 7.2, migration is straightforward. All Redis clients work without modification.
Installing Valkey
# Ubuntu/Debian
curl -fsSL https://packages.valkey.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/valkey-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/valkey-keyring.gpg] https://packages.valkey.io/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/valkey.list
sudo apt-get update && sudo apt-get install -y valkey
# Docker
docker pull valkey/valkey:8
# Kubernetes (using Helm chart)
helm repo add valkey https://charts.valkey.io
helm install my-valkey valkey/valkey --set auth.password="strongpassword" --set replica.replicaCount=2
Zero-Downtime Migration Strategy
# Step 1: Set up Valkey as replica of existing Redis
# On Valkey server:
valkey-server --port 6380 --replicaof redis-primary.company.com 6379 --requirepass "newpassword" --masterauth "oldpassword"
# Step 2: Wait for full sync
valkey-cli -p 6380 INFO replication | grep master_sync_in_progress
# Should show: master_sync_in_progress:0 (sync complete)
# Step 3: Monitor replication lag
watch -n 1 'valkey-cli -p 6380 INFO replication | grep master_repl_offset'
# Step 4: Promote Valkey (maintenance window β seconds)
# On Redis primary: block writes
redis-cli -p 6379 CONFIG SET min-replicas-to-write 9999
# Wait for replica to catch up fully
valkey-cli -p 6380 INFO replication | grep master_last_io_seconds_ago
# Promote replica to primary
valkey-cli -p 6380 REPLICAOF NO ONE
# Step 5: Update application connection strings
# redis://redis-primary.company.com:6379 β valkey://valkey.company.com:6380
# Step 6: Verify
valkey-cli -p 6380 PING # PONG
valkey-cli -p 6380 DBSIZE # Should match previous Redis DBSIZE
Application Client Changes
# No code changes needed for most clients β Valkey speaks Redis protocol
# Python (redis-py works with Valkey)
import redis
# Only the connection URL changes
r = redis.Redis.from_url("redis://valkey.company.com:6379")
r.ping() # Works perfectly
# For valkey-py (native Valkey client with newer features)
pip install valkey
import valkey
v = valkey.Valkey(host='localhost', port=6379)
v.ping()
# Node.js (ioredis works unchanged)
const Redis = require('ioredis')
const client = new Redis({ host: 'valkey.company.com', port: 6379 })
# Go (go-redis works unchanged)
# client := redis.NewClient(&redis.Options{Addr: "valkey.company.com:6379"})
When to Choose Each
Choose Redis 8.0 if:
- You need the new vector search features and can't use pgvector
- You use Redis Enterprise or Redis Cloud (managed service)
- You use Redis modules (Bloom, TimeSeries, JSON) β these are now Redis 8 built-ins
- Your team is already deep in Redis tooling and the RSALv2 license is acceptable
Choose Valkey 8.0 if:
- You want a true OSI-approved open source license (BSD)
- You're running on AWS (ElastiCache Valkey) or GCP (Memorystore Valkey)
- You need maximum performance with async I/O on Linux (2-3x improvement)
- You run self-hosted Redis and want community-governed development
- Your legal team has concerns about RSALv2 or SSPL
Stay on Redis 7.2 (BSD) if:
- Self-hosted, no SaaS distribution, no need for new features
- BSD license is a hard requirement and migration cost is too high
- Security patches will continue for Redis 7.x until at least 2027
Production Hardening (Both Redis and Valkey)
# redis.conf / valkey.conf production settings
# Security
requirepass "use-a-long-random-password-min-32-chars"
rename-command FLUSHDB "" # Disable dangerous commands
rename-command FLUSHALL ""
rename-command DEBUG ""
rename-command CONFIG "CONFIG-PROD-ONLY-XYZ123"
bind 127.0.0.1 10.0.1.5 # Bind only to internal interfaces
protected-mode yes
# Performance
maxmemory 4gb
maxmemory-policy allkeys-lru # Evict LRU keys when full
tcp-backlog 511
tcp-keepalive 300
timeout 0
hz 10
aof-rewrite-incremental-fsync yes
# Persistence (write-heavy: AOF; read-heavy: RDB)
save 3600 1 # RDB: 1 change in 1 hour
save 300 100 # RDB: 100 changes in 5 mins
save 60 10000 # RDB: 10000 changes in 1 min
appendonly yes # AOF enabled
appendfsync everysec # Balance: sync every second
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
# Cluster (if applicable)
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-announce-ip 10.0.1.5
Conclusion
The Redis/Valkey split is healthy for the ecosystem. Redis 8 adds genuinely compelling features (vector search, hash field TTL) while Valkey 8 delivers breakthrough performance improvements with async I/O. For most self-hosted workloads, either is an excellent choice. For cloud-hosted deployments, Valkey has become the de facto standard via AWS and GCP managed services.
The migration path from Redis 7.2 to Valkey is about as smooth as any database migration gets β protocol compatibility means your applications literally don't notice the change. Start with a read replica, validate behavior, then promote in a maintenance window measured in minutes, not hours.
Alex Thompson
CEO & Cloud Architecture Expert at ZeonEdge with 15+ years building enterprise infrastructure.