etcd was built by CoreOS to initially manage server updates in a round-robin fashion rather than all at once. This was to avoid downtime occurring during updates. Over a period of time, the project has been developed with a lot of features and made it a base for storing cluster configuration in Kubernetes.
etcd is a distributed consensus key-value store that uses the industry-standard RAFT algorithm to elect a leader between a cluster of nodes. There is always one leader in a cluster of nodes, with the rest of the nodes being its followers. When a leader dies, the followers participate in leader election and become candidates. Only one of the followers can win as a leader as the leader election is implemented using the RAFT algorithm.
Patroni can write data into etcd and can also read data from etcd. When an application writes directly into the leader node, the application is only said to be successful when the majority of the follower nodes reply...