Understanding MySQL Group Replication Communication Protocol and New UDF Functions in 8.0.16
The article explains MySQL Group Replication 8.0.16's new segmented communication protocol, version‑compatibility rules for adding members, and introduces two UDFs that allow administrators to set and query the protocol version to maintain high‑availability across mixed‑version clusters.
Background
In the previous post we introduced that MySQL Group Replication 8.0.16 supports information fragmentation to improve large‑transaction handling. To use this feature, every member of the replication group must run version 8.0.16 or higher because older protocol versions do not support it.
MySQL 8.0.16 introduces a new "segmented protocol" in addition to the older "compressed protocol".
If multiple members want to join a replication group, the following protocol‑matching rules apply:
When the existing group members and the new member have the same version, the join succeeds.
A lower‑version member attempting to join a higher‑version group is expelled and the join fails.
A higher‑version member attempting to join a lower‑version group can join alone, but multiple higher‑version members cannot join together.
Examples:
A MySQL Server 8.0.16 instance can successfully join a group that uses communication‑protocol version 5.7.24.
A MySQL Server 5.7.24 instance cannot join a group that uses communication‑protocol version 8.0.16.
Two MySQL Server 8.0.16 instances cannot simultaneously join a group that uses communication‑protocol version 5.7.24.
Two MySQL Server 8.0.16 instances can simultaneously join a group that uses communication‑protocol version 8.0.16.
New UDFs
To make it easier for higher‑version groups to include lower‑version members, MySQL 8.0.16 adds two User‑Defined Functions (UDFs).
You can manage the group communication protocol with the following commands:
1. group_replication_set_communication_protocol(new_protocol)
Sets the group replication communication‑protocol version.
SELECT group_replication_set_communication_protocol("8.0.15");The new_protocol must be less than or equal to the version of every member in the group. The format is major.minor.patch (e.g., 8.0.15 ).
2. group_replication_get_communication_protocol()
Retrieves the MySQL version of the oldest member in the replication group.
SELECT group_replication_get_communication_protocol(); +------------------------------------------------+
| group_replication_get_communication_protocol() |
+------------------------------------------------+
| 5.7.14 |
+------------------------------------------------+The returned version may differ from the value set, but the protocol used by the group remains the same.
Both UDFs are effective for all group members and can be executed on either the primary or replica hosts.
Conclusion
To use the information‑fragmentation feature, it is recommended to upgrade all group replication members to 8.0.16.
If only some members are upgraded, the two new UDFs can be used to keep the protocol consistent across mixed‑version members.
References
Group replication protocol documentation: https://dev.mysql.com/doc/refman/8.0/en/group-replication-communication-protocol.html
Related blog post: https://mysqlhighavailability.com/configuring-the-communication-protocol-in-group-replication/
Community Notice
Join the 6.15 Distributed Middleware DBLE user meetup at the Aikexing Headquarters R&D Center for technical Q&A.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.