标签归档:Master-Master Replication

Configuring MySQL Master-Master Replication

MySQL Master-Master replication adds speed and redundancy for active websites. With replication, two separate MySQL servers act as a cluster. Database clustering is particularly useful for high availability website configurations. Use two separate Linodes to configure database replication, each with private IPv4 addresses.

This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo. If you’re not familiar with the sudo command, you can check our Users and Groups guide.

This guide is written for Debian 7 or Ubuntu 14.04.

Install MySQL

继续阅读

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. 继续阅读