3 Best Open Source Alternatives to Redis

Updated July 2026

Redis is the in-memory key-value store that became infrastructure: sub-millisecond reads, a rich set of data structures, and a reputation as the default cache and queue behind countless applications. The reason this page exists is licensing, not technology. In 2024 Redis moved its core off the permissive open source license it had carried for years to a source-available model, and the people who had built on it as genuinely open software did not follow - large parts of the community and several major sponsors forked the last open release and kept developing it under a permissive open source license instead.

The alternative below is that fork's lineage: a drop-in compatible server that speaks the same protocol and commands, so existing clients and tooling keep working, while the project stays under an open license that cannot be pulled out from under you. You get the same store you already depend on, with governance and code that remain open.

Dragonfly logo

1.Dragonfly

30.7kOtherC++ Self-host
Dragonfly screenshot

Dragonfly is an in-memory data store for modern application workloads. It is compatible with Redis and Memcached APIs, so applications can adopt it without code changes. It targets cache and key-value database use cases while preserving atomicity guarantees for operations and low, sub-millisecond latency over high throughput.

  • Compatible with Redis and Memcached APIs
  • Supports about 185 Redis commands and all Memcached commands except cas
  • Shared-nothing architecture partitions the keyspace between threads
  • Cache mode with adaptive eviction near the maxmemory limit
Valkey logo

2.Valkey

26.1kOtherC Self-host
Valkey screenshot

Valkey is a high-performance data structure server for key/value workloads, optimized for caching and other realtime workloads. It was forked from the open source Redis project right before Redis moved to new source available licenses, giving teams an open source path for Redis-style workloads.

  • Key/value workloads with native data structures
  • Plugin system for new data structures and access patterns
  • Server configuration by valkey.conf or command line options
  • Optional TLS support, built in or as a module
KeyDB logo

3.KeyDB

12.5kBSD-3-ClauseC++ Self-host
KeyDB screenshot

KeyDB is a high performance fork of Redis focused on multithreading, memory efficiency, and high throughput. It keeps full compatibility with the Redis protocol, modules, and scripts, including atomicity guarantees for scripts and transactions, so existing Redis deployments can use it as a drop-in replacement.

  • Multithreaded Redis-compatible server
  • Full Redis protocol, module, and script compatibility
  • Active Replication for hot-spare failover
  • MVCC architecture for non-blocking KEYS and SCAN

Switching from Redis to open source

Start by separating the Redis roles in your system. A replacement that is fine for session caching may not be safe for streams, rate limits, distributed locks, pub/sub fanout, or leaderboard-style sorted sets. The main decision is command compatibility versus architectural change. If your applications rely on Redis clients, pipelines, transactions, Lua scripts, eviction policies, key expiration, or Redis Cluster behavior, a protocol-compatible server keeps the blast radius smaller. If Redis is being used as a durable workflow system or primary store, consider whether the migration is the right time to split cache semantics from persistence semantics.

The real gaps show up at the edges, not in simple GET and SET traffic. Watch for stream consumer group behavior, blocking commands, keyspace notifications, script determinism, module APIs, exact eviction behavior under memory pressure, and failover timing. Some open source replacements deliberately skip Redis modules or implement only the command surface used by common clients. Operational expectations also change: memory fragmentation, snapshot cost, append-only file rewrite behavior, replication lag, and cluster resharding may have different failure modes. Treat compatibility claims as a starting point, then test your actual command mix.

Migration off Redis usually starts with measurement rather than export. Capture command usage, key counts, value sizes, TTL distribution, slow operations, memory policy, persistence settings, and client connection patterns. For compatible targets, you can often load data from snapshots, append-only logs, or key scanning with DUMP and RESTORE where formats match. For safer cutovers, rebuild data through application writes, dual-write for a limited window, compare reads, then move clients by endpoint. TTLs, streams offsets, scripts, ACLs, and module-backed data need explicit validation or cleanup.

Related alternatives

Frequently asked questions

Is Redis still open source?+

Newer Redis releases use source-available licenses that are not generally treated as open source licenses. Older Redis code and compatible open source servers may have different terms, so the practical answer depends on the exact version and distribution you run. If licensing is the reason for switching, have legal or compliance review the replacement license and your deployment model.

How compatible does a Redis replacement need to be?+

It depends on how deep your Redis usage goes. Basic string, hash, list, set, and sorted set workloads are easier to replace than workloads using streams, blocking commands, Lua, modules, clustering, or precise eviction behavior. Build a command inventory from production metrics and logs, then test against that list instead of relying on a broad compatibility statement.

Will my existing Redis client libraries work with an open source alternative?+

Often they will if the server speaks the Redis protocol and supports the commands your application sends. The risky parts are connection options, cluster routing, authentication, TLS, pub/sub, pipelining, transactions, and error messages that clients parse. Test with the same client versions you run in production, including reconnect behavior during failover and resharding.

Which Redis data structures are most likely to cause migration issues?+

Simple strings and hashes usually move cleanly. Streams, sorted sets with tight ordering assumptions, geospatial indexes, HyperLogLog values, bitmaps, and module-created values deserve extra testing. The problem is not only whether the type exists, but whether edge cases match Redis behavior under trimming, expiration, blocking reads, score ties, large values, and concurrent writers.

What happens to Lua scripts when replacing Redis?+

Do not assume scripts are portable just because the target accepts the same command names. Redis script behavior depends on deterministic execution, command restrictions, key access rules, error handling, and replication semantics. Inventory every script SHA and source body, run them against realistic data, and check both return values and side effects. Complex scripts may be better moved into application code.

Are Redis modules supported by open source replacements?+

Module support varies widely, and it is one of the least portable parts of a Redis deployment. If your application uses module-provided data types, indexes, search, time series, or JSON-like operations, verify support before planning a drop-in migration. Data created by modules may not be readable through normal Redis export paths, so you may need application-level reindexing or transformation.

How should I benchmark a Redis alternative?+

Use your workload, not only synthetic GET and SET tests. Include key sizes, pipeline depth, connection counts, TTL churn, eviction pressure, persistence settings, replication, and failover. Measure tail latency, not just average throughput. If Redis is used as a cache, test hit rate behavior under memory pressure. If it is used durably, test recovery time and data loss windows.

Can an open source replacement handle Redis Cluster workloads?+

Some replacements support Redis Cluster-style behavior, while others expect a different sharding or proxy model. Check hash slot routing, MOVED and ASK responses, multi-key command rules, resharding behavior, replica promotion, and client library support. A small cluster test is not enough; simulate node loss, slot migration, and client reconnect storms before moving production traffic.

What is the safest way to migrate existing Redis data?+

For compatible systems, snapshots, append-only logs, or DUMP and RESTORE can preserve many native values, sometimes including TTLs. The safer but slower path is application-level rebuild plus a short dual-write period. Use SCAN-style iteration instead of blocking full keyspace commands. Validate counts, TTL ranges, sample values, stream offsets, and memory usage before cutting over clients.

Will TTLs and eviction policies behave the same after migration?+

Not automatically. Redis TTLs, lazy expiration, active expiration, and eviction policies interact with memory limits and workload shape. A replacement may use different sampling, memory accounting, or background cleanup behavior. For cache workloads, test under the same memory pressure you expect in production. For correctness-sensitive keys, avoid depending on exact expiration timing.

Is Redis pub/sub a good fit to move unchanged?+

Redis pub/sub is ephemeral: messages are not retained for offline consumers. If your current system accepts that behavior, a compatible replacement may work. If you have been relying on pub/sub for durable workflows, migration is a good time to reassess. Test reconnect behavior, pattern subscriptions, fanout volume, slow subscribers, and failover, because these details often differ.

How do backups and restores differ from Redis?+

Check the replacement's snapshot format, append-only log behavior, restore speed, and consistency guarantees during writes. Redis-style backups can be fast to create but expensive to restore for large in-memory datasets. Practice full restore, not just backup creation. Also verify whether ACLs, TTLs, stream metadata, cluster topology, and module data are included or need separate handling.

What security features should I verify before switching?+

Match the Redis controls you actually use: network binding, TLS, client authentication, ACL categories, command renaming or disabling, audit logging, and secrets rotation. If you run in a regulated environment, also check vulnerability handling, release signing, dependency scanning, and independent review history. A compatible protocol does not guarantee equivalent security defaults or operational controls.

Does replacing Redis reduce infrastructure cost?+

It can, but licensing is only one part of the cost. Redis workloads are often memory-heavy, so hardware, replication overhead, persistence settings, backups, monitoring, and operator time dominate the bill. A lower-cost server that needs more memory or more manual failover may not save money. Benchmark resource use and recovery operations before changing procurement assumptions.

What if the open source Redis alternative is abandoned?+

Plan for exit before adoption. Prefer standard protocols, ordinary data types, documented persistence formats, and client compatibility that lets you move again. Keep migration scripts, periodic exports, and restore tests current. Watch whether security fixes, dependency updates, and release processes are happening in a way your team can rely on. If the project stalls, your best protection is portability.