Skip to content
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

Make healthcheck backends protocol configurable #2683

Closed
Miouge1 opened this issue Jan 9, 2018 · 4 comments
Closed

Make healthcheck backends protocol configurable #2683

Miouge1 opened this issue Jan 9, 2018 · 4 comments
Assignees
Labels
area/healthcheck kind/enhancement a new or improved feature. priority/P2 need to be fixed in the future status/5-frozen-due-to-age
Milestone

Comments

@Miouge1
Copy link
Contributor

Miouge1 commented Jan 9, 2018

New feature

What did you do?

[backends]
  [backends.backend1]
    [backends.backend1.healthcheck]
    path = "/health"
    interval = "10s"
    port = 8081

What did you expect to see?

[backends]
  [backends.backend1]
    [backends.backend1.healthcheck]
    path = "/health"
    interval = "10s"
    port = 8081
    proto = "http" # or "https"

What did you see instead?

So such option available.

Output of traefik version:

Version:      v1.4.2
Codename:     roquefort
Go version:   go1.9.2
Built:        2017-11-02_01:47:46PM
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml, provider, platform, ...)?

Application is running over HTTPS but the monitoring port is HTTP only.

@emilevauge
Copy link
Member

@Miouge1 we don't see any use case for this. Why do you need to run the heakthcheck on another port ?

@softkot
Copy link

softkot commented Jan 12, 2018

Here is my usercase for another port: I am running Java GRPC service on port 8443 and it can't be used for healthcheck thus java GRPC does not handle HTTP proto either. The only case for me it to create simple HTTP service within same process and handle healtcheck there.

P.S. Docs says it has port option but it does not works. I have look into the sources and it seems to be true.

P.P.S. There was the pull request that try to match docs with actual behaviour.

@Miouge1
Copy link
Contributor Author

Miouge1 commented Jan 14, 2018

My use case is similar to @softkot's: the application runs on HTTPS (:443) but the health probe in HTTP only (on :8080). That way, :443 is exposed externally by Traefik but :8080 is internal only.

To be noted that the doc says:

For example:

[backends]
  [backends.backend1]
    [backends.backend1.healthcheck]
    path = "/health"
    interval = "10s"

To use a different port for the healthcheck:

[backends]
  [backends.backend1]
    [backends.backend1.healthcheck]
    path = "/health"
    interval = "10s"
    port = 8080

but there is no guarantee that the other port number is running the same protocol (HTTP or HTTPS).

@ldez ldez added kind/enhancement a new or improved feature. priority/P2 need to be fixed in the future and removed contributor/waiting-for-feedback status/0-needs-triage labels Jan 14, 2018
@softkot
Copy link

softkot commented Jan 16, 2018

This issue is somehow related to #1967 when KV storage is used there is no way to use port either.

I think it will be right to set both the protocol, path and port for any case. And have protocol to support native HTTP2 (grpc) checks and set path for some GRPC healthcheck method.

@ldez ldez self-assigned this Jan 16, 2018
@ldez ldez mentioned this issue May 12, 2018
2 tasks
@traefiker traefiker added this to the 1.7 milestone May 14, 2018
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/healthcheck kind/enhancement a new or improved feature. priority/P2 need to be fixed in the future status/5-frozen-due-to-age
Projects
None yet
Development

No branches or pull requests

5 participants