Redis › Redis Replication
What is the difference between full resynchronization and partial resynchronization when a replica reconnects to its primary after a temporary disconnection?
IntermediateAnswer
Full resynchronization requires the replica to receive an entirely new complete copy of the primary's dataset, which can be slow and resource intensive for large datasets, while partial resynchronization allows the replica to catch up by receiving only the specific changes it missed during the disconnection, using a backlog buffer the primary maintains, which is much faster and less resource intensive when the disconnection was brief.
-- Check the replication backlog size, which affects
-- how long a disconnection can be tolerated before
-- requiring a full resync instead of a partial one
CONFIG GET repl-backlog-sizeReal-world example A replica that briefly loses network connectivity for a few seconds successfully performs a partial resynchronization once reconnected, quickly catching up without needing the time consuming full resync that would have been required for a longer outage.