Master Slave Replication, time between synch

638 views
Skip to first unread message

Salvatore Aurnia

unread,
Sep 15, 2016, 11:49:42 AM9/15/16
to Redis DB

I use replication mechanism to have a living master through sentinel, but I do not care data synchronization between master and slave. Can I disable it? Can I set the interval between two sync?

I can use diskless replication and set repl-diskless-sync-delay to a large number to avoid it. Is it correct?

Thanks.

The Real Bill

unread,
Sep 16, 2016, 12:09:51 PM9/16/16
to Redis DB
That isn't how replication works in Redis. Once a slave is synced to its master the master will be streaming all changes to data as they happen. The flat parameter you mentioned has to do with multiple slaves to the same master. Redis does not periodically sync data, it does it at time of change.

You might want to revisit your setup and requirements. If you don't care about having current data, then don't use master and slave replication. Instead just copy over or pull down the RDB from the master and then start the wholly independent Redis server with that RDB. Just be sure to stop the server before copying in the new file.

Salvatore Aurnia

unread,
Sep 19, 2016, 4:35:47 AM9/19/16
to redi...@googlegroups.com
I have to have an active master and to use "Sentinel" to promote a
slave to master in case of problems. Through sentinel with a script I
can configure clients to use new master.

2016-09-16 18:09 GMT+02:00 The Real Bill <ucn...@gmail.com>:
> That isn't how replication works in Redis. Once a slave is synced to its master the master will be streaming all changes to data as they happen. The flat parameter you mentioned has to do with multiple slaves to the same master. Redis does not periodically sync data, it does it at time of change.
>
> You might want to revisit your setup and requirements. If you don't care about having current data, then don't use master and slave replication. Instead just copy over or pull down the RDB from the master and then start the wholly independent Redis server with that RDB. Just be sure to stop the server before copying in the new file.
>
> --
> 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+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at https://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

Bill Anderson

unread,
Sep 19, 2016, 12:38:08 PM9/19/16
to redi...@googlegroups.com
Sure, but the that nothing to do with “delaying" replication. In fact, you don’t want replication to be anything but current when using sentinel. You don’t want your slave to be behind because you didn’t think it necessary to keep it current. Replication in Redis happens as changes are made. This is exactly what you want: an up-to-date slave, not one which has old data. If you had that you would lose comparatively a lot of data on a failover.
> You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/iEOyo9fF-FY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to redis-db+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages