In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the difference between mysql synchronous replication and asynchronous replication, the article is very detailed, has a certain reference value, interested friends must read it!
Difference: asynchronous replication is when Master writes events to binlog and commits transactions. It doesn't know whether slave receives it or not. There is no guarantee that all transactions will be received by all slave. Synchronous replication is a Master commit transaction, and the client transaction completion information is not returned until the transaction has been committed in all slave.
Asynchronous replication
MySQL replication defaults to asynchronous replication. Master writes events to binlog, commits the transaction, and does not know whether slave receives it or not.
Cons: there is no guarantee that all transactions will be received by all slave.
Synchronous replication
Master commits the transaction, and the client transaction completion information is not returned until the transaction has been committed in all slave
Cons: completing a transaction may cause delays.
Semi-synchronous replication
When semi-synchronous replication is enabled on the Master, at least one slave turns on its function. When Master commits a transaction to slave, and the transaction has been written to relay-log and flushed to disk, slave will inform Master that it has been received. If the Master commit transaction is blocked and a wait timeout occurs, Master is not told that it has been received within a certain period of time, and Master is automatically converted to asynchronous replication mechanism.
Note: semi-synchronous replication will not work until it is enabled on Master and slave. Only on one side, it is still asynchronous replication.
This is all about the difference between mysql synchronous replication and asynchronous replication. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.