Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Replication in Semi_Sync Replication mode

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Based on traditional replication, there may be a problem of delay in copying from the library. After the master goes down, if the master cannot be recovered at this time, the slave can only be used instead of the master. The slave is in a backward state, which will lead to data loss. Part of the problem can be solved by semi-synchronous replication.

The rpl_semi_sync_master_wait_point parameter controls at which stage the master waits for ACK acknowledgements from slaves in MySQL's semi-synchronous replication. In MySQL 5.7, this parameter has two main values: after_commit and after_sync.

1) rpl_semi_sync_master_wait_point=after_commit: master writes its binlog to bin-log file and syncs, commits transactions to storage engine, and waits for ACK. When at least one slave receives binlog, it writes relay-log and returns ACK acknowledgement. After receiving the ACK from the library, the master returns the result to the client.

2) rpl_semi_sync_master_wait_point=after_sync(new in MySQL 5.7): master writes its binlog to binlog file and sync, then enters wait ACK, when at least one slave receives binlog, writes relay-log and returns ACK acknowledgement message. After receiving the acknowledgement from the repository, the master commits the transaction to the storage engine and returns it to the client.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report