Why Magento Open Source teams move from Redis to Valkey
A self-hosted Magento Open Source store can move from Redis to Valkey for cache and sessions on a supported 2.4.x release, provided the new backend appears in Adobe's system requirements for that release. The change is a backend swap for the stores that hold sessions and cache entries, not a platform upgrade. Your store stays on the same Magento line, and the work is limited to the cache and session configuration, the Valkey servers and the tests that prove sessions survive the cutover. Teams usually decide to switch for licensing reasons. Redis Open Source 8.0 and later can be used under a license of your choice among RSALv2, SSPLv1 and AGPLv3, while Redis 7.4.x through 7.8.x carry the dual RSALv2 or SSPLv1 license, which is not OSI-approved. Valkey is licensed under BSD-3-Clause and was forked from Redis right before that change, so an organization with a license review obligation can read the two licenses side by side with the Redis licenses page.
The compatibility question is answered by Adobe, not by the Valkey project. Adobe's system requirements list Redis or Valkey 9 for 2.4.9 and Redis or Valkey 8.1 for 2.4.8-p5. Adobe supports only the listed combinations, so a Valkey version outside those lines is not a supported configuration for your release, even if it starts. Before you plan the cutover, confirm the exact Magento patch level you run, find the matching row in the requirements table, and record the Valkey major version you intend to deploy. If you plan a platform move in the same window, such as a 2.4.7 to 2.4.9 upgrade, treat the Valkey change as one step in that plan and test it against the target release rather than the current one.
What changes between Redis and Valkey for a Magento store
This table compares what stays the same and what changes when a Magento Open Source store moves its cache and session backend from Redis to Valkey. Read each row as a check on your current Redis version, your Adobe-listed release and your Magento configuration, then confirm the action before cutover. The main takeaway is that client connections usually need no code change, but data files, release-line versions and Redis 8 license choices decide how you migrate.
| Area | What changes | Action for your Magento store |
|---|---|---|
| Client connections | Existing Redis client libraries connect to Valkey without code changes, per the Valkey migration guide. | Keep the Magento cache and session settings pointing at the new host and port, then confirm the client library version used by your PHP release. |
| RDB and AOF files | Valkey reads and writes RDB and AOF files compatible with Redis OSS 7.2. | If you migrate from Redis 7.2 or earlier, a snapshot copy can work. Test a restored session store before relying on it. |
| Redis CE 7.4 and later data | Data files from Redis Community Edition 7.4 and later are not compatible with Valkey, and the migration guide does not cover that method. | Do not copy snapshots from these versions. Confirm your source version and plan a different migration method, or flush and rebuild caches while planning session loss. |
| Modules | Modules written for the RedisModule_ API work in Valkey. | Confirm whether your Magento setup loads any Redis module. Standard cache and session use does not depend on one. |
| Adobe-listed versions | Adobe lists Redis or Valkey 9 for 2.4.9 and Redis or Valkey 8.1 for 2.4.8-p5. | Match the Valkey line to your release. Do not run a version Adobe does not list for your Magento release. |
| License | Valkey is licensed under BSD-3-Clause. Redis 8 and later can be used under RSALv2, SSPLv1 or AGPLv3 at the user's choice. | Have legal review the Redis license you run and the Valkey license you adopt, especially if you modify the server or offer it as a network service. |
What to prepare before touching cache and session settings
Most of the risk in this move sits before the first configuration change. Each item below tells you what to record, build or confirm so that the switch from Redis to Valkey is a controlled change rather than an experiment on live sessions and carts.
Inventory the current Redis version
Record the exact Redis version and which release line it belongs to. Redis 7.2 and earlier are BSD-3-Clause, while Redis 7.4 and later Community Edition releases produce data files that Valkey cannot read. Redis 8 is licensed under a choice of RSALv2, SSPLv1 or AGPLv3. That version decides the migration method, so confirm it on every cache and session host, not just the one you remember.
Valkey migration guidePlan one Valkey instance per role
Adobe recommends a dedicated instance each for sessions, the default cache and the full-page cache. Persistence belongs on the session instance only, because session data is lost if it is not saved. Cache instances can run without persistence. Map each role to a named host or cluster endpoint in your environment files before you change any setting, so a misrouted role is caught in review.
Adobe Redis configurationBack up sessions and RDB snapshots
Take a fresh RDB snapshot of the session instance and keep a copy outside the host before any migration step. Confirm you can restore that snapshot into a scratch Valkey instance and that shoppers' sessions load afterward. Record the backup time and the restore steps, because the rollback plan depends on them.
Build a staging copy of production topology
Staging should match production in role separation, Valkey version, Sentinel or cluster layout, TLS settings and network paths between Magento nodes and Valkey. A single-node staging test will not show failover behavior or session loss during a primary switch. Ask your team or partner to document every difference between staging and production, and to justify each one in writing.
Find custom code that touches cache or sessions
List custom modules, extensions and deployment scripts that read or write cache or session storage, including direct calls to Redis clients, custom cache tags and cron jobs that flush keys. Check each against the Valkey client library your stack uses, since existing Redis clients connect without code changes but any code that depends on Redis-specific behavior needs a test. Assign an owner to each item before the test plan is written.
Which Valkey migration method fits your Redis version
Valkey is compatible with Redis OSS 7.2 and all earlier open-source Redis versions, and the Valkey migration guide treats a move from Redis OSS 2.x through 7.2.x to Valkey 7.2 or later as effectively an upgrade. Client libraries connect without code changes, and Valkey reads and writes RDB and AOF files compatible with Redis OSS 7.2. For a standalone Magento Redis instance, three of the documented methods apply: copying an RDB snapshot, replicating to a new Valkey with REPLICAOF and then promoting it, or using MIGRATE for selected keys.
- RDB snapshot copy: Create a snapshot on the Redis instance, start Valkey from that file, and verify key counts before pointing Magento at it. Plan a write pause, because changes made after the snapshot are lost.
- Replication then promotion: Point a new Valkey at the Redis primary with
REPLICAOF, wait for the initial sync to finish, then promote the replica. This keeps the gap between old and new data short, which matters most for sessions. - Key-level MIGRATE: Moves selected keys between instances. It suits a targeted move, but it only helps sessions if you can identify and move every active session key during the window.
- Separate instances per role: Adobe recommends dedicated Redis instances for sessions, the default cache and the full-page cache. Build three Valkey instances with the same split and map each one in
env.php. - Version alignment: Adobe lists Redis or Valkey 8.1 for 2.4.8-p5 and Redis or Valkey 9 for 2.4.9, so match the Valkey line to your target release.
Before choosing, confirm your Magento release and the Valkey line in Adobe's system requirements, then test the method you pick on a copy of production data.
Redis Community Edition 7.4 and later, including the 7.4.x to 7.8.x releases that the Redis licenses page places under the dual RSALv2 or SSPLv1 license, produce data files that are not compatible with Valkey. The migration guide warns about this and does not cover a method for these versions. That means the snapshot copy and replication steps in the other tab cannot be assumed to work for your data, and you need a confirmed approach before you schedule anything.
- Do not assume file compatibility: Do not copy RDB or AOF files from these versions into Valkey on the expectation that they will load. Test the load in staging and treat any failure as a stop signal.
- Confirm a method in writing: Ask the Valkey project through its public channels for a documented path for your exact Redis version. Record the answer and the version it covers.
- Test in a production-sized copy: Restore a copy of your Redis data into a staging Valkey, then run logins, cart persistence, checkout and admin sign-in against it to see what survives.
- Accept a session reset if no path is confirmed: If no compatible method is confirmed, one option is to let existing sessions expire or invalidate them at cutover. Shoppers and admins would sign in again, so agree this with the business owner and communicate it.
- Record the exact version: Check the running version on each Redis instance and keep the output with the change record, so the method you choose is tied to a specific release.
Before committing to a cutover date, confirm the method, complete the staging test and document what happens to logged-in shoppers and admin users.
A clustered Redis deployment needs its own path, because the guide's cluster method adds Valkey nodes to the existing cluster as replicas and then promotes them. Adobe's Redis configuration docs still call for separate instances for sessions, the default cache and the full-page cache, so each role needs its own cluster or a clearly separated topology. Where you run Valkey without Valkey Cluster, the Valkey Sentinel documentation describes high availability with at least three Sentinel instances.
- Add nodes as replicas: Join new Valkey nodes to the cluster and attach each one as a replica of the node it will take over from. Wait for every replica to finish syncing before the next step.
- Promote with CLUSTER FAILOVER: Run
CLUSTER FAILOVERon each replica during the planned window so it takes over its primary's slots. Do this one node at a time and check cluster health between steps. - Keep session persistence: Adobe recommends persistence for sessions but not for caches. Confirm that the session role's persistence settings survive the move before you retire the Redis nodes.
- Check multi-key behavior: Confirm that Magento's key usage works under cluster key placement in staging, since operations spanning keys on different nodes can fail.
- Plan Sentinel for non-cluster setups: If you use Sentinel instead of Valkey Cluster, confirm that Magento reconnects to the new primary after automatic failover, and test it deliberately.
Before the window, rehearse each promotion in staging and write down the connection settings Magento uses for each role.
How to sequence the Redis to Valkey cutover
This sequence moves Magento Open Source cache and session storage from Redis to Valkey in stages, with a verified version match, separate instances per role, a rehearsed cutover and Redis kept available until checks pass.
Confirm the Adobe-listed Valkey version
Check Adobe's system requirements for your exact Magento Open Source release and patch level before choosing a Valkey version. Adobe lists Redis or Valkey 9 for 2.4.9 and Redis or Valkey 8.1 for 2.4.8-p5, so the target line depends on which release you run. Record the chosen Valkey version, the PHP and database versions it is tested with, and the owner who signs off. Done when the version is written down against the Adobe requirement it satisfies.
Build separate Valkey instances per role
Provision three independent Valkey instances: one for sessions with persistence enabled, one for the default cache, and one for the full-page cache, both without persistence. Adobe recommends a dedicated instance for each role, so a cache flush cannot remove customer sessions. Confirm network access from the application and cron hosts, and that each instance has its own memory limit and eviction policy. Done when each instance answers a ping from every application node and its role is documented.
Configure cache and session settings in staging
In a staging environment, point the session and cache settings in env.php at the new Valkey hosts and ports, keeping the Redis configuration in a separate copy for rollback. Adobe's Redis configuration guide describes the session and cache blocks used for this. Clear the configuration cache, then confirm the storefront and admin load and that the cache and session keys appear in the correct instance. Done when a staging login and a cart action both write to the intended instances.
Run the chosen migration method
Select one method from Valkey's migration guide: an RDB snapshot copy, replication with REPLICAOF followed by promotion, or key-level MIGRATE for selected keys. Valkey reads RDB and AOF files compatible with Redis OSS 7.2, so confirm your running Redis version first, because Redis Community Edition 7.4 and later produce files Valkey cannot read and need a different method. For sessions, replication is usually the way to keep active logins. Done when the target instance holds the expected key count and the source remains untouched.
Verify session persistence through restarts and failover
Log in as several test customers and an admin user, then restart the Valkey session instance and, if you run high availability, trigger a failover through Valkey Sentinel (which Valkey recommends with at least three Sentinel instances when not using Valkey Cluster). Check that each test session survives the restart and failover and that the cache instance can be flushed without logging anyone out. Record the results. Done when all test sessions persist and the flush test passes.
Rehearse the cutover on a production-sized copy
Restore a recent production-sized copy of the database and the Redis data into an isolated environment, then run the full cutover steps in order with timing and a log of each action. Include checkout, customer login, cron, indexers and any cache warming. Note every error and the fix. Done when a complete rehearsal passes without manual edits outside the written runbook, and the rollback steps have been executed once.
Switch production in a maintenance window
Enter maintenance mode, take a final sync of session and cache data, update env.php to the Valkey instances, clear the configuration cache, and leave maintenance mode. Run the same login, cart and checkout smoke tests used in staging and watch application and Valkey logs. Keep the Redis instances running and unchanged so you can revert the configuration file if a check fails. Done when production smoke tests pass and sessions are read from Valkey.
Retire Redis after checks pass
Keep the Redis instances available for rollback until the agreed post-cutover checks are complete and signed off, including a review of session errors, cache hit behavior and any failover test. Then stop Redis, remove its configuration from env.php and runbooks, and archive the final snapshot according to your retention policy. Done when the sign-off is recorded and Redis is no longer referenced by the application.
How to test session persistence before cutover
Test session persistence on a staging copy of the store before any production cutover, and write down the result of each check. The four areas to cover are shoppers who stay logged in across a Valkey restart, cart contents that survive that restart, admin sessions in the Magento Admin, and failover behavior if you run Sentinel. Run each check against the dedicated Valkey instance that holds sessions, because that instance is the one Adobe recommends with persistence turned on. Confirm the session instance's persistence settings in your own configuration before testing, since the caches and sessions are on separate instances with different persistence needs.
For the restart test, log in as a test customer, add items to the cart, restart the session Valkey service, and confirm the customer is still signed in and the cart is intact after the restart. Repeat with a customer who has a saved cart and with an admin user, and check that admin sessions behave as your security policy expects. Then test failover if you use Valkey Sentinel for high availability, which applies when you are not using Valkey Cluster. Valkey's Sentinel documentation recommends at least three Sentinel instances, and the Redis Sentinel documentation gives the same recommendation, so confirm the quorum and the promotion behavior of your three-node layout by stopping the primary during a live test session. Record which sessions survive and which do not, including any login prompts or lost carts.
Agree the acceptable session loss with the business before the test, and write it into the test record. For example, a sales owner may accept that a shopper who was mid-checkout during a failover signs in again, but not that a saved cart disappears. Record the test date, the Valkey and Magento versions from the Adobe system requirements for your release, the Sentinel configuration, each scenario's result, and the sign-off from the people who own the business outcome. Keep this record with the cutover plan so the go or no-go decision rests on evidence rather than memory.
What makes the Valkey switch take longer
This table lists the factors that expand a Redis to Valkey switch on a Magento Open Source store, what each one changes, and what to check before scheduling the cutover. Read it as a sizing checklist: the more rows that apply to your store, the more staging time, testing and rollback planning the switch will need.
| Effort driver | Why it changes the work | What to check |
|---|---|---|
| Number of stores and cache pools | Each store view set and each cache role (sessions, default cache, full-page cache) needs its own instance, configuration and verification. | Count every Redis instance and database index in env.php and confirm which role each one serves. |
| Custom code that writes to Redis directly | Direct calls bypass Magento's cache and session abstractions, so they are easy to miss in configuration reviews and may use client features that behave differently. | Search custom modules for direct Redis client usage and list every key pattern they read or write. |
| Extensions assuming Redis-specific features | Extensions may rely on particular commands, key layouts or server settings that are not verified on Valkey, even though Valkey is designed for Redis client compatibility. | Ask each extension vendor which Redis versions they test against and whether they have run on Valkey 8.1 or 9. |
| Redis modules beyond core behavior | Modules written for the RedisModule API are expected to work with Valkey, but any module outside the core cache and session use needs its own functional test. | Inventory loaded modules on the current server and confirm each one is in use and supported on the target Valkey version. |
| Clustered topology | Clustered deployments move keys across nodes and add replicas and failover steps, which changes the migration method and the failover tests. | Confirm whether the current setup uses Redis Cluster or Sentinel, and choose the migration method that matches it. |
| Data volume in sessions | Large session stores take longer to copy or replicate and increase the amount of logged-in customer state that a failed cutover could disturb. | Measure session key count and memory on production, and plan how long replication must run before promotion. |
| Staging parity with production | A staging environment with different Valkey, PHP or Magento settings can pass tests that production would fail, which pushes validation into the live window. | Compare server versions, configuration files, persistence settings and traffic patterns between staging and production before testing. |
Questions buyers ask before moving Magento from Redis to Valkey
What does moving Magento from Redis to Valkey cost, and what drives that cost?
The cost depends mostly on how many Redis roles you run and how they are arranged, not on the Valkey software itself, which is free to download under BSD-3-Clause. Adobe recommends a dedicated Redis instance each for sessions, the default cache and the full-page cache, so a store with three roles and a standalone layout has less to move than a clustered or highly available layout with Sentinel. Fixed work includes the inventory of roles, the target version choice and a test run. Variable work includes the number of environments, the replication or migration method, the Sentinel or cluster design and the testing of session persistence. Ask any partner for a quote that splits fixed items from topology-dependent items and names who pays for infrastructure, labor and any retesting after cutover. The Adobe system requirements list the supported Valkey versions you should plan against.
How long does a Redis to Valkey switch take?
No duration is fixed by the software, so the timeline depends on the work around it. The main drivers are the number of Redis instances, whether sessions must survive cutover, how many staging environments need a rehearsal, and whether your Magento release line already matches a supported Valkey version. Session handling takes the most testing time because customers in the middle of checkout must keep their state. Confirm with your partner how many rehearsal cycles are included in the written scope and what happens if a test finds a problem. Check the Valkey migration guide for the migration method options, since each method has different preparation steps and a different window for switching traffic.
What does our internal team need to provide for this work?
Your team provides access, environment details and decisions that only the business can make. Typical needs include administrative access to the Magento servers and the Redis hosts, a staging environment that resembles production in its cache and session configuration, a copy of current env.php settings, and a named owner for maintenance windows. The most important business input is sign-off on session loss. If the team accepts that some logged-in shoppers may need to sign in again, the cutover is simpler. If carts and sessions must survive, you need a replication or snapshot plan and a test that proves persistence. Record that decision in writing before work starts, since it changes the method, the window and the test scope.
Can our in-house team move Magento to Valkey without outside help?
Yes, a capable in-house team can do this, because Valkey is compatible with Redis OSS 7.2 and earlier, and existing Redis client libraries connect without code changes, according to the Valkey migration guide. The skills needed are Redis administration, Linux service management, Magento cache and session configuration, and a test plan that covers checkout and login. Teams without recent production Redis experience often underestimate the rehearsal work and the rollback plan. Consider an outside partner if your team lacks time for staged rehearsals, if sessions must persist through cutover, or if the store runs a clustered or Sentinel layout that nobody on staff has operated before. Either way, document the decision and the rollback steps.
Does the Redis license change force us to move to Valkey?
No, the license change does not force a move on every team, but it affects which Redis version you can keep using. According to the Redis licenses page, Redis 7.2.x and earlier remain under BSD-3-Clause, while Redis 7.4.x to 7.8.x are under dual RSALv2 or SSPLv1, which are not OSI-approved. Redis 8.0 and later can be used under RSALv2, SSPLv1 or AGPLv3 at your choice. Teams running unmodified Redis 7.2 or earlier see no impact, according to the same page. Valkey is licensed under BSD-3-Clause and is an open community project under LF Projects, LLC. Check with your legal and compliance team which license terms your organization accepts, and confirm the choice against the Redis version you run today.
What goes wrong if sessions are lost during cutover?
Customers who are signed in or mid-checkout may be logged out, and carts or quote data tied to sessions can be lost if persistence is not configured. Adobe recommends persistence for the session instance but not for the caches, so the session Redis or Valkey instance needs its own persistence settings and a tested restore path. Before cutover, verify login, cart retention, checkout completion and admin sessions in staging, then repeat the checks on production with a small test account. Also confirm that the session instance is separate from the cache instances, so that flushing a cache does not end customer sessions.
Which Valkey version should we target for Magento?
Choose the version that Adobe lists for your Magento release, not the newest Valkey release. Adobe's system requirements list Redis or Valkey 9 for Magento Open Source 2.4.9 and Redis or Valkey 8.1 for 2.4.8-p5, so the Magento release decides the minimum target. Valkey 9.0.0 was published on October 21, 2025, and the current stable line is 9.1, according to the Valkey releases page. Confirm the exact combination with Adobe's requirements page before you pick a patch level, because Adobe supports only the listed combinations.
How Magento connects to separate Valkey instances by role
The diagram starts at the Magento application, which is reached through Varnish for self-managed full-page caching. Magento then opens three separate Valkey paths: one for sessions, which needs persistence, one for the default cache, and one for the full-page cache, which Adobe recommends keeping without persistence. Sentinel instances watch the session and cache hosts and promote a replica when a primary fails. When you review it, confirm that each role points to its own host and port in the Magento configuration, and that a session failover does not silently reset logged-in shoppers.
Magento uses three Valkey roles, with Sentinel supervising the session and cache hosts.
How DeployOpen scopes and delivers a Valkey cutover
DeployOpen plans, implements, hardens, backs up and documents self-hosted open-source platforms in your own infrastructure, including the cache and session tier of a Magento Open Source store. DeployOpen is a Chainscore Labs company. A Valkey cutover touches several roles at once: the session store, the default cache and the full-page cache, each of which needs its own instance, its own persistence setting and its own monitoring. The work is carried out in your cloud accounts, data centers or air-gapped network, and the people who approve it stay on your side of the handover.
Most engagements are fixed-scope. Before work starts, the scope, deliverables and timelines are agreed in writing, and a quote follows from that written scope rather than from a standard price list, since DeployOpen does not publish one. For this topic, the written scope should name the Magento release line and the Adobe system requirements combination it targets, the Valkey version and migration method chosen for each role, the session persistence test and rollback plan, and who signs off the cutover window. Ask the vendor to show how each item maps to a deliverable and to a named test, so you can compare quotes on the same basis.
Ongoing work is available as a retainer. After cutover, the recurring items are Valkey patch releases, Adobe's supported version combinations as they change, and periodic checks that sessions and cache keys behave under load. Confirm with DeployOpen whether a retainer covers those checks and how often Valkey upgrades are tested against your release line before they reach production. DeployOpen does not hold vendor partnership status with Valkey, Redis or Adobe, so ask for the evidence behind any technical claim in the proposal.

