{"id":1099,"date":"2009-12-16T23:48:29","date_gmt":"2009-12-16T15:48:29","guid":{"rendered":"http:\/\/www.orczhou.com\/?p=1099"},"modified":"2011-06-23T00:01:08","modified_gmt":"2011-06-22T16:01:08","slug":"mysql-55-semi-sync-replication","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2009\/12\/mysql-55-semi-sync-replication\/","title":{"rendered":"MySQL 5.5 Semi Sync Replication"},"content":{"rendered":"<p>\u4eca\u5929\u770b\u5230MySQL5.5\u653e\u51fa\u4e86\u7b2c\u4e00\u4e2a\u7248\u672c<a href=\"http:\/\/dev.mysql.com\/downloads\/mysql\/5.5.html\">MySQL 5.5 Community Edition &#8211; Milestone Release<\/a>\uff0c\u6700\u5927\u7684\u589e\u5f3a\u83ab\u8fc7\u4e8e\u52a0\u5165\u4e86<a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.5\/en\/replication-semisync.html\">Semi Sync Replication<\/a>\u7684\u652f\u6301\uff08\u867d\u7136\u4ecd\u4e0d\u5b8c\u5584\uff09\u3002<\/p>\n<p>\u8fd9\u91cc\u505a\u4e00\u4e2a\u79d1\u666e\uff0c\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0bSemisynchronous Replication\uff1a<!--more--><\/p>\n<p><font color=\"red\">1. Why Semisynchronous Replication?<\/font><\/p>\n<p>\u4e4b\u524d\u7248\u672c\u7684MySQL Replication\u90fd\u662f\u5f02\u6b65\uff08asynchronous\uff09\u7684\uff0c\u4e3b\u5e93\u5728\u6267\u884c\u5b8c\u4e00\u4e9b\u4e8b\u52a1\u540e\uff0c\u662f\u4e0d\u4f1a\u7ba1\u5907\u5e93\u7684\u8fdb\u5ea6\u7684\u3002\u5982\u679c\u5907\u5e93\u4e0d\u5e78\u843d\u540e\uff0c\u800c\u66f4\u4e0d\u5e78\u7684\u662f\u4e3b\u5e93\u6b64\u65f6\u53c8\u51fa\u73b0Crash\uff08\u4f8b\u5982\u5b95\u673a\uff09\uff0c\u8fd9\u65f6\u5907\u5e93\u4e2d\u7684\u6570\u636e\u5c31\u662f\u4e0d\u5b8c\u6574\u7684\u3002\u7b80\u800c\u8a00\u4e4b\uff0c\u5728\u4e3b\u5e93\u53d1\u751f\u6545\u969c\u7684\u65f6\u5019\uff0c\u6211\u4eec\u65e0\u6cd5\u4f7f\u7528\u5907\u5e93\u6765\u7ee7\u7eed\u63d0\u4f9b\u6570\u636e\u4e00\u81f4\u7684\u670d\u52a1\u4e86\u3002<\/p>\n<p>Semisynchronous Replication\u5219\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u4fdd\u8bc1\u63d0\u4ea4\u7684\u4e8b\u52a1\u5df2\u7ecf\u4f20\u7ed9\u4e86\u81f3\u5c11\u4e00\u4e2a\u5907\u5e93\u3002<\/p>\n<p><font color=\"red\">2. \u4e3a\u4ec0\u4e48\u662fSemi synchronous\u800c\u4e0d\u662fFull synchronous\uff1f<\/font><\/p>\n<p>Semi synchronous\u4e2d\uff0c\u4ec5\u4ec5\u4fdd\u8bc1\u4e8b\u52a1\u7684\u5df2\u7ecf\u4f20\u9012\u5230\u5907\u5e93\u4e0a\uff0c\u4f46\u662f\u5e76\u4e0d\u786e\u4fdd\u5df2\u7ecf\u5728\u5907\u5e93\u4e0a\u6267\u884c\u5b8c\u6210\u4e86\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\u4f1a\u5bfc\u81f4\u4e3b\u5907\u6570\u636e\u4e0d\u4e00\u81f4\u3002\u5728\u67d0\u4e2asession\u4e2d\uff0c\u4e3b\u5e93\u4e0a\u63d0\u4ea4\u4e00\u4e2a\u4e8b\u52a1\u540e\uff0c\u4f1a\u7b49\u5f85\u4e8b\u52a1\u4f20\u9012\u7ed9\u81f3\u5c11\u4e00\u4e2a\u5907\u5e93\uff0c\u5982\u679c\u5728\u8fd9\u4e2a\u7b49\u5f85\u8fc7\u7a0b\u4e2d\u4e3b\u5e93Crash\uff0c\u90a3\u4e48\u4e5f\u53ef\u80fd\u5907\u5e93\u548c\u4e3b\u5e93\u4e0d\u4e00\u81f4\uff0c\u8fd9\u662f<strong>\u5f88\u81f4\u547d<\/strong>\u7684\u3002\uff08\u5728\u4e3b\u5e93\u6062\u590d\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u53c2\u6570Rpl_semi_sync_master_no_tx\u89c2\u5bdf\uff09<\/p>\n<p><font color=\"red\">3. \u5982\u679c\u4e3b\u5907\u4e4b\u95f4\u8fde\u63a5\u51fa\u73b0\u6545\u969c\uff0c\u4e3b\u5e93\u662f\u5426\u4f1a\u4e00\u76f4\u7b49\u5f85\uff1f<\/font><\/p>\n<p>\u5982\u679c\u4e3b\u5907\u7f51\u7edc\u6545\u969c\u6216\u8005\u5907\u5e93\u6302\u4e86\uff0c\u4e3b\u5e93\u5728\u4e8b\u52a1\u63d0\u4ea4\u540e\u7b49\u5f8510\u79d2\uff08rpl_semi_sync_master_timeout\u7684\u9ed8\u8ba4\u503c\uff09\u540e\uff0c\u5c31\u4f1a\u7ee7\u7eed\u3002\u8fd9\u65f6\uff0c\u4e3b\u5e93\u5c31\u4f1a\u53d8\u56de\u539f\u6765\u7684\u5f02\u6b65\u72b6\u6001\u3002<\/p>\n<p><font color=\"red\">4. \u6700\u540e<\/font><\/p>\n<p>\u4e14\u4e0d\u8bba5.5\u662f\u5426\u7a33\u5b9a\uff0c\u73b0\u5728\u7684Semi synchronous Replication\u4e5f\u8fd8\u662f\u5f88\u4e0d\u5b8c\u5584\u7684\uff0c\u5e0c\u671b\u80fd\u591f\u7ee7\u7eed\u5065\u58ee\u76f4\u81f3\u7a33\u5b9a\u3002<\/p>\n<p>\u55e8\uff0c\u8c01\u77e5\u9053\u5462\uff1f<\/p>\n<p><!--worked by orczhou@gmail.com Under http:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.5\/cn\/--!>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u770b\u5230MySQL5.5\u653e\u51fa\u4e86\u7b2c\u4e00\u4e2a\u7248\u672cMySQL 5.5 Community Edition &#8211; Milestone Release\uff0c\u6700\u5927\u7684\u589e\u5f3a\u83ab\u8fc7\u4e8e\u52a0\u5165\u4e86Semi Sync Replication\u7684\u652f\u6301\uff08\u867d\u7136\u4ecd\u4e0d\u5b8c\u5584\uff09\u3002 \u8fd9\u91cc\u505a\u4e00\u4e2a\u79d1\u666e\uff0c\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0bSemisynchronous Replication\uff1a<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[6],"tags":[69,37,68,70],"class_list":["post-1099","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-mysql5-5","tag-replication","tag-semi-sync","tag-semi-sync-replication"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=1099"}],"version-history":[{"count":11,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1099\/revisions"}],"predecessor-version":[{"id":2978,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1099\/revisions\/2978"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=1099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=1099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=1099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}