Glossary of Postgres cluster terms

Short, plain definitions of the words used around CoyoteDB and Postgres high availability: node, main node, witness, majority, failover, split brain and more.

Cluster

All your nodes together. To your app, a cluster looks like one Postgres database.

Node

One computer running the coyote app as part of a cluster.

Data node

A node that holds a full copy of your database. All data nodes in one cluster must be the same system type.

Main node

The one data node that takes the writes at any moment. The nodes vote on which one it is.

Copy (replica)

A data node that is not the main node. It keeps a live copy of the data and is ready to take over.

Witness

A tiny helper that holds no data and only votes. It gives two data nodes a tie-breaker, so they can switch over automatically. It can run on any system type. See How automatic failover works.

Majority (quorum)

More than half of all the votes. A node can only be the main node with a majority behind it, so there is never more than one.

Failover and switch-over

Moving the main node’s job to another data node. Automatic failover happens on its own when the main node stops (with three data nodes, or two and a witness). In a plain 2-node setup, nothing switches over when the main node stops; while both nodes are up, you can move the main role with coyote switch --to <node>.

Split brain

Two nodes both acting as the main node at once, so the data splits in two. CoyoteDB avoids it: a node that loses touch with the others shuts its database down before another one takes over.

Synchronous replication

Copying each save to a second data node before saying “saved”. See What “saved on two computers” means.

Invite code

A short code, like coyote-7k4q-2xpd, that you get from a node and paste on the next computer so it can join the cluster.

Same system type

The rule that all data nodes in one cluster are all Windows, all Linux, or all Mac with the same chip family. The witness and your apps can be anything.

High availability

A database that keeps answering when one computer stops. See High availability Postgres, in plain words.