Why etcd?
In order to build our stack, we will need a reliable message-passing layer. Some enterprising students at Stanford University came up with a consensus algorithm, which they named Raft. There's a lot of theory regarding how it works, but the end result is that a key-value pair stored within a Raft-based layer remains internally consistent across all servers and is generally resistant to network partitions and split-brain. Unlike repmgr, which implements the algorithm directly, Patroni makes this a modular component.
The default software Patroni uses for Raft is etcd. This is crucially important because we will be using etcd to store the location of the primary Postgres server. Provided we have a service that can connect to etcd, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access