Monday, August 29, 2011

MySQL-MHA: Support for multi-master configuration

 After publishing MySQL MHA in the end of July, I received a few requests for supporting multi-master configuration. So I spent time for extending MHA for supporting multi-master, and now it's published at a separated GitHub branch (a new development tree). I'll take some time for people to evaluate the new feature, and after verifying it's stable enough, I'll merge it to the main branch and will release as a new version (tarball release).

The below is procedures to install MHA Manager multi-master tree.
$ git clone git://github.com/yoshinorim/MySQL-MasterHA-Manager.git

$ cd MySQL-MasterHA-Manager
$ git checkout -b multimaster origin/multimaster
$ perl Makefile.PL
$ make
$ sudo make install
If you have not installed Module::Install Perl module and have difficulties to install it, you can simply copy the module from MHA Manager tarball package like below.
$ cd MySQL-MasterHA-Manager(from github)

$ cp -rp /path/to/MHA-Manager-Tarball/inc ./
$ perl Makefile.PL
...

Here are some notes to make MHA work with multi-master.



* Only one primary master (writable) is allowed. MySQL global variable "read-only=1" must be set on other MySQL masters.

* By default, all managed servers should be in two-tier replication channel. If you want to manage three or more tier replication channel, "multi-tier-slave=1" parameter must be set in the MHA configuration file.




Example replication settings are as follows.




1) Simple two-tier multi-master configuration
  M1(host1,RW) <----> M2(host2,read-only)

|
+-----+--------+
S1(host3,R) S2(host4,R)

=> After failover

M2(host2,RW)
|
+-----+--------+
S1(host3,R) S2(host4,R)

Configuration example:

[server1]
hostname=host1
candidate_master=1

[server2]
hostname=host2
candidate_master=1

[server3]
hostname=host3

[server4]
hostname=host4
On host2, SET GLOBAL read_only=1 must be set.







2) Three tier multi-master configuration

  M1(host1,RW) <-----------------> M2(host2,read-only)

| |
+-----+--------+ +
S1(host3,R) S2(host4,R) S3(host5,R)


=> After failover

M2(host2,RW)
|
+--------------+--------------------------+
S1(host3,R) S2(host4,R) S3(host5,R)


Configuration example:
[server default]
multi_tier_slave=1

[server1]
hostname=host1
candidate_master=1

[server2]
hostname=host2
candidate_master=1

[server3]
hostname=host3

[server4]
hostname=host4

[server5]
hostname=host5
In this case, host5 is a third-tier slave, so MHA does not manage host5(MHA does not execute CHANGE MASTER on host5 when the primary master host1 fails). When current master host1 is down, host2 will be new master, so host5 can keep replication from host2 without doing anything.



If you want to try MHA, tutorials will be good start.

26 comments:

Anonymous said...

great!

riftplat said...

buy wow gold
cheap wow gold

Anonymous said...

If the original price of Hermes Watches Sale a Hermes purse or bag is thousands, you can buy one for your own Imitation Watches at $200 or lesser. Online handbag retailers have great bargains for replica hermes their customers. The good thing about these offers is that these are reliable, unlike the fake bags you find in the streets.

WOW Gold said...

I was thwarted in to fool different types are great World Of Warcraft Gold for one's dark blue,Most economical Howler Golden wolf land is obviously pressure on material cover using Occur is perfect for walking the dog; pitch-dark, creature farming is actually casual lot hatred, considering shadow priests employ a impregnable type of rib: Mana Burn,Cheapest WOW Gold wings could be unagitated anytime curl afterwards blue target;Hunting watch,Aion Amber in person recall every time a hunter scrimmage damage, so really don't appeal the really deplorable that your chosen chosen mathematical group flake place (the a longer period A hunter will not face police squad fighting),Buying WOW Gold peculiarly non hooked up pve huntsman Movement gift arrived at recognise standard candle Punk WOW Gilded European union smoke wrong is a wonderful substitute.

RS Gold said...

I think your blog makeover looks really nice! http://twitter.com/#!/RSGoldfzf

lace wedding gowns said...

Thank you for giving me such a good chance, let me be able to read this essay so good of a son, thank you very much.

A reservoir of innovation. Reaped from the most popular designers and the new prominent. You are invited to be impressed with Amber’s selection of lace wedding gowns, by virtue of an incredible amount of self-motivated ideas that sparkling around. Have a digging-out on our span-new designer cheap wedding dresses plus size that are tagged into distinctive genre and style wedding dresses 2012.

ambersbridal said...

Great article. I merely found your blog along with planned to declare i get genuinely liked looking at your blog blogposts. However I’ll always be opt-in for a supply along with I’m hoping anyone article yet again rapidly.lace wedding dresses http://www.ambersbridal.com/wedding-dresses/lace-wedding-dresses.html
vintage wedding dress http://www.ambersbridal.com/wedding-dresses/vintage-wedding-dresses.html

ambersbridal said...

A holy church, rings, a bouquet, a 3-floor wedding cake, lace wedding dress
champagne, and the moving promise “ I do”, make up the happiest moment in one’s life. Then it is the wedding.
lace wedding gowns
A gorgeous wedding dress has been inside a girl’s dream since she was five years old. It is widely said that the bride is the most beautiful woman all over the world.
Bridal gowns vary in different parts of the world. For example, cheap wedding dresses plus sizein traditional Chinese culture, the color red is regarded for centuries as the symbol of good luck; while in the Occident, wedding dresses 2012 a full-length white wedding dress is always associated with romance and sanctity. But, with the globalization, wedding dresses tend to be alike in the whole world.

Cheap RS Gold said...

This can be a great inspiring article. We are basically satisfied with your good work. You'd put really very useful information.
http://edengold.allmyblog.com/36-western-wear-was-made-to-survive-anything-the-day-might-bring.html
http://edengolduna.eklablog.com/designing-of-clothes-is-fully-involved-to-make-you-beautiful-a30683296
http://edengold.blogdetik.com/womens-clothing-at-fashion-runway-shows-can-be-very-glamorous/
http://www.blogbasen.dk/wowgold/2407/Some-runways-shows-feature-a-certain-theme-like-recyclable-material/
http://maplestoryuna.bloguje.cz/916783-western-clothes-took-on-a-romantic-and-in-fact-cliche-representation-of-the-honorable.php
http://rsgolduna.blogspot.com/2012/01/music-has-influenced-british-fashion.html

Zegaara said...

I was actually looking for this resource a few weeks back. Thanks for sharing with us your wisdom.This will absolutely going to help me in my projects .

Classic Dresses
Classic Bridesmaid Dresses
Wedding Dresses with Sleeves
Flower Girl Dresses

Empire Wedding Dresses

yan said...

Even though omega replicas watches Lin’s fame has blossomed hermes bracelet overnight, he has remained level-headed with a steady focus. In a recent replica rolex watches post-game Audemars Piguet Watches interview, he thanked God, quoting Scripture, which says, “God works in all things for the good of those who love Him.”

hugginss jetterees said...

Picture your self in Runescape, close friends of Runescape, abundant with gold and armored in complete rune in Runescape. You select to check out the profound Wilderness in Runescape, but understand you've in no way had the practical experience before even though playing rs gold.

GuildWars2Items said...

Suppose someone gave you a pen — a sealed, solid-colored pen.You could not see how much ink it had D3 Gold, think Positive Thoughts Every Day Buy D3 Gold, the brightest future will always be based on a forgotten past, you can't go on well in life until you let go of your past failures and heartaches Cheap D3 Gold.

GuildWars2Items said...

It's great to be great, but it's greater to be human Sell Runescape Gold, if I could rearrange the alphabet, I'd put buy guild wars 2 gold Y and I together guild wars 2 gold buy, A lifetime of happiness! No man alive could bear it; it would be hell on earth .

GuildWars2Items said...

I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches c9 gold, life is not measured by the number of breaths we take, but by the moments that take our breath away c9 online gold, Ability may get you to the top, but it takes character to keep you there buy c9 gold.

Maria Arredondo said...

Life is too short to wake up in the morning with regrets. So, love the people who treat you right and forget about the ones who do not buy c9 gold, Life is like a hot bath. It feels good while you're in it, but the longer you stay in, the more wrinkled you get cheap c9 gold, what gets us into trouble is not what we don't know.It's what we know for sure that just ain't so c9 money.

Maria Arredondo said...

Be truthful, do what you know is right, put forth effort when it is called for persist Diablo 3 Power Leveling, and the more you do so, the more easily you'll be able to do so Diablo 3 PowerLeveling.Exercise your strength, and you'll surely grow stronger, more capable, and Diablo iii PowerLeveling

buyGuildwars2gold said...

Ability may get you to the top, but it takes character to keep you there, RuneScape Gold to change your future, alter your decisions today, RS Gold. Life is not measured by the number of breaths we take, but by the moments that take our breath away RS2 Gold.

buyGuildwars2gold said...

It takes strength to be truthful when a lie would be more convenient D3 Gold, it takes strength to be polite to someone when that person has been rude to you Buy D3 Gold, it takes strength to persist in the face of obstacles, when it would be much easier to simply give up Cheap D3 Gold.

Aelove beL said...

very nice story...
cerita panas
cerita hot
cerita dewasa
cerita hot
cerita cinta
cerita sex
cerita dewasa

dveeeeeee said...

After publishing MySQL MHA in the end of July, I received safeswtorcredits few requests for supporting multi-master configuration. So I spent time for extending MHA for supporting multi-master, and now it's published at a separated GitHub branch (a new development tree). I'll take some time for people to evaluate the new feature,http://wwww.safeswtorcredits.com/ and after verifying it's stable enough, I'll merge it to the main branch and will release as a new version (tarball release).

wow9gamer said...

In this case, host5 is a third-tier slave, so MHA does not manage host5(MHA does not execute CHANGE MASTER on host5 when the primary master host1 fails)Buy League of Legends Account

LOL Boost

jimmy wilson said...

Exceptional publish I enjoy the document adore how you defined everything, you are doing an incredible career a lot of other people just like you via in which kind of educational blogs provide recognition in order to all of us associated with a lot of things. My partner and i understand other sorts of interesting websites from your internet websites along with I am a great deal fascinated together with your running a blog knowledge, When i in addition did start to generate sites and this also variety blogs genuinely aid me personally out there. We already added your own web site as well as propagated your own web sites to help my own colleagues not only everyone but them all such as ones blogging knowledge, wish a person compose much more interesting information sites this way one particular as well as enjoy on your long term weblogs.

Jimmy Wilson from Smallville Leather Jacket

sadia sulaman said...

Excellent read, Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style.mentomori |

agilitty |

lettrader |

dtas-diamonds |

bodwennursery |

runhamsweddingcars |

im16 |

ralphandrusso |

alaniles |

acenet2000 |

justin adams said...

Uncover the resources you'll need. Per month at a later date, commit this specific loan returning once more. it's that simple! many fast auto title loan connected to is that the higher initial Advance loan using North American nation ALL day money upgrades is doubtless TARGET fully FREE!!! That’s ideal.

panca-samudera said...

The article posted was very informative and useful
thanks for sharing.
jaring futsal , jaring futsal murah , jual jaring futsal , jaring golf , jual jaring golf , jaring golf murah ,
jaring polynet , tangga darurat , jaring truk , jaring cargo , jaring outbound , jual rumput futsal murah ,
jual rumput sintetis murah , tali tambang , cargo net , jaring tanaman , jaring kassa , jaring proyek , jaring bangunan ,
jaring gedung , jaring pengaman proyek , jaring pengaman bangunan , jaring pengaman gedung , jaring peneduh , jaring waring , kasa hijau , tangga darurat , jaring gawang futsal ,
jual jaring gawang futsal murah , jaring peneduh , jaring truk , tali tambang nylon , jaring safety , safety net , jaring , waring , polynet

Post a Comment