This is a quick 2 min overview of Mysql InnoDb Cluster. The goal is to help you decide within a minute or two, whether this is an appropriate solution for you.
Simple HA solution for Mysql.
Built on top of MySql group replication.
It has 3 Components:
Replication: Uses existing mysql asynchronous replication capabilities. Default is Primary and secondary configuration. Writes go to master which replicates to slaves. Slaves can service reads
Mysql router: Provides routing between your application and the cluster. Supports automatic failover. If the primary dies. The router will redirect writes to the secondary that takes over.
Mysql shell: This is an advance shell that let you code and configure the cluster.
Works best over a local area network. Performance degrades over wide area networks
Easy to setup. Simple commands that are entered on the mysql shell.
var cluster = dba.createCluster('testCluster')
cluster.addInstance('server1@host1:3306')
cluster.addInstance('server2@host2:3306')
cluster.addInstance('server3@host3:3306')
Cluster elects the primary. If you want a particular server to be the primary, you can give it extra weight.
Client do not connect directly to the servers. Rather they connect to the Mysql router that provides the routing as well failover.
MySql InnoDB clusterSet provide additional resiliency by replicating data from a primary cluster to a cluster in another datacenter or location. If the primary cluster becomes available, one of the secondary cluster can become the primary.
Summary
Provides scalability for reads and some HA for Mysql deployments. Simple, easy to use solution. No sharding. Some consistency issues will there when you read from replicas that lag a little bit
References:
https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-innodb-cluster.html
No comments:
Post a Comment