Skip to content

Cluster Configuration Reference

Bondy configuration options controlling cluster formation including automatic peer discovery and performance options.

Listener options

cluster.listen_addrs  :: list(string)
Default = See belowSince v1.0.0-rc.2

Defines a list of ip_address:port this node will use to listen for incoming cluster connections. The value accepts the following input strings:

text
cluster.listen_addrs = 192.168.50.174:18086
cluster.listen_addrs = [192.168.50.174:18086]
cluster.listen_addrs = 192.168.50.174:18086, 192.168.50.180:18086
cluster.listen_addrs = [192.168.50.174:18086, 192.168.50.180:18086]

This option also accepts IP addresses without a port.

text
cluster.listen_addrs = 192.168.50.174
cluster.listen_addrs = [192.168.50.174]

In this cases the port will be the value of the cluster.peer_port option.

If this option is provided, Bondy will ignore cluster.peer_ip and cluster.peer_port but notice that cluster.peer_port might still be required for some discovery strategies used by Peer Discovery e.g. dns discovery which will only discover the peer IP addresses but not the ports in which they are listening.

Default

If this option is missing, the IP Address will defaul to the value of cluster.peer_ip option, unless is also missing, in which case the nodename's (BONDY_ERL_NODENAME environment variable) host part will be used to determine the IP address.

The port will default to the value of cluster.peer_port.

TIP

This options allows multiple values in case you should want to listen on multiple interfaces.

However, normally you will use a single network interface. In that case we recommend disabling this option (by commenting it in your bondy.config file) and setting the BONDY_ERL_NODENAME environment variable using a fully-qualified host name e.g. bondy@bondy1.mycluster.local.

Notice the cluster.peer_port might still be required for other Bondy features. Check the option documentation.

cluster.peer_ip  :: integer
Default = See belowSince v0.8.8

The IP address to use for the peer connection listener when option cluster.listen_addrs has not been defined.

Default

If a value is not defined (and cluster.listen_addrs) was not used, Bondy will attempt to resolve the IP address using the nodename (BONDY_ERL_NODENAME environment variable) by parsing the right the part to the @ character in the nodename, and will default to 127.0.0.1 if it can't.

cluster.peer_port  :: integer
Default = 18086Since v0.8.8

The port number to use for the peer connection listener for the cluster TCP/TLS connections.

This value has two main purposes:

  1. Define the port in which the node will listen for the cluster named channel connections (TCP or TLS) when option cluster.listen_addrs have not been defined.
  2. Define the port in which peer nodes will listen when using a Peer Discovery strategy that does not provide port number e.g. DNS.

TIP

For production environments we recommend setting the BONDY_ERL_NODENAME environment variable using a fully-qualified host name e.g. bondy@bondy1.mycluster.local and always setting the same value for peer_port on all peers.

text
cluster.peer_port = 18086

However, if you want to make use of cluster.listen_addrs to listen to connections on multiple network interfaces, we recommend always setting the same value for peer_port on all peers, and having at least one address in cluster.listen_addrs having the same port value.

text
cluster.listen_addrs = [192.168.50.174:18086]
cluster.peer_port = 18086
cluster.parallelism  :: integer
Default = 1Since v0.8.8
cluster.channels.default.parallelism  :: integer
Default = 1Since v1.0.0

The default channel's parallelism. This channel is used when the other channels are down.

cluster.channels.default.compression  :: flag
Default = offSince v1.0.0

The default channel's compression option. This channel is used when the other channels are down.

cluster.channels.data.parallelism  :: integer
Default = 2Since v1.0.0

The data channel's parallelism.

This channel is used to replicate and synchronise the router's configuration and state data amongst the cluster nodes.

cluster.channels.data.compression  :: flag
Default = offSince v1.0.0

The control_plane channel's compression options.

This channel is used to replicate and synchronise the router's configuration and state data amongst the cluster nodes.

cluster.channels.control_plane.parallelism  :: integer
Default = 1Since v1.0.0

The control plane channel's parallelism.

This channel is used to disseminate cluster membership and control messages.

cluster.channels.control_plane.compression  :: flag
Default = onSince v1.0.0

The control_plane channel's compression options.

This channel is used to disseminate cluster membership and control messages.

cluster.channels.wamp_relay.parallelism  :: integer
Default = 2Since v1.0.0

The wamp_relay channel's parallelism.

This channel is used to route RPC and PubSub requests across the cluster e.g. WAMP.

cluster.channels.wamp_relay.compression  :: flag
Default = offSince v1.0.0

The wamp_relay channel's compression options.

This channel is used to route RPC and PubSub requests across the cluster e.g. WAMP.

cluster.tls.enabled  :: on|off
Default = offSince v0.8.8

If enabled then the cluster connection will be established over TLS (making the remaining TLS options mandatory). Otherwise, it will be established over TCP/IP. The default value is off.

TIP

We recommend enabling this option for production use.

cluster.tls.cacertfile  :: path
Default = '$(platform_etc_dir)/cacert.pem'Since v0.8.8

Default signing authority location for cluster TLS connection.

cluster.tls.certfile  :: path
Default = '$(platform_etc_dir)/cert.pem'Since v0.8.8

Default cert location for cluster TLS connection. The default value is $(platform_etc_dir)/cert.pem.

cluster.tls.keyfile  :: path
Default = '$(platform_etc_dir)/key.pem'Since N/A

Default key location for cluster TLS connection.

Peer Discovery / Automatic Join

cluster.peer_discovery.enabled  :: on|off
Default = offSince N/A

Defines whether Bondy should actively search for peer nodes using a defined strategy.

cluster.peer_discovery.type  :: string
Default = N/ASince N/A

Defines the module responsible for implementing the node discovery strategy. At the moment only options is bondy_peer_discovery_dns_agent.

cluster.peer_discovery.automatic_join  :: on|off
Default = offSince N/A

Defines whether Bondy will automatically join a discovered node forming a cluster.

cluster.peer_discovery.join_retry_interval  :: time_duration_units
Default = 5sSince N/A

Defines the time duration Bondy will wait between automatic join attempts.

cluster.peer_discovery.polling_interval  :: time_duration_units
Default = 10sSince N/A

Defines the time duration Bondy will wait between polling attempts.

cluster.peer_discovery.timeout  :: time_duration_units
Default = 5sSince N/A

Defines the time duration Bondy will wait for a response for a polling attempt.

cluster.peer_discovery.join_retry_interval  :: time_duration_units
Default = 5sSince v1.0.0

The time the agent will wait to initiate the next join attempt. For this to take effect cluster.peer_discovery.automatic_join needs to be on.

cluster.peer_discovery.config.$name  :: string
Default = N/ASince v1.0.0

The configuration for the selected strategy in cluster.peer_discovery.type. Refer to each strategy documentation.

Example: The selected type requires two params keyA and keyB.

cluster.peer_discovery.config.keyA = valueA
cluster.peer_discovery.config.keyB = valueB
cluster.peer_discovery.config.$name.$_  :: string
Default = N/ASince v1.0.0

The configuration for the selected strategy in cluster.peer_discovery.type. Refer to each strategy documentation.

Example: The selected type requires two params keyA and keyB where the latter takes an array of values.

cluster.peer_discovery.config.keyA = value1
cluster.peer_discovery.config.keyB._ = value2
cluster.peer_discovery.config.keyB._ = value3

Topology

cluster.topology  :: fullmesh|p2p
Default = fullmeshSince v1.0.0

WARNING

At the moment the only option is fullmesh.

Membership View Sync

cluster.lazy_tick_period  :: duration_time_units
Default = 1sSince v1.0.0
  • document
cluster.exchange_tick_period  :: duration_time_units
Default = 10sSince v1.0.0

Automatic leave

cluster.automatic_leave  :: on|off
Default = offSince v1.0.0

Defines whether a Bondy node should perform a cluster leave operation automatically when it is being shutdown.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike (CC-BY-SA) 4.0 International license.
Bondy and Leapsight are registered trademarks of Leapsight Technologies Ltd.