True or False? Assuming the service is running, the health check defined with the service definition below will report that the service is healthy and traffic will be directed to web-server-a for the service named web.

True or False? Assuming the service is running, the health check defined with the service definition below will report that the service is healthy and traffic will be directed to web-server-a for the service named web.

A . false
B. true

Answer: A

Explanation:

In this service definition, the service is being registered on port 80 for the service named web and a node called web-server-a. However, the health check is checking port 8080, which is not the port on which the service running. Therefore, the health check would fail and traffic would not be directed to web-server-a. To fix, you could either update the health check to use port 80, or run the web service on port 8080. https://learn.hashicorp.com/consul/getting-started/services#update-services

A better link to show what the individual parameters mean, including specifying what ID, NAME, and others mean, check out this link here – https://www.consul.io/api-docs/agent/service#parameters-2

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments