ALTER CLUSTER ZONE
Adds one or more nodes into a zone.
See also: SQL Statements for MariaDB Xpand 6.1
Xpand allows nodes to be grouped into zones to improve fault tolerance, where a zone can be availability zones within the same AWS Region, different server racks, or separate servers in different data centers. Once you have determined your target zone configuration, use
ALTER CLUSTER ZONE to assign nodes of your cluster to a zone.
ALTER CLUSTER nodeid [, nodeid] ... ZONE zone
Assigning a node to a zone allows Xpand to have more options for fault tolerance. By ensuring that replicas are placed across zones, no data is lost if a zone becomes unavailable.
After all nodes are assigned to a zone, verify that there is an equal number of nodes in each zone and that no nodes are assigned to zone 0. Xpand supports configuring a minimum of 3 and a maximum of 5 zones.
sql> SELECT * FROM system.nodeinfo ORDER BY zone;
Changes to zone configurations do not take effect until a group change or
ALTER CLUSTER REFORM . This will cause a group change and an interruption in service. For additional information, see "Zones with MariaDB Xpand".
sql> ALTER CLUSTER REFORM;
If you no longer wish to use zones, simply assign all nodes to zone 0 using
ALTER CLUSTER ... ZONE followed by ALTER CLUSTER REFORM;