It is unclear to me from the documentation on replication whether the SYNC command is blocking.
It seems like it shouldn’t be (after all, spinning up a new slave would stop the master from serving requests), but I’d like confirmation of that.
For context, I’m looking at adding a slave to a master hosting about 8GB of data with no disk sync*.
*Historically, data loss has not been a concern. We’re changing that, so replication and persistence are being “back ported” to a degree.
the master will just perform a BGSAVE on SYNC request from the slave, so it’s not a blocking operation.
So the sequence is:
It also works if the master is not configured to save, simply it will produce an .rdb just for master <-> slave synchronization. In master instances configured without “save” lines in redis.conf BGSAVE is not called automatically, but can still be called by the user if there is the need to save an .rdb file.