We’re moving our memcached to a different server cluster and I need to either replicate the existing memcached data or do something like shadow writing where I slowly populate both memcached’s simultaneously until they match. What are my options here?
Share
Two ideas pop to mind:
Create a warm-up script that can identify every resource that needs to be put into the new Memcached and put it there. Then switch the production env. to the new Memcached server IP.
Create a new Memcached pool, change your scripts to always write to both pools. Wait for a few hours until the scripts inadvertently write all the data to both pools. Then switch the production env. to the new Memcached pool and disable the dual write scripts and the old pool.
Rationale:
There are some commercial solutions for Memcached replication as well as Memcached backups. I don’t know any by name and perhaps there are some open source solutions as well.