In this blog post, we’ll discuss some of the
basics regarding Docker MySQL replication. Docker has gained
widespread popularity in recent years as a lightweight
alternative to virtualization. It is ideal for building virtual
development and testing environments. The solution is
flexible and seamlessly integrates with popular CI tools.

This post walks through the setup of MySQL replication with
Docker using Percona Server 5.6 images. To keep things
simple we’ll configure a pair of instances and override only the
most important variables for replication. You can add whatever
other variables you want to override in the configuration files
for each instance.

Note: the configuration described here is
suitable for development or testing. We’ve also used the …

In the previous article, we saw the basics of
establishing replication from multiple origins to the same
destination. By extending that concept, we can deploy more
complex topologies, such as the point-to-point (P2P) all-masters
topology, a robust and …

At Yahoo, we manage a massive number of MySQL databases spread
across multiple data centers.

In order to identify and respond to performance issues, we rely
on an extremely lightweight and robust web based tool to
proactively investigate the issues in them.

The tool has real time tracking features and continually gathers
the most important performance metrics, provides visualization
and statistical analysis for quickly identifying performance
patterns, bottlenecks and possible tuning opportunities.

In the last 10 years I have worked a lot with replication
systems, and I have developed a keen interest in the topic of
multiple masters in a single cluster. My interest has a two
distinct origins:

On one hand, I have interacted countless times with users who
want to use a replication system as a drop-in replacement for a
single server. In many cases, especially when users are dealing
with applications that are not much flexible or modular, this
means that the replication system must have several points of
data entry, and such points must work independently and in
symbiosis with the rest of the nodes.

On the other hand, I am a technology lover (look it up in the
dictionary: it is spelled geek), and as such I get my
curiosity stirred whenever I discover a new possibility of
implementing multi-master systems.

The double nature of this professional curiosity makes me
sometimes forget that the …

Tungsten Replicator is a powerful replication engine that, in
addition to providing the same features as MySQL Replication, can
also create several topologies, such as

all-masters: every master in the deployment is a
master, and all nodes are connected point-to-point, so that
there is no single point of failure (SPOF).

fan-in: Several masters can replicate into a single
slave;

star: It’s an all-masters topology, where one node
acts as hub which simplifies the deployment at the
price of creating a SPOF.

The real weakness of these topologies is that they don’t come
together easily. Installation requires several commands, and
running them unassisted is a daunting task. Some time ago, we
introduced a set of scripts (the Tungsten Cookbook) that allow
you to install multi-master topologies with a …

Working with replication, you come across many topologies, some
of them sound and established, some of them less so, and some of
them still in the realm of the hopeless wishes. I have been
working with replication for almost 10 years now, and my wish
list grew quite big during this time. In the last 12 months,
though, while working at Continuent, some of the topologies that
I wanted to work with have moved from the cloud of wishful
thinking to the firm land of things that happen. My quest for
star replication starts with the most common topology. One
master, many slaves.

Fig 1. Master/Slave topology

Legend

It looks like a star, with the rays extending from the master to
the slaves. This is the basis of most of the replication going on
mostly everywhere nowadays, and it has few surprises. Setting
aside the …

on occasion we need to support environments where not only a lot
of data needs to be processed but also in frequent batches.
For example, a new data file with hundreds of thousands of rows
arrives in a folder every few seconds.

In this setting we want to use clustering to use “commodity”
computing resources in parallel. In this blog post I’ll
detail how the general architecture would look like and how to
tune memory usage in this environment.

Clustering was first created around the end of 2006. Back
then it looked like this.

The master

This is the most important part of our cluster. It takes
care of administrating network configuration and topology.
It also keeps track of the state of dynamically added slave
servers.

I have been working with MySQL replication for quite a while. I
have dealt with simple replication setups and I have experimented
with complex ones. Five years ago I wrote an article about advanced MySQL replication,
which was mostly a dream on what you could do with imagination
and skill, but the matter from that article is still not even
remotely ready for production. Yet, since that article, I have
been approached by dozens of people who wanted to know how to
make the multiple master dream become reality. To all of them, I
had to say, "sorry, this is just a proof of concept.Come back in
a few years, it may become possible". It still isn't.
Despite its latest great technological advance, MySQL native
replication is is very poor of topologies. What you can do with
MySQL native replication is master-to-slave (which also includes
relayed …

Replication enables data from one MySQL server to be replicated
on one or more other MySQL servers. Replication is mostly used as
scale-out solution. In such a solution, all writes and updates
take place on the master server, while reads take place on one or
more slaves. This model is actually known as master-slave
replication and this is the kind of replication that I will be
setting up in this post.

Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.