14. Skill Check Achieving High Availability with MySQL InnoDB Cluster
Which are true about a MySQL InnoDB cluster? (Choose two)
It provides a confgurable capability for the administration of a group of server instances in a cluster.
It uses AdminAPI to work with relational and document data in the MySQL Document Store.
It provides real-time access with data consistency across partitioned and distributed datasets.
It relies on MySQL Router to interconnect replicated servers in a group.
It uses MySQL Group Replication to replicate data between all servers in a group.
How does MySQL Shell (mysqlsh) support the administration of a cluster? (Choose two)
It enables replicated server updates using binary log position and global transaction identifiers (GTIDs).
It manages failover by automatically routing server connections.
It provides scripting capabilities using JavaScript, Python, and SQL commands.
It implements a pluggable architecture and allows developers to create customized plug-ins.
It enables access to MySQL features via APIs
You have a live cluster with three servers. Executing the dba.getCluster() function returns the Cluster value “cluster”. Which methods must be used, all of which are required, to add a fourth server to the cluster? (Choose three)
cluster.rescan()
cluster.rejoinInstance()
dba.configureLocalInstance()
cluster.addInstance()
cluster.dissolve()
dba.configureInstance()
Which are functions of Group Replication? (Choose two)
assigning replication servers to groups of three to nine servers
in multi-primary mode, enabling group members to certify the order of transactions within the global sequence of transactions
enabling automatic avoidance of “split-brain” situations among group members
in multi-primary mode, enabling automatic election of a new primary when the primary server fails
in single-primary mode, enabling all servers to accept transactions but only the primary decides the order to commit
Examine this mysqlsh statement and output: mysql-js> cluster.checkInstanceState(“root@server4:3314”) … … { "reason": "recoverable", "state": "ok" } What does the output signify?
The instance has not executed any GTID transactions; therefore, it cannot conflict with the GTIDs executed by the cluster.
The instance has more executed GTIDs than the executed GTIDs of the cluster seed instances.
The instance has executed GTIDs, which diverge with the executed GTIDs of the cluster seed instances.
The instance has executed GTIDs, which do not conflict with the executed GTIDs of the cluster seed instances.
myCluster is an InnoDB cluster. Examine this mysqlsh statement and output: mysql-js > cluster.status() { "clusterName": "myCluster", "defaultReplicaSet": { "name": "default", "primary": "server2:3312", "status": "OK_NO_TOLERANCE", … What does this status signify? (Choose two)
There are enough members online to form a quorum.
One or more members may be online but their status is not ONLINE or RECOVERING.
One or more members are online but cannot form a quorum.
There is no redundancy in the cluster, and the failure of a member will result in database outage.
There is sufficient redundancy available to tolerate at least one failure.
14. Skill Check Achieving High Availability with MySQL InnoDB Cluster
Which are true about a MySQL InnoDB cluster? (Choose two)
It provides a confgurable capability for the administration of a group of server instances in a cluster.
It uses AdminAPI to work with relational and document data in the MySQL Document Store.
It provides real-time access with data consistency across partitioned and distributed datasets.
It relies on MySQL Router to interconnect replicated servers in a group.
It uses MySQL Group Replication to replicate data between all servers in a group.
答案:
It provides a confgurable capability for the administration of a group of server instances in a cluster.
It uses MySQL Group Replication to replicate data between all servers in a group.
说明:
What Is MySQL InnoDB Cluster?
• Provides a complete and scalable high availability solution for MySQL
– Easy to configure and administer a group of server instances in a cluster
• Uses MySQL Group Replication to replicate data between all servers in the group
– The AdminAPI removes the need to work with group replication directly.
– You work with the AdminAPI via MySQL Shell using your choice of Python or
JavaScript language.
• Manages failover automatically
– If a server in the group goes down, the cluster reconfigures itself.
– It requires at least three servers for the group to be fault tolerant
• Enables clients to connect to the group transparently
– Clients connect to the group via MySQL Router and do not have to know the details
of the individual instances within the group.
How does MySQL Shell (mysqlsh) support the administration of a cluster? (Choose two)
It enables replicated server updates using binary log position and global transaction identifiers (GTIDs).
It manages failover by automatically routing server connections.
It provides scripting capabilities using JavaScript, Python, and SQL commands.
It implements a pluggable architecture and allows developers to create customized plug-ins.
It enables access to MySQL features via APIs
答案:
It provides scripting capabilities using JavaScript, Python, and SQL commands.
It enables access to MySQL features via APIs.
说明:
MySQL Shell (mysqlsh)
• Is an advanced client and code editor for MySQL
• Provides scripting capabilities by using JavaScript, Python, or SQL commands
– You can enter commands interactively or execute them in batches.
– You can switch between languages by entering \js, \py, or \sql, respectively.
• Enables access to MySQL features via APIs
– XDevAPI: Communicate with a MySQL server running the X Plugin to work with both relational
and document data in the MySQL Document Store.
– AdminAPI: Configure and administer a MySQL InnoDB cluster.
• Supports output in tab delimited, table, and JSON (JavaScript Object Notation) formats
• Interacts with a MySQL server via a global Session object
– If using Python and JavaScript, you create the Session object by calling the getSession()
method on the mysqlx module.
– If using SQL, the Session object is created when the client connects.
You have a live cluster with three servers. Executing the dba.getCluster() function returns the Cluster value “cluster”. Which methods must be used, all of which are required, to add a fourth server to the cluster? (Choose three)
cluster.rescan()
cluster.rejoinInstance()
dba.configureLocalInstance()
cluster.addInstance()
cluster.dissolve()
dba.configureInstance()
答案:
cluster.rescan()
cluster.addInstance()
dba.configureInstance()
Which are functions of Group Replication? (Choose two)
assigning replication servers to groups of three to nine servers
in multi-primary mode, enabling group members to certify the order of transactions within the global sequence of transactions
enabling automatic avoidance of “split-brain” situations among group members
in multi-primary mode, enabling automatic election of a new primary when the primary server fails
in single-primary mode, enabling all servers to accept transactions but only the primary decides the order to commit
答案:
assigning replication servers to groups of three to nine servers
in multi-primary mode, enabling group members to certify the order of transactions within the global sequence of transactions
说明:
How Group Replication Works
• Servers belong to a replication group.
– A replication group can contain up to nine servers.
— At least three servers are required to be fault tolerant.
– Group Replication uses global transaction identifiers (GTIDs).
– The group is defined by a UUID.
• Group membership is managed automatically.
– A server that joins or rejoins the group will automatically synchronize with the others.
– Servers can leave and join the group at any time.
• Replication groups operate in one of two modes:
– Single-primary: One server in the group accepts updates.
– Multi-primary: All servers in the group accept updates.
• Changes are replicated to all members of the group.
Examine this mysqlsh statement and output: mysql-js> cluster.checkInstanceState(“root@server4:3314”) … … { "reason": "recoverable", "state": "ok" } What does the output signify?
The instance has not executed any GTID transactions; therefore, it cannot conflict with the GTIDs executed by the cluster.
The instance has more executed GTIDs than the executed GTIDs of the cluster seed instances.
The instance has executed GTIDs, which diverge with the executed GTIDs of the cluster seed instances.
The instance has executed GTIDs, which do not conflict with the executed GTIDs of the cluster seed instances.
答案:
The instance has executed GTIDs, which do not conflict with the executed GTIDs of the cluster seed instances.
说明:
Checking the State of an Instance
• Execute cluster.checkInstanceState(instance) to verify the instance GTID
state in relation to the cluster.
– Analyzes the instance executed GTIDs with the executed/purged GTIDs on the
cluster to determine if the instance is valid for the cluster.
• The output of this method is one of the following:
– OK new: The instance has not executed any GTID transactions; therefore, it cannot
conflict with the GTIDs executed by the cluster.
– OK recoverable: The instance has executed GTIDs, which do not conflict with the
executed GTIDs of the cluster seed instances.
– ERROR diverged: The instance has executed GTIDs, which diverge with the
executed GTIDs of the cluster seed instances.
– ERROR lost_transactions: The instance has more executed GTIDs than the
executed GTIDs of the cluster seed instances.
myCluster is an InnoDB cluster. Examine this mysqlsh statement and output: mysql-js > cluster.status() { "clusterName": "myCluster", "defaultReplicaSet": { "name": "default", "primary": "server2:3312", "status": "OK_NO_TOLERANCE", … What does this status signify? (Choose two)
There are enough members online to form a quorum.
One or more members may be online but their status is not ONLINE or RECOVERING.
One or more members are online but cannot form a quorum.
There is no redundancy in the cluster, and the failure of a member will result in database outage.
There is sufficient redundancy available to tolerate at least one failure.
答案:
There is no redundancy in the cluster, and the failure of a member will result in database outage.
There are enough members online to form a quorum.
说明:
OK_NO_TOLERANCE = 当前服务正常(有 quorum) + 无故障缓冲(单点即崩)。需尽快修复离线节点或扩容!
节点有哪状态
ONLINE – 节点状态正常。
OFFLINE – 实例在运行,但没有加入任何Cluster。
RECOVERING – 实例已加入Cluster,正在同步数据。
ERROR – 同步数据发生异常。
UNREACHABLE – 与其他节点通讯中断,可能是网络问题,可能是节点crash。
MISSING 节点已加入集群,但未启动group replication
集群有哪些状态
OK – 所有节点处于online状态,有冗余节点。
OK_PARTIAL – 有节点不可用,但仍有冗余节点。
OK_NO_TOLERANCE – 有足够的online节点,但没有冗余,例如:两个节点的Cluster,其中一个挂了,集群就不可用了。
NO_QUORUM – 有节点处于online状态,但达不到法定节点数,此状态下Cluster无法写入,只能读取。
UNKNOWN – 不是online或recovering状态,尝试连接其他实例查看状态。
UNAVAILABLE – 组内节点全是offline状态,但实例在运行,可能实例刚重启还没加入Cluster。
No Responses (yet)
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.