Galera Cluster Address

URL's in Galera take a particular format:

<schema>://<cluster_address>[?option1=value1[&option2=value2]]

Schema

  • gcomm - This is the option to use for a working implementation.
  • dummy - Used for running tests and profiling, does not do any actual replication, and all following parameters are ignored.

Cluster address

  • The cluster address shouldn't be empty like gcomm://. This should never be hardcoded into any configuration files.
  • To connect the node to an existing cluster, the cluster address should contain the address of any member of the cluster you want to join.
  • The cluster address can also contain a comma-separated list of multiple members of the cluster. It is good practice to list all possible members of the cluster, for example gcomm:<node1 name or ip>,<node2 name or ip2>,<node3 name or ip>. Alternately if multicast is use put the multicast address instead of the list of nodes. Each member address or multicast address can specify <node name or ip>:<port> if a non-default port is used.

Option list

  • The wsrep_provider_options variable is used to set a list of options. These parameters can also be provided (and overridden) as part of the URL. Unlike options provided in a configuration file, they will not endure, and need to be resubmitted with each connection.

A useful option to set is pc.wait_prim=no to ensure the server will start running even if it can't determine a primary node. This is useful if all members go down at the same time.

Port

By default, gcomm listens on all interfaces. The port is either provided in the cluster address, or will default to 4567 if not set.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.