关于如何保证数据一致性的问题

上一篇 / 下一篇  2008-10-23 00:10:15 / 个人分类:LAMP

Synchronous MySQL replication
In synchronous replication, a transaction cannot complete on the master until it
commits on one or more slave servers. There are various levels of synchronous replication,
which have several common names. MySQL does not offer synchronous replication
at the time of this writing, but there are third-party solutions. One such
solution is Google’s internal patches.
Google has an extensive set of patches for MySQL and InnoDB, which add many
extra features. Among them is semisynchronous replication, which causes a replication
master to wait until at least one slave has received the event before it commits a
transaction. Google has released its patches for MySQL 4.0.26 and 5.0.37. You can
download the patches and several related tools at http://code.google.com/p/googlemysql-
tools.
Another option is Solid Information Technology’s high-availability technology,
which it has ported to solidDB for MySQL. This solution has several advantages over
MySQL replication, including:
• The slave cannot fall behind the master.
• Solid uses multiple threads for writing on the slave, improving replication performance
in many scenarios.
• The “safeness” level during replication is user-configurable. In 1-Safe mode,
transactions return once they are committed on the master. In 2-Safe mode,

transactions do not return until after they have also been committed on the
slave, providing an extra level of safety in the event of a failure.
However, it works only with the solidDB storage engine, not with MyISAM, InnoDB,
or any other storage engine. Solid may port more of its high-availability technology
for a future release.
In addition to these two variations on the MySQL server itself, you can use a middleware
solution such as Continuent木铎校园 BBS 社区0AcSbF:JO


TAG: mysql MySQL Mysql 一致性 数据

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

关于作者