-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add health check label to ECS #2421
Conversation
dd327c4
to
76b9555
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx for this PR !
healthcheck/healthcheck.go
Outdated
@@ -148,6 +150,12 @@ func checkHealth(serverURL *url.URL, backend *BackendHealthCheck) bool { | |||
client := http.Client{ | |||
Timeout: backend.requestTimeout, | |||
} | |||
if backend.Options.IgnoreCertificateErrors { | |||
tr := &http.Transport{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be better to use the existing transport with TLS client configuration used for backend instead of add a new option to healthcheck.
https://github.com/containous/traefik/blob/be306d651e999feb50f1f126eb68073d607324f3/server/server.go#L68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I'll pass that through
676aa6e
to
028103d
Compare
@juliens Updated to use the default server roundtripper, thanks for the review! |
028103d
to
0ecc283
Compare
@oldmantaiter Could you fix?
|
62c8b9f
to
0839aba
Compare
@ldez Yep, locally the autogen validation test passes so just debugging why semaphore is not a fan |
0839aba
to
ebd39de
Compare
@ldez - Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Adds support for health checks of ECS containers where you can set the path and interval of the check for a given backend (service) - Partially deals with traefik#1400
ebd39de
to
a9aca46
Compare
Looks like using the default server round tripper in the health check has caused a connection leak. I'm still investigating but with health checks enabled my services start getting a ton of connections. I think this may need to be fixed to keep the client attached to the health check instead of making new requests each time. |
What does this PR do?
the path and interval of the check for a given backend (service)
Motivation
Even though ECS can provide status, it is (IMO) better to also check health from the load balancer to ensure the instance is up and running properly.
More