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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Sharding replication


You've now seen what sharding is, how it works, and have understood the concept, but how to deal with high availability? If you remember, in the previous chapters we talked about replication, and the most advanced among them is Galera Cluster.

The first idea you may have is to combine multiple technologies such as Galera to make a scalable (sharded) and highly available architecture such as the following:

This is a good solution—one of the best. However, the price of this architecture may be very high and even more if you want a lot of shards. So what kind of other solutions do we have?

Spider, by default, embeds a replication mechanism. That means each shard could have its own shard replicated to another node. Let's try this.

Creating replicated shards

First of all, you need data to add. We will reuse the data generated by sysbench (in the sysbench database). If you do not have those data, launch the sysbench tool again.

Then, create a replication database on all backends...