Redis Active-Passive replication uses the Replica Of feature to keep a destination database synchronized with a source database. After the initial synchronization completes, the destination continuously applies updates from the source.
Sometimes the destination database cannot continue from its previous synchronization point and must restart synchronization from the beginning. This process is called a full synchronization (full sync).
Customers commonly notice a full sync as:
An unexpected spike in ops/sec on the destination database
Increased network, CPU, or memory usage
Replication status changing from Synced back to Syncing
Synchronization progress restarting from 0%
A FLUSHALL operation appearing in logs
Synchronization restarting after a maintenance window
Attempting to read from the replicaOf destination may not provide the latest data from the source.
In many cases, a full synchronization is expected behavior and does not indicate a problem with the database.
However, if the database is never completing a full sync or you consistently see repeating sync restarts, this may indicate an issue that should be discussed with the Redis support team.
Quick Fix
| What you see | What it usually means | What to do |
|---|---|---|
| Replication status changes from Synced to Syncing | A new synchronization cycle has started. | Monitor synchronization progress and confirm it completes successfully. |
| Ops/sec suddenly increases on the destination database | A full synchronization may be loading data from the source database. | Check replication status before investigating application traffic. |
| A FLUSHALL appears on the destination database | The destination database is preparing to load a fresh copy of data from the source. | Verify whether a full synchronization is in progress. |
| Synchronization restarts after a maintenance window | Maintenance activity may have triggered a new synchronization cycle. | Allow synchronization to complete and verify the database returns to Synced status. |
| Destination data disappears and then reloads | The destination database is performing a full synchronization. | This behavior is expected during a full sync. |
| Synchronization repeatedly restarts and never reaches Synced | Synchronization may be unable to complete successfully. | Contact Redis Support. |
Before You Begin
This article applies to databases using Active-Passive replication (Replica Of).
If you are using Active-Active (CRDB), this article does not apply.
How to Identify a Full Synchronization
Step 1: Verify the database uses Active-Passive replication
In Active-Passive replication, a destination database is configured as a replica of a source database.
Step 2: Check replication status
Common replication states include:
| Status | Meaning |
|---|---|
| Syncing | Synchronization is currently in progress. |
| Synced | Synchronization is complete and updates are being replicated normally. |
| Sync Stopped | Replication is not currently running. |
If a database that was previously Synced returns to Syncing, a new synchronization cycle has started.
Step 3: Look for common indicators
A full synchronization often produces one or more of the following:
Synchronization progress restarting from 0%
Increased network activity
Increased CPU utilization
Increased memory utilization
Elevated ops/sec metrics
A FLUSHALL operation on the destination database
The web UI reporting “syncing X%” for the replicaOf sync
Why Does a Full Synchronization Occur?
A full synchronization can occur whenever Redis is unable to continue from the previous synchronization state.
Common reasons include:
A temporary, but extended, interruption between the source and destination databases
A failover event
Maintenance activity
Restarting synchronization after it was stopped
When this happens, Redis creates a new copy of the source dataset and loads it into the destination database.
Understanding FLUSHALL During a Full Synchronization
Customers are often concerned when they see a FLUSHALL operation on a destination database.
During a full synchronization, the destination database replaces its existing dataset with a fresh copy from the source database. To do this, the destination clears its current data before loading the incoming dataset.
When observed on a destination database that is performing a full synchronization, a FLUSHALL operation is expected behavior.
Full Synchronization After Maintenance
A common question is why synchronization restarted immediately after a maintenance window.
Certain maintenance activities can cause synchronization to restart. When this occurs, Redis may perform a full synchronization to ensure the destination database remains consistent with the source database.
Customers may notice:
Replication status changing from Synced to Syncing
Increased ops/sec on the destination database
Increased resource utilization during synchronization
A FLUSHALL operation on the destination database
These symptoms can be expected during a full synchronization following maintenance.
Disaster Recovery and Planned Failovers
A full synchronization replaces the destination dataset with the source dataset.
If you plan to promote the destination database and direct write traffic to it, disable Active-Passive replication before doing so.
Leaving replication enabled after the destination becomes writable can result in a future synchronization replacing data on the destination database. Note as well that replicaOf synchronization is one-way so data written to a replicaOf destination will not be visible on the source database. Read more here: https://redis.io/docs/latest/operate/rs/databases/import-export/replica-of/create/
Refer to your organization's disaster recovery procedures before performing a failover.
Troubleshooting
Synchronization restarted after maintenance
This can be expected behavior. Allow synchronization to complete and verify the database returns to Synced status.
Ops/sec increased unexpectedly on the destination database
A full synchronization may be loading data from the source database. Check replication status to determine whether synchronization is in progress.
A FLUSHALL operation appeared on the destination database
This is expected when a full synchronization is replacing the destination dataset with a fresh copy from the source.
Synchronization repeatedly restarts
If the database repeatedly transitions between Syncing and Synced, or never reaches Synced, contact Redis Support.
Synchronization does not complete
If synchronization remains in Syncing status for an extended period or repeatedly restarts, contact Redis Support.
0 comments
Please sign in to leave a comment.