【複製】mha-4


翻譯自  http://code.google.com/p/mysql-master-ha/wiki/Advantages#Advantages_of_MHA

Advantages of MHA
/* mha優點 */


一、Master failover and slave promotion can be done very quickly
/* master故障切換 和 slave提升 都是迅速的 */

MHA normally can do failover in seconds (9-12 seconds to detect master failure, optionally 7-10 seconds to power off the master machine to avoid split brain, a few seconds for applying differential relay logs to the new master, so total downtime is normally 10-30 seconds), as long as slaves does not delay replication seriously.
After revoring the new master, MHA recovers the rest slaves in parallel. Even though you have tens of slaves, it does not affect master recovery time, and you can recover slaves very quickly.

DeNA uses MHA on 150+ {master, slaves} environments. When one of the master crashed, MHA completed failover in 4 seconds. Doing failover in 4 seconds is never possible with traditional active/passive clustering solution.

/*
MHA通常可以做failover秒(9-12秒檢測主機故障,可選擇7-10秒,關閉主機電源,以避免腦裂,幾秒鐘的時間差中繼日誌到新的主,所以總的停機時間一般爲10-30秒),只要slave不嚴重耽誤複製。
DeNA的使用MHA150+{master,slave}環境。當master中的一個崩潰時,MHA在4秒內完成故障轉移。傳統的 主動/被動 集羣解決方案與之相比,是永遠不可能在4秒內做的故障轉移的。
*/



二、Master crash does not result in data inconsistency
/* 主崩潰不會導致數據不一致 */

When the current master crashes, MHA automatically identifies differential relay log events between slaves, and applies to each slave. So finally all slaves can be in sync, as long as all slave servers are alive. By using together with Semi-Synchronous Replication, (almost) no data loss can also be guaranteed.
/*
當現任的mster當機後,mha會自動識別不同slave之間relay log的差異,同時應用這些差異到slave上。所以最後所有的slave都可以同步,只要所有的slave服務器都是活着的。
半同步複製一起使用,也可以保證(幾乎)沒有數據丟失。
*/



三、No need to modify current MySQL settings (MHA works with regular MySQL (5.0 or later))
/* 無需修改現有的MySQL設置 (mha必須工作在5.0或者更高的mysql上)*/

(1) One of the most important design principles of MHA is to make MHA easy to use as long as possible.
(2) MHA works with existing traditional MySQL 5.0+ master-slaves replication environments.
(3) Though many other HA solutions require to change MySQL deployment settings, MHA does not force such tasks for DBAs.
(4) MHA works with the most common two-tier single master and multiple slaves environments.
(5) MHA works with both asynchronous and semi-synchronous MySQL replication.
(6) Starting/Stopping/Upgrading/Downgrading/Installing/Uninstalling MHA can be done without changing (including starting/stopping) MySQL replication. When you need to upgrade MHA to newer versions, you don't need to stop MySQL. Just replace with newer MHA versions and restart MHA Manager is fine.
'
/*
(1) mha其中一個最重要的設計原則是,儘可能長的使用簡單
(2) mha工作在現有已經存在的 mysql主從 環境下
(3) 雖然很多ha方案取藥改變mysql部署設置,但是mha並不強制這樣做
(4) MHA作品最常見的兩層單主多從的環境。
(5) MHA的可以工作在MySQL的半同步和異步複製下。
(6) 啓動/停止/升級/降級/安裝/卸載MHA可以不用改變(包括啓動/停止)MySQL複製。
   當您需要以MHA升級到較新的版本,您不需要停止MySQL。只需更換新的MHA版本,重新啓動"MHA manager 節點"就可以了。
*/



(7) MHA works with normal MySQL versions starting from MySQL 5.0. Some HA solutions require special MySQL versions (i.e. MySQL Cluster, MySQL with Global Transaction ID, etc), but you may not like to migrate applications just for master HA.
(8) In many cases people have already deployed many legacy MySQL applications and they don't want to spend too much time to migrate to different storage engines or newer bleeding edge distributions just for master HA. MHA works with normal MySQL versions including 5.0/5.1/5.5 so you don't need to migrate.

/*
(7) mha工作在mysql 5.0以上的版本。一些ha方案可能需要特殊的mysql版本(例如:mysql集羣版,mysql帶有全局事務id等),但你也許不喜歡僅僅因爲ha,遷移程序
(8) 在許多情況下,人們已經部署了許多傳統的MySQL應用程序,他們不想花太多的時間遷移到不同的存儲引擎,或新的流行邊緣分佈,僅僅爲了主HA。  
   MHA的工作原理與普通的MySQL版本,包括5.0/5.1/5.5,這樣你就不需要遷移
*/


四、No need to increase lots of servers
/* 無需增加大量的服務器 */

(1) MHA consists of MHA Manager and MHA Node.
(2) MHA Node runs on the MySQL server when failover/recovery happens so it doesn't require additional server. '
(3) MHA Manager normally runs on a dedicated server so you need to add one (or two for HA) server(s), but MHA Manager can monitor lots of (even 100+) masters from single server, so the total number of servers is not increased so much.
(3) Note that it is even possible to run MHA Manager on one of slave servers. In this case total number of servers is not increased at all.


/*
(1) mha由 mha-manager和mha-node節點組成
(2) mha-node節點,運行在MySQL服務器上,當發生故障轉移/恢復時,它不需要額外的服務器
(3) mha-manager節點,通常在專用服務器上運行,所以你需要添加一個(或兩個爲HA)服務器(S)
   但mha-manager可以從單臺服務器監控很多master(甚至是100+),所以總的服務器數量不是增加了那麼多
*/


五、No performance penalty
/* 沒有性能損失 */

(1) MHA works with regular asynchronous or semi-synchronous MySQL replication.
(2) When monitoring master server, MHA just sends ping packets to master every N seconds (default 3) and it does not send heavy queries.
(3) You can expect as fast performance as regular MySQL replication.

/*
(1) MHA的工作在,普通的MySQL的異步或半同步複製上
(2) 當監控master的時候,mha也僅僅是每N秒發生一次ping包到master上(默認3秒),並不是發送沉重的查詢
(3) 你可以期待和正常的mysql一樣高速的性能
*/


六、Works with any storage engine
/* 工作在mysql任何引擎下 */

(1) MHA works with any storage engines as long as MySQL replication works, not limited to InnoDB (crash-safe, transactional storage engine).
(2) Even though you use legacy MyISAM environments that are not easy to migrate, you can use MHA.

/*
(1) mha工作在mysql複製的任何引擎下,而不僅僅是innodb引擎
(2) 即使您使用傳統的MyISAM環境是不容易遷移,仍可以使用MHA
*/






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章