MySQL Shell 9.0  /  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.

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