MySQL Shell 8.4  /  MySQL InnoDB 集群  /  MySQL InnoDB 集群只读副本

7.11 MySQL InnoDB 集群只读副本

MySQL Shell 只读副本是集群成员的只读副本。异步复制使副本保持最新,使您能够扩展工作负载,将集群中的读取请求分卸载到一个或多个专用的只读实例,并为您的数据集提供额外的冗余。如果源发生故障,只读副本会自动连接到另一个集群成员并恢复复制。

图 7.3 InnoDB 集群只读副本概述

Three MySQL servers are grouped together as a high availability Cluster. One of the servers is the read/write primary instance, and the other two are read-only secondary instances. Group Replication is used to replicate data from the primary instance to the secondary instances. A group of Read Replicas replicates from the Cluster's primary by asynchronous replication. MySQL Router connects client applications (in this example, a MySQL Connector) to the primary instance with a read-write connection and to the Read Replicas with a read-only connection.

可以将只读副本配置为从集群的任何成员进行复制。默认情况下,它们从主节点进行复制。您还可以将只读副本提升为辅助集群成员,并将辅助集群成员降级为只读副本。