mmm managing more than 2 masters

Asked by Natxeros on 2011-04-26

All examples that i have read about configuring mmm talk about 2 masters with one of them in active mode an the other just updating data from the first one, until there is some kind of problem so mmm would change to the other.

Could it be possible to set up an architecture with N masters but just with one active? i mean, can i distribute the writer role to more than 2 masters so mmm can select from various masters?
will it be any other limitations within this new model?

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
mysql-mmm Edit question
Assignee:
No assignee Edit question
Last query:
2011-04-26
Last reply:
2011-06-08
istvan.podor (istvan-podor) said : #1

Hi there,

Well MMM is not capable to have more than 2 masters. And also, it would
be really risky because having a circular replication model, that's the
limitation here.

Istvan

On 4/26/11 1:21 PM, Natxeros wrote:
> New question #154299 on mysql-mmm:
> https://answers.launchpad.net/mysql-mmm/+question/154299
>
> All examples that i have read about configuring mmm talk about 2 masters with one of them in active mode an the other just updating data from the first one, until there is some kind of problem so mmm would change to the other.
>
> Could it be possible to set up an architecture with N masters but just with one active? i mean, can i distribute the writer role to more than 2 masters so mmm can select from various masters?
> will it be any other limitations within this new model?
>
> Thanks
>

Natxeros (natxeros) said : #2

thanks again for so rapid answer.

i am thinking in setting up a N master architecture with N-1 passive masters using mmm but without circular replication. i am trying to figure out the problems related to have more than one passive master, and i can't.

could anybody explain me why mmm will not work with more than 2 masters? because it seems behaviour of monitor should be the same: ping master until it fails, select one slave (is this the problem?), stop slave, reset master and change master in all the other slaves to selected new master (is this the problem?).

because of my needs i would like to have more than 2 masters so another posibility might be having a 2 level mmm so i can have 4 masters ready to go up. could it be possible?

aeva black (tenbrae) said : #3

MMM does not operate by selecting a slave to promote. The method you are
speaking of has only one master, in ascii art represented like this:
M-->{s1...sN}. What is generally meant by "multi-master" is a topology like
this: M1<-->M2-->{s1...sN}

The primary difference between these topologies is that the second one
allowes writes to either master to flow to all the slaves, thanks to three
log_slave_updates option. The relationship between M1 and M2 is that each
one is a slave to the other. Extending this to more than two servers creates
what is commonly referred to as a ring, eg M1-->M2-->M3-->M1. This is very
difficult to manage when a node fails because (without a GUID) it is
impossible to reliably determine the coordinates for the CHANGE MASTER
command to bridge the gap created by one missing master.

Hopefully these explanations will help you understand how MMM works, and why
most people use two masters instead of a ring or just s single master.

Regards
Devananda
On Apr 26, 2011 5:55 AM, "Natxeros" <email address hidden>
wrote:

Ricardo Santos (xsbr) said : #4

I'd like to have 3 masters in writer role (1 actived and 2 standby) something like this:

M1-->M2<--M3

To turn it possible I removed the master limitation in Monitor/Monitor.pm:
http://pastebin.com/0AwhsdMU

It's my mmm_common.conf:
http://pastebin.com/1R0Ysttd

Can you help with this problem?

Provide an answer of your own, or ask Natxeros for more information if necessary.

To post a message you must log in.