One of the projects I'm involved in at the moment has required some research into strategies for clustering MySQL for HA. One of the interesting ideas that we came across is some code from Google that adds semi-synchronous replication to MySQL's built in replication feature. Standard MySQL replication is asynchronous, meaning that transactions are committed on the master database and at some point after that (could be milliseconds, could be minutes or longer) the slave databases will receive the transactions and replicate them. This is great for performance but if the master database dies then transactions are likely to be lost due to the lag between the master and slaves. One of Google's contribution is to make the master database wait until the transaction has been received by one or more slave databases before acknowledging to the client the transaction has been committed. This doesn't 100% guarantee that transactions won't be lost (the slave could die before the transaction is actually written to disk) but it dramatically reduces the likelihood of transactions being lost. Of course, the price to pay is that writes to the master will be slower but thats pretty much always the trade-off between performance and reliability.
Here's a link to the Google MySQL Tools project.
http://code.google.com/p/google-mysql-tools/w/list
0 Comments:
Post a Comment
<< Home