raft_fleet v0.2.0 RaftFleet.Config View Source

RaftFleet defines the following application configs:

  • :balancing_interval

    • Time interval between periodic triggers of workers whose job is to re-balance Raft member processes across the cluster.
    • The actual value used is obtained by Application.get_env(:raft_fleet, :balancing_interval, 60000), i.e. it defaults to 1 minutes.
  • :leader_pid_cache_refresh_interval

    • Interval time in milliseconds of leader pids cached in each nodes’ local ETS tables.
    • The actual value used is obtained by Application.get_env(:raft_fleet, :leader_pid_cache_refresh_interval, 300000), i.e. it defaults to 5 minutes.
  • :node_purge_threshold_failing_members

    • RaftFleet automatically purges unhealthy nodes. To judge whether a node is healthy or not, it uses number of unresponsive Raft members.
    • The actual value used is obtained by Application.get_env(:raft_fleet, :node_purge_threshold_failing_members, 2), i.e. nodes that have more than or equal to 600001 failing Raft members are regarded as “unhealthy”.
  • :node_purge_failure_time_window

    • When a node remains “unhealthy” for longer than this time window, it is removed from the participating nodes (that is, all activated nodes that host consensus members).
    • The actual value used is obtained by Application.get_env(:raft_fleet, :node_purge_failure_time_window, 600000), i.e. it defaults to 10 minutes.
  • :persistence_dir_parent

    • Parent directory of directories to store Raft logs & snapshots. If given, each consensus member process persists its logs and periodic snapshots in Path.join(Application.get_env(:raft_fleet, :persistence_dir_parent), Atom.to_string(consensus_group_name)). See also options for RaftedValue.start_link/2. If not given all processes will run in in-memory mode.

Note that each raft_fleet process uses application configs stored in the local node. If you want to configure the options above you must set them on all nodes in your cluster.

Link to this section Summary

Link to this section Functions

Link to this function balancing_interval() View Source
balancing_interval() :: pos_integer
Link to this function leader_pid_cache_refresh_interval() View Source
leader_pid_cache_refresh_interval() :: pos_integer
Link to this function node_purge_failure_time_window() View Source
node_purge_failure_time_window() :: pos_integer
Link to this function node_purge_threshold_failing_members() View Source
node_purge_threshold_failing_members() :: pos_integer
Link to this function persistence_dir_parent() View Source
persistence_dir_parent() :: nil | Path.t