And Sharding
Main Database Replica
synchronous updates
[ ] [ ]
[ ] -----> [ ]
[ ] -----> [ ]
[ ] -----> [ ]
[ ] [ ]
asynchronous updates
When you write to the main database, you write to the replica as well.
If writes fail to the replica, then rollback the transaction.
This improves availability in some ways, but lowers performance.
Asynchonous updates are more performant, but lower consistency, and have more difficult failure modes.