IPv6 support in Group Replication

In 8.0.14, we add to Group Replication (GR) the ability to use IPv6 in all of its network-related configuration parameters. This means that now you can take advantage of this technology and “rock” those billion addresses using MySQL Group Replication.

What’s New

When you operate a Group Replication group, some variables use network addresses, mainly:

  • group_replication_local_address;
  • group_replication_ip_whitelist
  • group_replication_group_seeds;
  • group_replication_force_members.

All of the above now support IPv6. Performance Schema tables will also display IPv6 addresses for groups configured that way.

Typical configuration

Now with IPv6, a standard group configuration can look like this:

Besides the obvious change in the usage of IPv6, please note some other details:

  • IPv6 address configuration uses an HTTP IPv6 notation to configure a port number. This is used to distinguish the colons from the address of the ones from the port. IPv4 address will remain untouched;
  • Whitelist CIDR notation can now use the full 128 bits, if used together with an IPv6 address.

Hostname resolution is extended to support IPv6. This means that, if a name is configured to be resolved to an IPv6 address, it will do so. Note that, for compatibility reasons, if you have your name configured for both V4 and V6, GR will use the V4 address.

Forced configuration

The same applies when forcing a configuration. You can now use IPv6 to do it:

The existing restrictions apply, meaning that you cannot set a member outside of the current group’s configuration and you can’t set this variable unless you have lost the majority in the group.

Mixed Configurations

IPv4 support was not dropped. You can mix-and-match IPv4 and IPv6 because we use dual-homed sockets, in which a single socket supports both IPv4 and IPv6 connections. This is useful in rolling upgrade scenarios in which you still need to contact old nodes in order to join a group.

A possible configuration could be:

Whitelist automatically added addresses

In IPv6 we also automatically add addresses to the Whitelist configuration:

  • When ::1 (localhost) is not configured;
  • If GR is configured with AUTOMATIC whitelist, we add IPv6 private addresses, which are:
    • Local-Link: fe80/8
    • Unique Local: fd00::/8

Mixed Groups

In a mixed group scenario, i.e. a group with members using IPv4 and IPv6, we need to take extra care with the Whitelist configuration. Since the group uses both protocols, you need to configure in the Whitelist for both IPv4 and IPv6 physical addresses of each node, regardless of the address configured in group_replication_local_address.

In a node with the following physical addresses:

The configuration could be:

Restrictions in place

In order to ensure correctness when upgrading or downgrading a group, we implemented some basic checks when adding a node to a group that does not have IPv6 implemented. These restrictions will not apply in versions that have IPv6 implemented (8.0.14 and above)

Adding a new node to an old group

This operation will fail when you try to add a new node to an old group with a configured IPv6 group_replication_local_address in the new node. In order to add it, you need to configure the local address with an IPv4 address.

Adding an old node to a new group

This operation will fail if you try to add an old node to a new group if at least one of the group members has an IPv6 address configured. In order to add the node, you need to configure all group members with an IPv4 address.

Conclusion

In 8.0.14, we add to GR the ability to configure a group using IPv6. For more information regarding this feature go and check the official documentation. Make sure to try this new feature and let us know about any feedback you have!

6,858 total views, 2 views today

Leave a Reply