Data Directory

This is where each Consul agent stores state. It is required for all agents. The directory should be durable across reboots. This is especially critical for agents that are running in server mode as they persist cluster state in this directory.

The data directory contains raft/peers.json, serf/local.snapshot & serf/remote.snapshot. The raft directory contains a list of known servers of the cluster and serf contains the list of connected servers and clients like alive/not-alive state.

During an outage you can find out the state of your cluster is in by looking through your Serf and Raft peers lists.

raft/peers.json contains currently known Raft peers set (nodes that take part in the quorum and consensus). For a 3-node cluster the known raft/peers.json will look like:

root@server1:~# cat /var/consul/raft/peers.json
["192.168.1.12:8300","192.168.1.11:8300","192.168.1.13:8300"]

serf/*.snapshot: contains record of serf protocol progress and also which events took place over time.

results matching ""

    No results matching ""