Redis vs Valkey: Caching for High Traffic Storefronts
In March 2024 Redis changed its license and the Linux Foundation answered with Valkey, a BSD licensed fork backed by the big cloud vendors. For most storefront teams the real question is not ideology but whether switching saves money or removes risk. Here is how to decide.
Your storefront probably depends on a Redis protocol server you have never had to think about. It holds sessions, cart snapshots, rate limit counters, and the cached responses that keep your catalog from hammering the commerce backend on a Tuesday afternoon, let alone on Black Friday. It just works, which is exactly why a licensing dispute in 2024 caught so many teams off guard. Suddenly the quiet piece of infrastructure had a fork, a roadmap debate, and a procurement question attached to it.
The Redis vs Valkey decision is mostly not a technical fight. The two servers share a common ancestor and speak the same protocol. The decision is about licensing posture, who operates the thing, what your cloud provider offers, and how much risk you want to carry for features you may not use. This article gives you an opinionated way to decide.
What Actually Happened to Redis
For years Redis was distributed under a permissive BSD license. In March 2024 the company behind it moved new versions to a dual source available arrangement: the Server Side Public License and the Redis Source Available License. Neither is recognized as open source by the Open Source Initiative, and both restrict how cloud vendors can offer the software as a managed service.
The Linux Foundation moved fast. Valkey was announced about eight days later, continuing from the last BSD licensed code. Early backers included AWS, Google Cloud, Oracle, Ericsson, and Snap. Valkey stays under a BSD license and is governed in the open rather than by a single vendor.
Then the story turned again. With Redis 8 in 2025, Redis added the AGPLv3 license as an additional option, which is OSI approved, and folded features that used to ship as separate modules into the core. So the clean "open versus closed" framing from 2024 is out of date. Today the honest summary is that Redis is open source again under a copyleft license, Valkey is open source under a permissive one, and the two codebases are drifting apart on features.
Verify current license terms and version numbers against the official project pages before you sign anything. This area has moved twice in two years.
Compatibility: Less Scary Than It Sounds
Valkey began as a fork of Redis 7.2.4, so for the commands a storefront actually uses (strings, hashes, sets, sorted sets, lists, expiry, pub/sub, Lua scripting, streams, transactions), client libraries do not know the difference. Your Node.js client, your Python client, and your framework cache adapters connect to either server the same way.
Compatibility gets thinner at the edges:
- Redis 8 bundled capabilities such as JSON, search, time series, and vector features into the core. If your application uses those, Valkey may need separate modules or different tooling.
- Each project has added its own newer features since the split, so "drop in replacement" is true for the shared core and less true for anything introduced after 2024.
- Operational details such as configuration directives, metrics names, and cluster tooling can differ in small ways that matter to your runbooks.
A sensible test is to point a staging environment at Valkey, replay representative traffic, and watch for command errors in logs. If your storefront only uses the core data structures, you will likely find nothing. If you use Redis modules, the migration is a real project rather than a configuration flip.
Managed Offerings Drive Most Decisions
Very few commerce teams run their own cache cluster, and that is the right call. Which means the managed menu matters more than the license text.
AWS ElastiCache and MemoryDB, Google Cloud Memorystore, and other providers now offer Valkey, and the major cloud vendors have publicly backed the project. AWS has priced Valkey below its Redis OSS offerings on ElastiCache, so check current pricing in your region; if you are already paying for managed Redis there, the swap can lower your bill with little engineering effort. Redis the company sells its own managed service and enterprise products, with features and support contracts that Valkey's ecosystem does not replicate one for one.
Serverless and edge friendly options sit in a different category. If you are using a pay per request HTTP accessible store from a serverless runtime, our comparison of Redis vs Upstash for caching covers when that model beats a provisioned cluster. The short version: provisioned Redis or Valkey wins on steady high throughput, and serverless wins on spiky or low volume workloads where idle cost dominates.
Cart and Session Patterns That Survive Peak Traffic
Whichever server you pick, the patterns matter more than the logo. A few that hold up under load:
Treat the cart as a cache of the source of truth, not the source itself. If your commerce platform owns carts (Shopify, commercetools, BigCommerce), keep your own cart cache short lived and rebuildable. When the cache is cold, rehydrate from the platform. Teams that make the cache authoritative discover the hard way that an eviction during a sale equals lost carts.
Keep sessions small and keyed predictably. Store a session ID and a few references, not serialized page state. A hash per session with an expiry that slides on activity is simple and cheap. Large blobs inflate memory, slow replication, and make failover painful.
Separate workloads by instance or at least by key prefix and eviction policy. Rate limiting counters, session data, and disposable page fragments have different tolerance for eviction. Sessions should not be evicted under memory pressure; fragment caches should. Mixing them on one instance with a single policy means one of them is configured wrong.
Plan for failover as a normal event. Clients should reconnect with backoff, and your storefront should degrade to the origin rather than error when the cache is unreachable. A cache outage should make you slower, not down.
Cache Invalidation Does Not Care About Your Fork
The hardest part of caching is never the store. It is knowing when an entry is wrong. A price change, an inventory update, or a promotion ending has to propagate to every layer: the key value cache, the framework data cache, and the CDN.
Use tag or prefix based invalidation driven by commerce webhooks, keep time to live values short enough that a missed webhook self corrects, and avoid cache keys that include unbounded user specific data. We cover the full webhook to purge flow in cache invalidation for headless commerce, and the cache key discipline that keeps personalized pages from poisoning shared entries in edge caching for personalized storefronts. Both apply identically to Redis and Valkey. Swapping the engine will not fix a stale price bug.
The Decision Framework
| Situation | Lean toward | Why |
|---|---|---|
| Already on managed Redis at a major cloud | Valkey | Lower cost possible, minimal change, permissive license |
| Heavy use of Redis JSON, search, or vector features | Redis | Features ship in the core; avoid rebuilding on modules |
| Need vendor support contract and enterprise features | Redis | Commercial offering exists with SLAs |
| Procurement or legal forbids copyleft or source available terms | Valkey | BSD license is the simplest to approve |
| Self hosting for embedded or redistributed products | Valkey | Permissive terms avoid AGPL obligations questions |
| Small team, simple cache and sessions | Either | Pick what your host makes easiest |
| Spiky traffic, serverless runtime | Neither, consider serverless | Idle cost and connection limits matter more |
Two notes on that table. First, the AGPL concern is mostly relevant if you modify the server and expose it as a service or redistribute it. Running unmodified Redis internally for your own storefront is generally a different situation, but have counsel confirm for your case. Second, "switch because the cloud offers a discount" is a perfectly good reason. Boring savings are still savings.
When to Switch, and When to Leave It Alone
Switch to Valkey when your managed provider offers it at a lower price, when your license policy makes Redis awkward, or when you are standing up a new cluster anyway and want the simpler licensing story. Plan the move as you would any data store change: stage first, replay traffic, test failover, and cut over behind a flag with a rollback path.
Leave Redis alone when it is stable, you rely on features that only ship in the Redis core, or the savings do not justify a migration during a high stakes sales window. A migration scheduled for the weeks before a major sale is a self inflicted incident. Do it in a quiet period.
Do not switch just to feel aligned with the open source side of the argument. Both projects are healthy, both are widely deployed, and both will serve a storefront cache well. The best engine is the one you can operate calmly at 3 a.m.
What This Means for Your Business
For most merchants this is a cost and risk hygiene decision, not a replatforming. The cache layer sits behind your storefront, and customers never see which engine runs it. What they see is a fast product page and a cart that does not vanish.
The practical business outcomes are modest and real: potentially lower infrastructure spend through a managed Valkey tier, cleaner legal review for teams with strict license policies, and less lock in to a single vendor's roadmap. The larger lever is still how you design keys, expiry, and invalidation, because those decide whether your cache hit rate holds up when traffic doubles.
How Contra Collective Bridges the Gap
We help commerce teams design the caching layer around the storefront rather than around a logo, including key strategy, session and cart patterns, invalidation from platform webhooks, and low risk migrations between engines. If you want a second opinion before you commit to a switch, talk to our team.
Final Thoughts
Redis and Valkey are close cousins with different governance and a growing list of feature differences. If your cache is simple and your cloud provider offers Valkey for less, switching is an easy win. If you depend on Redis only features or need a commercial support relationship, staying put is equally rational. Spend your real effort on cart resilience, session hygiene, and invalidation, because that is where storefront incidents actually come from.
More from the lab.
Cloudflare R2 vs Amazon S3: Storing and Serving Product Media
Product media is read far more often than it is written, which makes egress the line item that surprises commerce teams. Cloudflare R2 and Amazon S3 take opposite positions on that cost and on how deeply they plug into the rest of your stack. Here is how to decide where your images and video should live.
BigCommerce Catalyst Native Hosting on Cloudflare: What Composable Commerce Teams Need to Know
BigCommerce announced at Commerce Live 2026 that Native Hosting for Catalyst, its headless storefront framework, is moving to open beta on Cloudflare in summer 2026, managed through a CLI with log retention and custom domain support included at no additional cost. That is a direct answer to the question every team building on Catalyst eventually asks: who hosts this, and what does it cost once it is not a demo anymore. Here is what the announcement actually commits to and where the gaps still are.
What Black Friday 2026's AI Shopping Numbers Actually Mean for Headless Merchants
Two vendor forecasts for the 2026 holiday season put a number on something most merchants have felt but not quantified. Salesforce projects that 20 percent of all 2026 holiday ecommerce traffic will come from AI chat agents, consumer bots, autonomous backend agents, and competitor price scrapers combined, and that one in three ecommerce sites will have a live, site specific shopper agent by Cyber Week. Infobip separately projects more than 7.3 billion customer interactions across Black Friday and Cyber Monday 2026, with 63.2 percent of consumers reporting they used an AI assistant or chatbot while shopping in the past year. Neither number is a reason to panic. Both are a reason to check whether your storefront's infrastructure can actually serve a non human visitor as well as it serves a human one.