How does database replication work, and what should you know about read replicas?
How does database replication work, and what should you know about read replicas?
Replication copies changes from a primary (leader) to one or more replicas (followers). Replicas provide high availability and read scaling, but they are not backups.
| Mode | Commit returns when | Trade-off |
|---|---|---|
| Asynchronous | the primary has written it | fast; replicas lag; a failover can lose recent commits |
| Synchronous | at least one replica confirmed it | no data loss on failover; higher commit latency; a stuck replica can block commits |
| Semi-synchronous (MySQL) | a replica has received it | compromise |
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.