The most efficient cluster size is between three and nine peers. For larger clusters, etcd
will select a subset of instances to participate in order to keep it efficient.
The bigger the cluster, the slower the writing to the cluster becomes, as all of the data needs to be replicated around the cluster peers. To have a cluster well-optimized, it needs to be based on an odd number of peers. It must have a quorum of at least of three peers and prevent a split-brain in the event of network partition.
In our case, we are going to set up a three-peer etcd
cluster. To build a highly available cluster on the cloud (GCE, AWS, Azure, and so on), you should use multiple availability zones in order to decrease the effect of failure in a single domain.
In a general cluster, peers are not recommended to be used for anything except for running an etcd
cluster. But for testing our cluster setup, it will be fine to deploy some fleet
units there.
In later chapters, you...