classy is configured via OTP application environment variables and callbacks.
Type: classy_lib:mfargs/0
A callback that classy executes during startup. It allows business applications to set up other hooks using a more type-safe API.
Type: file:filename()
Default: "."
Directory where persistent data is stored. It should be writable.
Type: pos_integer()
Default: 100
Number of records processed in a single batch when the persistence layer reads the write-ahead log or compacts a table.
Type: pos_integer()
Default: 16
Number of bytes used in random identifiers, such as site IDs and cluster IDs.
WARNING: this value should be sufficiently large to account for the birthday problem. Note that new cluster IDs are created every time a node leaves a cluster, so the number of unique random IDs is not limited to the number of sites.
Type: pos_integer()
Default: 15_000
Unit: ms
classy_boot module can print the boot state of the node to help diagnose problems.
This parameter specifies how often the diagnostics are printed.
NOTE: the message is suppressed when the node is fully booted.
Type: non_neg_integer()
Default: 1_000
Unit: ms
Maximum interval of time that can pass between the membership CRDT server receiving an update and the moment it propagates it to the peers.
Type: non_neg_integer()
Default: 1
Minimum total number of known sites (including the local site)
necessary to advance the run level from single to cluster.
Type: [classy:node_set_name()]
Default: []
List of node set names used to additionally restrict when the node is considered joined to a cluster. Sets from the lists are combined using set intersection operation.
Type: [classy:node_set_name()]
Default: []
List of node set names used to additionally restrict when the node is considered having a quorum. Sets from the lists are combined using set intersection operation.
Type: non_neg_integer() | auto
Default: 1
Minimum number of connected sites (including the local site)
necessary to make quorum decisions and to advance the run level from cluster to quorum.
If set to auto,
then the value is calculated as the majority of n_sites.
Type: pos_integer()
Default: 5m
Unit: ms
The default value is 5 minutes.
When node A joins B, it prevents B from joining other nodes until the procedure is complete. This mechanism is mostly used so the initial cluster formation (when multiple nodes join to each other) happens in an orderly fashion. However, if node A becomes unresponsive while holding the lock, the lock will automatically expire after set time. Tuning this value may be necessary if the join procedure can take a very long time, e.g. due to heavy work done in the hooks.
Type: list()
Default: []
List of classy:join_intent/0 atoms that allow overriding join locks.
When join command is issued with an intent that belongs in the list,
the local node A will proceed to join another node B
even if the third node C is trying to join A.
Type: pos_integer()
Default: 5_000
Unit: ms
2PC coordinator re-sends outcome of a transaction to the participants at this interval.
Type: pos_integer() | infinity
Default: infinity
Unit: s.
Automatically kick sites that have been down longer than this value from the cluster.
Note: to prevent network-isolated nodes from kicking their peers, quorum among the running nodes is required to perform the act.
Type: pos_integer()
Default: 604_800
Unit: s
The default value is 1 week.
Forget information about inactive (kicked) sites after this period of time.
Note: cleanup procedure may lead to the following situation:
Since at step 4 we removed the data about event 2, A will reappear in the cluster.
So forget_after should be set to a fairly large value to make sure it doesn’t cover nodes that can go back online.
Type: classy_discovery_strategy:t/0
Peer discovery method, See Autocluster.
Default: {manual, []}
Type: [classy:node_set_name()]
Default: []
Consider cluster discovery complete when the intersection of the site sets specified by this parameter, with the local site subtracted, contains at least one item.