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
My system and software versions are as follows: S...
MySQL full-text index is a special index that gen...
Table of contents Preface What to use if not jQue...
<body> <div id="root"> <...
0. Preparation: • Close iTunes • Kill the service...
1. Introduction The EXPLAIN statement provides in...
Table of contents Slots What are slots? Slot Cont...
Preface Recently, our company has configured mbp,...
1 Effect Demo address: https://www.albertyy.com/2...
In the previous article "MySQL table structu...
1. Install libfastcommon-1.0.43. The installation...
Mysql left join is invalid and how to use it When...
To understand load balancing, you must first unde...
MySQL stored procedures, yes, look like very rare...
When shutting down the MySQL server, various prob...