Skip to content

Migrate from Redis to Valkey New#

MSR 4 supports Valkey as a replacement for Redis. This page describes how Valkey behaves in failure and recovery scenarios, and under what conditions a backup strategy is warranted.

Prerequisites#

Before migrating, install a highly available Valkey deployment with replication.

Expected behavior during migration#

When you replace Redis with Valkey:

  • MSR 4 remains functionally intact.
  • Active users must re-authenticate because their session keys no longer exist.
  • Tasks currently in the queue may fail or stall and must be re-triggered or allowed to time out before being rescheduled.
  • Registry metadata is not affected if PostgreSQL and the blob store remain unchanged.

Valkey data loss is not a catastrophic failure. Within the MSR 4 architecture, Valkey serves as a high-performance data structure store for transient state. The authoritative source of truth, however resides in the PostgreSQL database and the registry, and a clean restart will restore normal operation.

Backup risks#

Backing up Valkey independently of the primary database introduces significant risks of state divergence. If the Valkey state is out of sync with PostgreSQL metadata, for example, when restoring a Valkey snapshot that is one hour older than the database, the following conditions can result:

  • The Jobservice may attempt to execute tasks that PostgreSQL has already marked as completed.
  • The UI may display inaccurate statuses for jobs that no longer exist in the current operational context.

Warning

In environments with high volumes of concurrent replication jobs or many active UI users, Mirantis recommends a clean restart over an asynchronous restoration.

Valkey backup scenarios#

The following scenarios may warrant a Valkey backup strategy, provided backups are executed with strict synchronization against a full system snapshot:

  • High-volume replication.

Back up Valkey to avoid restarting extensive multi-TB replication tasks from the beginning.

  • Critical session persistence.

Back up Valkey to prevent mass logout events in high-concurrency environments.