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.