Strategy to live-migrate from existing redis instance

290 views
Skip to first unread message

ryanjame...@gmail.com

unread,
Aug 28, 2018, 9:21:37 PM8/28/18
to Google Cloud Memorystore Discuss
In the past, I've migrated a redis instance by using the SLAVEOF command on the new instance, updating all my clients, then SLAVEOF NO ONE and shutting down the old.

The memorystore docs state that SLAVEOF is a blocked command.

Will there be some strategy to begin using memorystory without downtime?

900...@gmail.com

unread,
Nov 14, 2018, 9:43:24 AM11/14/18
to Google Cloud Memorystore Discuss
I used a python script which copied key by key with pipeline.

For 4gb's data it has taken ~15 min in a same region and ~40 min cross-continentally.

900...@gmail.com

unread,
Nov 14, 2018, 9:49:28 AM11/14/18
to Google Cloud Memorystore Discuss
Before that, it depends on what data structure you have in redis. You could for example bind new source and cut the old one after migration(so have merged source meanwhile), or switch the source first then launch migration if no discrepancy.

Serhii Barabash

unread,
Apr 28, 2023, 7:40:27 AM4/28/23
to Google Cloud Memorystore Discuss
hello, could you write your script for copying redis keys?
Reply all
Reply to author
Forward
0 new messages