As there are a lot of moving parts in the solution, it would be best to visualize what we are going to be coding for. As this will be a big step up from our last chapter, we will break down the solution. In the first topic, we will look at the design for our Consul cluster.
In the design, we are going to use four servers: node-01, node-02, node-03, and node-04. We will use node-01 to bootstrap our Consul cluster. We will add the other three nodes to the cluster as servers. They will be able to join the conciseness, vote, and replicate the key/value store. We will set up an IP network that is on the 172.17.8.0/24
network. We will map our container ports to the host ports that sit on the 172.17.8.0/24
network. The following image will show the network flow: