DBRaven
Migration Playbook

Single Redis Node / Sentinel ClusterDistributed Redis Cluster (Consistent Hash Ring)

Medium complexityMedium riskComplex Rollback

Duration Estimate

2–6 weeks

Migration Stages

5

Blocking Prerequisites

2

Confidence

Strong

Readiness Checklist(2 blocking, 3 advisory)

blocking
Team

Team at mid maturity level

This migration requires mid engineering maturity. The team should have hands-on experience with the relevant technologies and proven ability to execute complex system changes safely.

Guidance: Build team skills through learning modules before attempting this migration.

blocking
Monitoring

Production observability baseline established

Comprehensive metrics, logs, and traces must be in place before the migration starts. You need a clear baseline to detect regressions during and after each migration stage.

Guidance: Instrument key metrics (latency p99, error rate, throughput, resource utilization) on all affected components.

Process

Rollback plan documented and tested

Rollback feasibility for this migration is 'complex'. Rollback is possible but may be complex, document the exact rollback steps and test them in a non-production environment.

Guidance: Run a full dry-run in a staging environment that mirrors production load characteristics.

Infrastructure

'redis' provisioned and validated in target environment

'redis' must be available, configured, and load-tested in the target environment before the migration stage that introduces it.

Guidance: Deploy 'redis' with production-equivalent configuration. Run a smoke test under representative load.

Process

Migration trigger condition confirmed

Confirm that the actual trigger for this migration is present. Common triggers: Single Redis node memory exceeds 80%: approaching eviction pressure; Cache hit rate degrading as working set grows beyond available RAM; Cache read throughput exceeds single-node capacity (~100k ops/sec).

Guidance: Validate the trigger with production metrics or benchmarks before committing to the migration timeline.

Migration Stages

1Key Pattern AnalysisLow1 week

Analyze existing cache key patterns and sizes. Map key namespaces to expected shard assignments. Identify multi-key operations (MGET, pipelines) that will require scatter-gather after sharding.

Key tasks

  • ·Analyze existing cache key patterns and sizes. Map key namespaces to expected shard assignments. Identify multi-key operations (MGET, pipelines) that will require scatter-gather after sharding.
  • ·Validate rollback capability at this stage boundary before proceeding.

Exit criteria

  • 'Key Pattern Analysis' validated in production with no regression in key metrics

Rollback: possible at this stage

2Redis Cluster ProvisioningLow1-2 weeks

Deploy Redis Cluster with 3 primary shards and 3 replicas minimum. Configure memory limits per shard. Verify cluster topology via CLUSTER INFO. Set up cluster health monitoring and alerting.

Key tasks

  • ·Deploy Redis Cluster with 3 primary shards and 3 replicas minimum. Configure memory limits per shard. Verify cluster topology via CLUSTER INFO. Set up cluster health monitoring and alerting.
  • ·Validate rollback capability at this stage boundary before proceeding.

Exit criteria

  • 'Redis Cluster Provisioning' validated in production with no regression in key metrics

Rollback: possible at this stage

3Application Client UpdateMedium1-3 weeks

Update application to use cluster-aware Redis client. Test all cache operations including multi-key commands (MGET, MSET, pipelines). Update MGET to scatter-gather pattern if keys span multiple shards.

Key tasks

  • ·Update application to use cluster-aware Redis client. Test all cache operations including multi-key commands (MGET, MSET, pipelines). Update MGET to scatter-gather pattern if keys span multiple shards.
  • ·Validate rollback capability at this stage boundary before proceeding.

Exit criteria

  • 'Application Client Update' validated in production with no regression in key metrics

Rollback: possible at this stage

4Traffic MigrationMedium1-2 weeks

Gradually migrate cache writes from single node to cluster. Accept cold-start miss rate increase as cluster warms up. Monitor hit rate recovery.

Key tasks

  • ·Gradually migrate cache writes from single node to cluster. Accept cold-start miss rate increase as cluster warms up. Monitor hit rate recovery.
  • ·Validate rollback capability at this stage boundary before proceeding.

Exit criteria

  • 'Traffic Migration' validated in production with no regression in key metrics

Rollback: possible at this stage

5Single Node DecommissionLow1 week

Drain remaining traffic from single node. Verify cluster hit rate matches pre-migration single-node hit rate. Decommission single node.

Key tasks

  • ·Drain remaining traffic from single node. Verify cluster hit rate matches pre-migration single-node hit rate. Decommission single node.
  • ·No rollback available after this stage, confirm all exit criteria before proceeding.

Exit criteria

  • 'Single Node Decommission' validated in production with no regression in key metrics

Rollback: not available after this stage

Rollback Decision Points

After stage 5

Trigger: Final validation: confirm all success criteria are met within 24 hours of migration completion. If any success criterion fails, trigger rollback or remediation.

Procedure: If success criteria are not met within 24 hours, escalate to the architecture team. Decide between full rollback, partial rollback, or targeted remediation based on scope.

Recovery: 24–72 hours for full assessment and remediation

Success Criteria

  • Target state 'Distributed Redis Cluster (Consistent Hash Ring)' is stable in production for 72+ hours with no regressions.
  • p99 latency on all affected services is within acceptable range (≤110% of pre-migration baseline).
  • Error rate is at or below pre-migration baseline.
  • New components (redis) are fully operational and monitored.

This migration playbook is derived from structured architecture knowledge. Duration estimates and risk levels are structural approximations based on documented migration complexity and operational risk, not measured execution data. Validate all stages against your specific system constraints before executing.

Playbook: Single Redis Node / Sentinel Cluster → Distributed Redis Cluster (Consistent Hash Ring): DBRaven