DEV Community

Alex Spinov
Alex Spinov

Posted on

Valkey Has a Free API — Heres How to Use the Open-Source Redis Fork

Valkey is the Linux Foundation fork of Redis — fully open source, community-driven, and 100% compatible. When Redis changed its license, the community created Valkey.

Why Valkey?

  • Truly open source: BSD-3 license, Linux Foundation backed
  • Redis-compatible: Drop-in replacement
  • Community-driven: AWS, Google, Oracle, Ericsson contributors
  • Active development: New features and performance improvements
  • No license risk: Use commercially without restrictions

Install

# Docker
docker run -p 6379:6379 valkey/valkey:latest

# From source
git clone https://github.com/valkey-io/valkey.git
cd valkey && make && make install

# Start
valkey-server
Enter fullscreen mode Exit fullscreen mode

Same Commands, Same Clients

import { createClient } from 'redis';

// Same redis client — just point to Valkey
const client = createClient({ url: 'redis://localhost:6379' });
await client.connect();

await client.set('key', 'value');
await client.get('key'); // 'value'

// All data structures work
await client.hSet('user:1', { name: 'Alice', email: 'alice@example.com' });
await client.lPush('queue', 'task1', 'task2', 'task3');
await client.sAdd('tags', 'javascript', 'typescript', 'nodejs');
await client.zAdd('scores', [{ score: 100, value: 'alice' }]);
Enter fullscreen mode Exit fullscreen mode

Python

import redis

r = redis.Redis(host='localhost', port=6379)
r.set('hello', 'world')
print(r.get('hello'))  # b'world'

# Streams
r.xadd('events', {'type': 'click', 'page': '/home'})
events = r.xread({'events': '0'}, count=10)
Enter fullscreen mode Exit fullscreen mode

Valkey-Specific: RDMA Support

Valkey 8+ supports RDMA (Remote Direct Memory Access) for ultra-low latency in data center deployments:

valkey-server --rdma-enabled yes --rdma-port 6380
Enter fullscreen mode Exit fullscreen mode

Migration from Redis

# 1. Stop Redis
systemctl stop redis

# 2. Install Valkey
apt install valkey

# 3. Copy data
cp /var/lib/redis/dump.rdb /var/lib/valkey/dump.rdb

# 4. Start Valkey
systemctl start valkey
Enter fullscreen mode Exit fullscreen mode

No data format changes. No client changes. No application changes.

Valkey vs Redis Comparison

Feature Valkey Redis (post-7.4)
License BSD-3 SSPL (not OSI)
Governance Linux Foundation Redis Ltd
Commercial use Unrestricted Restricted
Community PRs Accepted Limited
Cloud hosting Anyone can host Restricted

Real-World Use Case

After Redis changed its license, a cloud provider migrated 500+ customer instances from Redis to Valkey in one weekend. Zero application changes, zero downtime, zero customer complaints — because Valkey is byte-for-byte compatible.


Need to automate data collection? Check out my Apify actors for ready-made scrapers, or email spinov001@gmail.com for custom solutions.

Top comments (0)