hashicorp / hashicorp/consul

Health checks from Terminating Gateway to External Services

Open
#8,197 0 comments 3 reactions 0 assignees View on GitHub
theme/connect theme/terminating-gw
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

#### Feature Description

Currently Connect services will query for an external service using the `/health/connect/:service` endpoint. If the service is fronted by a terminating gateway, the endpoint will return healthy instances of said gateway. However, that endpoint has no sense for whether the external service exists or is healthy. This means that if the service is unhealthy then we would still send the request to its terminating gateway when the gateway is healthy.

For failovers in service-resolvers this would be an issue because the cluster wouldn't be marked as unhealthy in the load assignment if the gateway is healthy (See #6259).

A potential solution is to have the agent for a terminating gateway act kind of like ESM. Checks would be defined on the external service, the gateway's agent would scrape that check, run them, and also register that check agains the terminating gateway.

This would require changing how checks are currently interpreted. Consul's set up such that if any check for a service is failing, then the service is considered `critical`. For these external service checks we would want that external service to be considered failing in `/health/connect/:external-service` queries if any of its checks are failing. However, we do not want the gateway itself to be considered failing in `/health/service/:gateway` queries, nor do we want other external services linked to the gateway to be considered failing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.