Advertisement
Intermediate Redis, Redis Replication

What is the difference between full resynchronization and partial resynchronization when a replica reconnects to its primary after a temporary disconnection?

Short answer

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…

Save Redis mock interview
Advertisement
AModel answer
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.
Example

-- 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-size

Real-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.
Likely follow-ups
  • How do you configure the size of the replication backlog buffer?
  • What determines whether a reconnecting replica can use partial versus full resynchronization?
Related topics