Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
About the Author
About the Reviewers

How replication works

The following diagram shows how the replication process works:

A little explanation makes it easier to understand the process:

  1. A client requests a write transaction on the master host.

  2. The binary logs (also called binlogs) are updated. The binary logs contain events that describe database changes.

  3. The slave receives the information from the master.

  4. It then appends it to its relay logs.

  5. The slave SQL thread replays the statements contained in the relay logs.

There are 2 kinds of replication mechanisms:

  • Standard replication: This is the most common method, standard, each node has its own transaction ID

  • Global Transaction ID (GTID) replication: GTID permits each node to have the same transaction ID on all replicated nodes (only available from MariaDB 10)

We will see both the mechanisms and understand the advantages of GTID. In both the cases, when a network cut occurs, it is able to automatically reconnect and resume the replication (depending on the retention days).

Now, since...