Table of Contents
- 18.1 Group Replication Background
- 18.2 Getting Started
- 18.3 Monitoring Group Replication
- 18.4 Group Replication Operations
- 18.5 Group Replication Security
- 18.6 Group Replication Performance
- 18.7 Upgrading Group Replication
- 18.8 Group Replication System Variables
- 18.9 Requirements and Limitations
- 18.10 Frequently Asked Questions
This chapter explains MySQL Group Replication and how to install, configure and monitor groups. MySQL Group Replication enables you to create elastic, highly-available, fault-tolerant replication topologies.
Groups can operate in a single-primary mode with automatic primary election, where only one server accepts updates at a time. Alternatively, groups can be deployed in multi-primary mode, where all servers can accept updates, even if they are issued concurrently.
There is a built-in group membership service that keeps the view of the group consistent and available for all servers at any given point in time. Servers can leave and join the group and the view is updated accordingly. Sometimes servers can leave the group unexpectedly, in which case the failure detection mechanism detects this and notifies the group that the view has changed. This is all automatic.
Group Replication guarantees that the database service is continuously available. However, it is important to understand that if one of the group members becomes unavailable, the clients connected to that group member must be redirected, or failed over, to a different server in the group, using a connector, load balancer, router, or some form of middleware. Group Replication does not have an inbuilt method to do this. For example, see MySQL Router 8.0.
Group Replication is provided as a plugin to MySQL Server. You can follow the instructions in this chapter to configure the plugin on each of the server instances that you want in the group, start up the group, and monitor and administer the group. An alternative way to deploy a group of MySQL server instances is by using InnoDB Cluster, which uses Group Replication and wraps it in a programmatic environment that enables you to easily work with the server instances in MySQL Shell 8.0 (part of MySQL 8.0). In addition, InnoDB Cluster interfaces seamlessly with MySQL Router and simplifies deploying MySQL with high availability. For instructions to deploy a group using InnoDB Cluster, see Chapter 21, Using MySQL AdminAPI.
The chapter is structured as follows:
- Section 18.1, “Group Replication Background” provides an introduction to groups and how Group Replication works.
- Section 18.2, “Getting Started” explains how to configure multiple MySQL Server instances to create a group.
- Section 18.3, “Monitoring Group Replication” explains how to monitor a group.
- Section 18.4, “Group Replication Operations” explains how to work with a group.
- Section 18.5, “Group Replication Security” explains how to secure a group.
- Section 18.6, “Group Replication Performance” explains how to fine tune performance for a group.
- Section 18.7, “Upgrading Group Replication” explains how to upgrade a group.
- Section 18.8, “Group Replication System Variables” is a reference for the system variables specific to Group Replication.
- Section 18.9, “Requirements and Limitations” explains technical requirements and limitations for Group Replication.
- Section 18.10, “Frequently Asked Questions” provides answers to some technical questions about deploying and operating Group Replication.