Discussion:
[redis-db] Is there a way to replicate AWS managed Redis to Azure managed Redis in real time?
Venkaiah Juvvigunta
2018-10-17 09:15:10 UTC
Permalink
I have tried below approach .

Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying from
AWS Redis and put it in a Queue and read these events from the queue once
the copying is done and applied it on Azure Redis.

Problems faced:
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
2) Some operations like 'rename' is being delivered in two notifications,
handling these two notifications to construct the actual operation will be
bit difficult even in Queue.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Юрий Соколов
2018-10-18 04:36:59 UTC
Permalink
Did you try MONITOR command?
It is certainly supported by regular redis, though I don't know if AWS
redis supports it.

I wrote custom Go program that SCAN whole redis and MONITOR it in parralel.
This way I moved one huge semi-cold "namespace" from redis to cassandra.
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying
from AWS Redis and put it in a Queue and read these events from the queue
once the copying is done and applied it on Azure Redis.
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
2) Some operations like 'rename' is being delivered in two notifications,
handling these two notifications to construct the actual operation will be
bit difficult even in Queue.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Venkaiah Juvvigunta
2018-10-19 10:27:52 UTC
Permalink
Hi,
With the use of Monitor, performance has been going down by 50%. Any other
suggestions?
Post by Юрий Соколов
Did you try MONITOR command?
It is certainly supported by regular redis, though I don't know if AWS
redis supports it.
I wrote custom Go program that SCAN whole redis and MONITOR it in
parralel. This way I moved one huge semi-cold "namespace" from redis to
cassandra.
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying
from AWS Redis and put it in a Queue and read these events from the queue
once the copying is done and applied it on Azure Redis.
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
2) Some operations like 'rename' is being delivered in two notifications,
handling these two notifications to construct the actual operation will be
bit difficult even in Queue.
--
You received this message because you are subscribed to the Google Groups
"Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Venkaiah Juvvigunta
2018-10-19 10:29:45 UTC
Permalink
We have to use this in production, so we can not afford 50% performance
down in real time. There is a high chance that cluster can go down.
Post by Venkaiah Juvvigunta
Hi,
With the use of Monitor, performance has been going down by 50%. Any other
suggestions?
Post by Юрий Соколов
Did you try MONITOR command?
It is certainly supported by regular redis, though I don't know if AWS
redis supports it.
I wrote custom Go program that SCAN whole redis and MONITOR it in
parralel. This way I moved one huge semi-cold "namespace" from redis to
cassandra.
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying
from AWS Redis and put it in a Queue and read these events from the queue
once the copying is done and applied it on Azure Redis.
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
2) Some operations like 'rename' is being delivered in two
notifications, handling these two notifications to construct the actual
operation will be bit difficult even in Queue.
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Salvatore Sanfilippo
2018-10-19 10:41:57 UTC
Permalink
That's a problem because it means reinventing the Redis replication
protocol on top of other primitives, since the replication protocol
itself was disabled.
Probably it is simpler to evaluate the downtime needed to do an RDB
copy (or a similar SCAN / DUMP / RESTORE cycle) and understand if it
is applicable, because the risk here is to introduce a race condition
in the pseudo-replication-protocol you implement (trust me there are a
lot of corner cases), and when you live-migrate, you end with
corrupted data in the other side. Unfortunately providers do not
cooperate to make transitions simple, this is very bad since Redis
replication works well on WANs.
On Wed, Oct 17, 2018 at 1:04 PM Venkaiah Juvvigunta
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying from AWS Redis and put it in a Queue and read these events from the queue once the copying is done and applied it on Azure Redis.
1)Every operation which effects AWS Redis data, needs one query to AWS Redis to get the effected data as it is not present in notification.
2) Some operations like 'rename' is being delivered in two notifications, handling these two notifications to construct the actual operation will be bit difficult even in Queue.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com

"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Venkaiah Juvvigunta
2018-10-19 11:10:31 UTC
Permalink
Thanks for the quick reply Salvatore.
Post by Salvatore Sanfilippo
That's a problem because it means reinventing the Redis replication
protocol on top of other primitives, since the replication protocol
itself was disabled.
Probably it is simpler to evaluate the downtime needed to do an RDB
copy (or a similar SCAN / DUMP / RESTORE cycle) and understand if it
is applicable, because the risk here is to introduce a race condition
in the pseudo-replication-protocol you implement (trust me there are a
lot of corner cases), and when you live-migrate, you end with
corrupted data in the other side. Unfortunately providers do not
cooperate to make transitions simple, this is very bad since Redis
replication works well on WANs.
On Wed, Oct 17, 2018 at 1:04 PM Venkaiah Juvvigunta
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying
from AWS Redis and put it in a Queue and read these events from the queue
once the copying is done and applied it on Azure Redis.
Post by Venkaiah Juvvigunta
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
Post by Venkaiah Juvvigunta
2) Some operations like 'rename' is being delivered in two
notifications, handling these two notifications to construct the actual
operation will be bit difficult even in Queue.
Post by Venkaiah Juvvigunta
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
Post by Venkaiah Juvvigunta
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Itamar Haber
2018-10-19 12:33:22 UTC
Permalink
There is also a slew of tools out there to do that. I haven't had personal
experience with the following, but perhaps you'd like to give them a go:

* https://github.com/leonchen83/redis-replicator <- the author is extremely
helpful
* https://github.com/reverbdotcom/migr8 <- looks simple enough
Post by Venkaiah Juvvigunta
Thanks for the quick reply Salvatore.
Post by Salvatore Sanfilippo
That's a problem because it means reinventing the Redis replication
protocol on top of other primitives, since the replication protocol
itself was disabled.
Probably it is simpler to evaluate the downtime needed to do an RDB
copy (or a similar SCAN / DUMP / RESTORE cycle) and understand if it
is applicable, because the risk here is to introduce a race condition
in the pseudo-replication-protocol you implement (trust me there are a
lot of corner cases), and when you live-migrate, you end with
corrupted data in the other side. Unfortunately providers do not
cooperate to make transitions simple, this is very bad since Redis
replication works well on WANs.
On Wed, Oct 17, 2018 at 1:04 PM Venkaiah Juvvigunta
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying
from AWS Redis and put it in a Queue and read these events from the queue
once the copying is done and applied it on Azure Redis.
Post by Venkaiah Juvvigunta
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
Post by Venkaiah Juvvigunta
2) Some operations like 'rename' is being delivered in two
notifications, handling these two notifications to construct the actual
operation will be bit difficult even in Queue.
Post by Venkaiah Juvvigunta
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
Post by Venkaiah Juvvigunta
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups
"Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely

Phone: +972.54.567.9692

[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Salvatore Sanfilippo
2018-10-19 15:39:38 UTC
Permalink
I think the redis-replicator uses the SYNC protocol of Redis replication...
Post by Itamar Haber
There is also a slew of tools out there to do that. I haven't had personal
* https://github.com/leonchen83/redis-replicator <- the author is
extremely helpful
* https://github.com/reverbdotcom/migr8 <- looks simple enough
Post by Venkaiah Juvvigunta
Thanks for the quick reply Salvatore.
Post by Salvatore Sanfilippo
That's a problem because it means reinventing the Redis replication
protocol on top of other primitives, since the replication protocol
itself was disabled.
Probably it is simpler to evaluate the downtime needed to do an RDB
copy (or a similar SCAN / DUMP / RESTORE cycle) and understand if it
is applicable, because the risk here is to introduce a race condition
in the pseudo-replication-protocol you implement (trust me there are a
lot of corner cases), and when you live-migrate, you end with
corrupted data in the other side. Unfortunately providers do not
cooperate to make transitions simple, this is very bad since Redis
replication works well on WANs.
On Wed, Oct 17, 2018 at 1:04 PM Venkaiah Juvvigunta
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of copying
from AWS Redis and put it in a Queue and read these events from the queue
once the copying is done and applied it on Azure Redis.
Post by Venkaiah Juvvigunta
1)Every operation which effects AWS Redis data, needs one query to AWS
Redis to get the effected data as it is not present in notification.
Post by Venkaiah Juvvigunta
2) Some operations like 'rename' is being delivered in two
notifications, handling these two notifications to construct the actual
operation will be bit difficult even in Queue.
Post by Venkaiah Juvvigunta
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
Post by Venkaiah Juvvigunta
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely
Phone: +972.54.567.9692
[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com

"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Salvatore Sanfilippo
2018-10-19 15:41:05 UTC
Permalink
Nope sorry, probably not. I see it parses RDB but from the README the main
idea of the project is not clear to me. Looking at the code should provide
some insight.
Post by Salvatore Sanfilippo
I think the redis-replicator uses the SYNC protocol of Redis replication...
Post by Itamar Haber
There is also a slew of tools out there to do that. I haven't had
personal experience with the following, but perhaps you'd like to give them
* https://github.com/leonchen83/redis-replicator <- the author is
extremely helpful
* https://github.com/reverbdotcom/migr8 <- looks simple enough
Post by Venkaiah Juvvigunta
Thanks for the quick reply Salvatore.
Post by Salvatore Sanfilippo
That's a problem because it means reinventing the Redis replication
protocol on top of other primitives, since the replication protocol
itself was disabled.
Probably it is simpler to evaluate the downtime needed to do an RDB
copy (or a similar SCAN / DUMP / RESTORE cycle) and understand if it
is applicable, because the risk here is to introduce a race condition
in the pseudo-replication-protocol you implement (trust me there are a
lot of corner cases), and when you live-migrate, you end with
corrupted data in the other side. Unfortunately providers do not
cooperate to make transitions simple, this is very bad since Redis
replication works well on WANs.
On Wed, Oct 17, 2018 at 1:04 PM Venkaiah Juvvigunta
Post by Venkaiah Juvvigunta
I have tried below approach .
Step 1) Took a snapshot of AWS Redis and copied it in Azure
Step 2) Listened to the key space notifications at the time of
copying from AWS Redis and put it in a Queue and read these events from the
queue once the copying is done and applied it on Azure Redis.
Post by Venkaiah Juvvigunta
1)Every operation which effects AWS Redis data, needs one query to
AWS Redis to get the effected data as it is not present in notification.
Post by Venkaiah Juvvigunta
2) Some operations like 'rename' is being delivered in two
notifications, handling these two notifications to construct the actual
operation will be bit difficult even in Queue.
Post by Venkaiah Juvvigunta
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
Post by Venkaiah Juvvigunta
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely
Phone: +972.54.567.9692
[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups
"Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs https://redislabs.com

"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...