01 Introduction to InnoDB ReplicaSetInnoDB ReplicaSet was introduced in MySQL 8.0, which provides the replication features we are familiar with. If you have the concept of MongoDB replica set, it will be easier to understand InnoDB ReplicaSet. InnoDB ReplicaSet uses the following techniques: 1. MySQL Shell, a more powerful client 2. MySQL Router, a lightweight middleware, can be compared to the role of mongos in MongoDB; 3. MySQL Server, also known as MySQL service InnoDB ReplicaSet, hereinafter referred to as innodb replica set. It uses MySQL's replication technology. The replica set has a primary node and one or more secondary nodes. It does not provide fault self-healing and multi-master mode like InnoDB cluster (InnoDB cluster is another MySQL high availability solution), but it provides manual methods to add, remove and configure related nodes. We usually use AdminApi in MySQL Shell to manage innodb replica sets. AdminAPI has two versions, js and python. We can easily write scripts to automatically deploy MySQL. AdminAPI provides an effective modern interface for MySQL instance sets, enabling you to provision, manage, and monitor deployments from a central tool. InnoDB replica set supports MySQL Clone component. We can use the clone plug-in to easily build a replica set. InnoDB ReplicaSet is tightly integrated with MySQL Router, and you can use AdminAPI to work with them. MySQL Router can automatically configure itself based on InnoDB ReplicaSet, a process called bootstrapping, so there is no need to manually configure the router. 02 Limitations of InnoDB ReplicaSetThe above introduces some basic knowledge and concepts of InnoDB replica set. Here we need to talk about its limitations. The limitations of InnoDB replica set are mainly reflected by comparing with InnoDB cluster. Let's list them below: 1. There is no automatic fault switching function. If the primary database is unavailable, you need to use AdminApi to manually trigger failover; 2. It is impossible to prevent data loss due to accidents or unavailability. When a failure occurs, transactions that have not been applied may be lost. 3. It is impossible to prevent data inconsistency after unexpected exit; when the master node is temporarily disconnected due to network problems, if a slave node is promoted to the master node, a brain split may occur; 4. InnoDB replica sets do not support multi-master mode, and the classic multi-master write replication solution cannot guarantee data consistency; 5. InnoDB replica sets are based on asynchronous replication and cannot perform flow control like MGR, so the read scalability will be limited to a certain extent; 6. All secondary instances must be replicated from the primary instance, so this may have a certain impact on the source instance. It is not difficult to see from the above description that there is still a big gap between InnoDB replica sets and MongoDB replica sets, but we still need to study it because it is an important step taken by MySQL officials on the road to high availability. With the subsequent iteration of versions, I believe these problems will be paid attention to and solved, and there will be better solutions to further meet user requirements. 03 Things to know before deploymentThe operating environment of the InnoDB replica set has certain requirements, as follows: 1. Only supports MySQL 8.0 and above; 2. Replication method that only supports GTID 3. Only row format binlog is supported, not statement format binlog 4. No support for copying filters 5. Do not allow the establishment of additional replication channels 6. There is only one primary node in the replica set, and there can be multiple secondary nodes. MySQL Router will monitor each node 7. The replica set must be managed entirely by MySQL Shell. Configuration and changes to the instance outside of MySQL Shell are not supported. In the next article, I will start with the most basic installation process and describe in detail the installation of MySQL Shell, MySQL Router, and the process of setting up an InnoDB replica set. The above is a brief introduction to MySQL InnoDB ReplicaSet. For more information about MySQL InnoDB ReplicaSet, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: Optimizing JavaScript and CSS to improve website performance
>>: Introduction to Semantic XHTML Tags
MySQL creates users and authorizes and revokes us...
Preface: MYSQL should be the most popular WEB bac...
Need to know how many days there are before an im...
This article uses examples to describe MySQL pess...
Preface For a data-centric application, the quali...
In the previous article, I introduced the detaile...
Table of contents SSH protocol SSH Connection pro...
What does Ctrl+c, Ctrl+d, Ctrl+z mean in Linux? C...
I think editors are divided into two categories, ...
Analyze four common methods and principles: float...
This article example shares the implementation of...
Effect: When the slideshow moves in one direction...
1) Process 2) FSImage and Edits Nodenode is the b...
Enter /usr/local/nginx/conf sudo cd /usr/local/ng...