【复制】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
*/






你可能感兴趣的:(mha)