Replication is like backup, but owning a more important role than backup in distribute system.1
The Need for Replication
- Improving Availability
- Preparing for Disaster Recovery
- Enhancing Perfomance
- Geographical Considerations(eg.CDN)
Synchronous Replication
The primary node waits for all replica to finish the operation and get "All is well", then the process is complete.
Pros and Cons
- Fault Tolerance
- Potential Blocking Issues
Asynchronous Replication
Pros and Cons
- Maximizing Throughput
- Possibility of Data Loss
Semi-synchronous Replication
It is a mix of the other two methods. It makes sure some of the updates are safe. It's a balanced approach.
- Synchronous Replication to Subset of Replicas
- Asynchronous Replication to Others
Pros and Cons
- Addressing Durability.
- Marginal Impact on Throughput.
Which one is right for you?
The factors we should Consider when you make decision.
- Criticality of Data
- Consistency Requirements
- System Throughput