In a microservices architecture where multiple services are deployed, the service discovery client helps the application to find out the services they are dependent on, which can be either through DNS or HTTP. When we talk about service discovery clients one of the most common and famous is Consul by HashiCorp, which we will be spinning up in this recipe.
Spinning up a microservice discovery client
Getting ready...
Verify whether Consul is installed by executing the following command:
$ consul version
Consul v0.8.5
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)