Amazon AWS Multi Datagcenter Master Replication.

34 views
Skip to first unread message

David Bell

unread,
Feb 3, 2012, 6:44:44 AM2/3/12
to codership
Hi there.

I am currently trying to work my way our of a single point of failure
situation with the MySQL database structure that I manage.

Currently I have a single Master Server with 2 Slave Servers in read-
only mode. Round-Robin DNS shares the load between these.

Due to a desire to increase availability, I am looking to replicate
this setup in a second AmazonAWS datacenter and can see a case for
using 3 nodes at some point in the future.

Galera seems to offer a solution to my problem.

Is it possible to build a Master Replication cluster (the Master in
each datacenter) (so 2 or 3 masters) and then have each Master have 2
or more read-only Slaves doing "traditional" MySQL replication.

The purpose for wanting to do this is to reduce the amount of inter-
datacenter traffic.

Thanks

David

Henrik Ingo

unread,
Feb 3, 2012, 7:30:59 AM2/3/12
to David Bell, codership
It is possible. From each Galera node you could fan out a number of
MySQL replication slaves.

However, now if your one galera node goes down, then that whole data
center is disconnected. What is worse: if a node is disconnected long
enough that it cannot do incremental state snapshot, then it will need
to take a full copy of another galera node. Your replication slaves
are now useless, you need to re-provision them too from the same
backup.

If you don't plan to have dozens of read-only nodes, I would strongly
consider using just galera clustering for all nodes. The simplicity is
worth the cost of more traffic.

henrik

> --
> You received this message because you are subscribed to the Google Groups "codership" group.
> To post to this group, send email to codersh...@googlegroups.com.
> To unsubscribe from this group, send email to codership-tea...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/codership-team?hl=en.
>

--
henri...@avoinelama.fi
+358-40-8211286 skype: henrik.ingo irc: hingo
www.openlife.cc

My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559

Alex Yurchenko

unread,
Feb 3, 2012, 8:42:49 AM2/3/12
to codersh...@googlegroups.com
Hi,

Henrik is right. Unfortunately your suspicions are correct too: if you
have 3 Galera nodes at each datacenter, the traffic between datacenters
is tripled. One day this will be fixed, but no ETA.

However replication traffic is normally way smaller than the client
one, so there is a good chance it does not add much to out-of-datacenter
traffic you already have.

Regards,
Alex

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

SyRenity

unread,
Feb 3, 2012, 12:30:45 PM2/3/12
to codersh...@googlegroups.com
Hi.

Can you elaborate on this one?

I mean, as far as I understand how Galera works, the data should flow from node to node only once, i.e. as I add additional node, the amount of time the data is replicated increase by one.

This means in 3 data-centers scenario, the data will flow from one node to another, i.e. 2 times rather then 3.

Thanks.

Alex Yurchenko

unread,
Feb 3, 2012, 1:01:19 PM2/3/12
to codersh...@googlegroups.com
On 2012-02-03 20:30, SyRenity wrote:
> Hi.
>
> Can you elaborate on this one?
>
> I mean, as far as I understand how Galera works, the data should flow
> from
> node to node only once, i.e. as I add additional node, the amount of
> time
> the data is replicated increase by one.

I guess you have a typo there: "amount of data", not "amount of time".

> This means in 3 data-centers scenario, the data will flow from one
> node to
> another, i.e. 2 times rather then 3.
>
> Thanks.

You're right in your assumptions. However, I understood it so that the
idea is to have 2 datacenters, 3 nodes each. This way external traffic
triples.

Regards,
Alex

Reply all
Reply to author
Forward
0 new messages