Protection and scale
Although Consul agents can work with services on external nodes, best practices (and best flexibility) recommend having a Consul agent co-resident on the nodes running the connected services. In many enterprises, Consul is connecting thousands of services (or more), which means Consul clusters of thousands, or tens of thousands, of nodes. Certainly, we don't want only three to five server nodes managing a cluster of that size, so let's start with expanding the Consul server cluster.
As we learned in Chapter 2, Architecture – How Does It Work?, bigger is not always better when it comes to the size of your consensus pool. We need at least three servers to obtain a quorum, but as that server count increases, it's going to take much longer for the pool to elect a leader. In order to resolve this, Consul offers the ability to configure Consul server agents as a read replica. When set with this flag, the agent doesn't participate in any...