Skip to main content
Swytch Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

From Redis to Swytch

Move one workload to a local Swytch endpoint, validate its behavior, then retire the Redis infrastructure it no longer needs. Keep the application migration small enough to reverse.

1. Inventory the workload

List the commands, scripts, numbered databases, and modules the application uses. Check Redis compatibility and the command reference.

Separate rebuildable cache entries from sessions, counters, and queue work that cannot simply disappear. Choose tiering for the latter before cutover. Test the client’s transaction and error handling against the Swytch release you will deploy.

2. Attach Swytch beside the application

Use the operator quickstart for Kubernetes. Keep the existing Redis endpoint as the application’s primary while testing Swytch at 127.0.0.1:6379.

Outside Kubernetes, use a separate local port if Redis is already on the same host:

swytch redis --port 6380 --maxmemory 512mb --metrics-port 9090

The remote Redis endpoint stays where it is. Only the Swytch connection is necessarily local.

3. Choose how to populate state

For rebuildable cache data, let application misses populate Swytch from the source of truth. Bound refill concurrency and measure cold-cache load.

For shadow testing, copy suitable writes and compare read results without serving the shadow result. Account for expiration timing and concurrent updates when interpreting differences.

Dual-writing two systems is not atomic. A failed shadow write leaves them different, and an acknowledged command does not prove both systems contain the same state. Do not blindly dual-execute destructive queue reads or assume counters and stream IDs can be reconciled like cached values.

For state that must be transferred exactly, define a workload-specific export, reconciliation, and cutover procedure. A short write pause may be simpler than a fragile dual-write protocol.

4. Validate the application

Exercise commands and scripts with the deployed client library. Test multiple application replicas, a cold cache, Pod replacement, and network failures affecting shared state.

Compare hit rate, p50/p99 latency, errors, resource use, and source-of-truth load. Wait until representative traffic and expiration cycles have run; one TTL cycle alone does not guarantee the whole working set is warm.

5. Cut over with a rollback plan

Switch a small portion of application traffic to Swytch, then expand after validation. Keep the old Redis deployment until you know how to recover from a failed cutover.

For rebuildable cache data, rollback can point the client back to Redis and refill missing entries. For sessions, counters, and queue work, reconcile writes made after cutover before switching back. Keeping Redis running does not keep it current.

6. Remove the old tier

After the intended traffic is on Swytch and the recovery path is tested, remove migration code and decommission the Redis resources no longer in use. Update monitoring and application runbooks for local cache loss, shared-key failures, and storage-tier recovery.

Next: Kubernetes operations and sizing.