标签归档:MMM

MySQL Master-Master Replication Manager

什麼是 MySQL Master-Master Replication Manager(MMM)?

  • MMM (MySQL Master-Master Replication Manager) 是整合 Script 做 監控/管理 MySQL Master-Master replication cluster 的設定配置.
  • Master-Master 的意思不是同時有兩台 Master 應付寫入的動作, 而是要做備援, 若 Master 死掉, 可於最短的時間內(幾秒內), 將備援的 Master 替換上線, 而這台備援的 Master, 平常也可以當 Slave (Reader).
  • 當 Slave 的 Replication Failed 時, 會自動讓此 Slave 停止提供服務, 避免不同步的狀況發生.
  • MMM 可解決 Master 死掉時, 需要停機或停止所有寫入的問題.

继续阅读

MySQL Master-Master Replication Manager(MMM)

一、前言: 

Master-Slave的数据库机构解决了很多问题,特别是read/write比较高的web2.0应用:

1、写操作全部在Master结点执行,并由Slave数据库结点定时(默认60s)读取Master的bin-log
2、将众多的用户读请求分散到更多的数据库节点,从而减轻了单点的压力

这是对Replication的最基本陈述,这种模式的在系统Scale-out方案中很有引力(如有必要,数据可以先进行Sharding,再使用replication)。

它的缺点是:

1、Slave实时性的保障,对于实时性很高的场合可能需要做一些处理
2、高可用性问题,Master就是那个致命点

本文主要讨论的是如何解决第2个缺点。

DB的设计对大规模、高负载的系统是极其重要的。高可用性在重要的系统(critical System)是需要架构师事先考虑的。存在的设计在重要系统中是危险的。 继续阅读

Master-Master Replication Example using MMM

Despite of my high load at work I decided to release mmm-1.0-pre2 today. There are some small, but critical fixes added and much more coming next week (or little bit later if mysqlconf will take more time than I think).

After the first alpha release I’ve received lots of emails, some messages in mmm-devel mail list and even some bug reports in Google Code bug tracking. One of the most asked things was documentation. 😉 So, I decided to write some posts in this blog (sorry to non-sql-related readers) and them compose some docs for final release using these posts and comments from readers. This post will be first in mmm-series and will describe how to use mmm in simple master+master scheme where one master accept write requests and both masters accept read requests. This post will provide you with detailed instructions about MySQL setup, permissions setting, mmm installation and configuration and cluster management. 继续阅读