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

Allow healthcheck on different port for non-EDS cluster types #439

Closed
bobzilladev opened this issue Feb 6, 2017 · 22 comments
Closed

Allow healthcheck on different port for non-EDS cluster types #439

bobzilladev opened this issue Feb 6, 2017 · 22 comments
Assignees
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Milestone

Comments

@bobzilladev
Copy link
Contributor

The http healthcheck will allow a path but not a port, which is problematic for existing Dropwizard-based services which by default to have the healthcheck endpoint on a separate admin port. There are also instances of proxies where a tcp check is being done to check the health of the proxy but the traffic is going over different ports.

Envoy would need a healthcheck_port in the static configuration and the SDS API to support being a drop-in replacement for HAProxy under these conditions.

http://www.dropwizard.io/1.0.6/docs/manual/core.html#health-checks

@mattklein123 mattklein123 added the enhancement Feature requests. Not bugs or questions. label Feb 22, 2017
@mattklein123
Copy link
Member

Please see linked PR for a first attempt at this. Needs cleanup.

@mattklein123 mattklein123 added the help wanted Needs help! label Oct 28, 2017
@mpuncel
Copy link
Contributor

mpuncel commented Mar 20, 2018

I'd like to +1 this feature, we have a few cases where we'd like to be able to health check a port that's different from the "traffic port"

@mpuncel
Copy link
Contributor

mpuncel commented Mar 20, 2018

I looked through the previous PR. It sounds like the idea to add a "health check address" to each endpoint in EDS was uncontroversial but figuring out a clean design for specifying an alternate health check port when using strict or logical DNS (and probably static hosts) was difficult.

Would it be reasonable to add the "health check address" config option to EDS first, and then follow up with the other ways of specifying cluster membership later on?

@mattklein123
Copy link
Member

@mpuncel yes, at this point I think it's reasonable to just make this happen for EDS only which I think would not be too hard. I would add alternate HC port information to https://github.com/envoyproxy/data-plane-api/blob/master/envoy/api/v2/endpoint/endpoint.proto#L19 most likely. If you want to tackle I would do a data-plane-api PR and we can discuss the details there.

@dio
Copy link
Member

dio commented Apr 1, 2018

@mpuncel, if you're not on this, may I try to propose a fix for this case?

@mpuncel
Copy link
Contributor

mpuncel commented Apr 1, 2018

@dio go for it!

@mattklein123 mattklein123 added this to the 1.7.0 milestone Apr 8, 2018
htuch pushed a commit that referenced this issue Apr 16, 2018
…t port (#3007)

This patch adds a way to override endpoint health check port.

Only EDS cluster is affected for now.

Risk Level:

Low. This is an optional feature.
Testing:

Unit test
Docs Changes:
To be updated (unhiding)

Release Notes:
To be updated

Partially remedies #439

API Changes:
To be updated (unhiding)

Signed-off-by: Dhi Aurrahman <[email protected]>
@mattklein123
Copy link
Member

@dio is there any reason this is not fixed by #3007? I noticed you said "partially fixed." It seems fixed to me?

@dio
Copy link
Member

dio commented Apr 16, 2018

@mattklein123 I thought we want to have alternate health check port for all setup, including when using strict or logical DNS (and probably static hosts) as well.

@mattklein123
Copy link
Member

@dio OK fair enough we can keep it open to track.

@dio
Copy link
Member

dio commented Apr 21, 2018

Currently, for STATIC, STRICT_DNS and LOGICAL_DNS, a cluster member (a host of hosts) is defined as a core.Address. In order to accommodate alternative health check port for each host, could we have an alternative type (oneof?) of declaring host? Probably just core.Address + health_check_port just like what we have with endpoint (to allow defining host members as a collection of endpoints instead of core.Address-es). Thoughts?

@mattklein123
Copy link
Member

@dio yes I think we can add oneof and not break wire compatibility. I think what you propose makes sense to me. @htuch @wdyt?

@dio
Copy link
Member

dio commented Apr 23, 2018

If we change https://github.com/envoyproxy/envoy/blob/master/api/envoy/api/v2/cds.proto#L158 to the following:

  message Host {
    oneof host_specifier {
      option (validate.required) = true;

      core.Address address = 1;
      endpoint.Endpoint endpoint = 2;
    }
  }

  repeated Host hosts = 7;

will it break wire compatibility?

Since I guess repeated oneof is not a thing: protocolbuffers/protobuf#2592 (comment)

@mattklein123
Copy link
Member

Yes I think it will break wire compatibility. You may need to add a new repeated hosts field and deprecate the old hosts addresses field or something like that. That is probably a better long term solution.

@stale
Copy link

stale bot commented Jun 28, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Jun 28, 2018
@mattklein123 mattklein123 added the help wanted Needs help! label Jun 28, 2018
@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Jun 28, 2018
@bobzilladev
Copy link
Contributor Author

This is still an important one for our organization, fwiw.

@mattklein123
Copy link
Member

@bobzilladev AFAIK this is implemented already for EDS, just not for non-EDS. Right @dio? Maybe we should change the title.

@mattklein123 mattklein123 changed the title Allow healthcheck on different port Allow healthcheck on different port for non-EDS cluster types Jun 28, 2018
@htuch
Copy link
Member

htuch commented Jun 29, 2018

@mattklein123 do we even need this for non-EDS, given that we can embed ClusterLoadAssignment in Cluster now?

@mattklein123
Copy link
Member

@htuch AFAIK implementation of that was never finished, right? I think just the config was added. @dio ?

@dio
Copy link
Member

dio commented Jun 30, 2018

@mattklein123 yes for EDS it is there.

While for the ClusterLoadAssignment inside Cluster, the config is added #3504.

Sorry for the delay in the implementation. I'll start again next week.

@dio
Copy link
Member

dio commented Jul 4, 2018

Update: #3783 is part of this effort.

@dio
Copy link
Member

dio commented Jul 16, 2018

Update. I have submitted: #3864 to fix this.

htuch pushed a commit that referenced this issue Jul 24, 2018
This patch implements load_assigment field in CDS' Cluster.
This change specifically adds the implementation of the new load_assigment field
for clusters with discovery-type: STATIC, STRICT_DNS and LOGICAL_DNS.

While adding this load_assigment field implementation to Cluster,
this patch also allows specifying optional (active) health check config per specified upstream host.

Risk Level: medium
Testing: unit tests
Docs Changes:

This unhides docs for endpoint health check config
Release Notes: N/A

Fixes #439

Signed-off-by: Dhi Aurrahman <[email protected]>
rshriram pushed a commit to rshriram/envoy that referenced this issue Oct 30, 2018
* Cancel check call on destroy
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this issue Jan 23, 2021
htuch pushed a commit that referenced this issue Feb 22, 2021
This is an supplement for this issue #439

Risk Level: Low
Testing: unit test

Signed-off-by: Tony Han <[email protected]>
@amaximus
Copy link

Does this work for non-xDS clusters (e.g. static and/or strict_dns)?
If so, from which envoy version?

jpsim pushed a commit that referenced this issue Nov 28, 2022
Description: fixing some formatting issues from #431
Risk Level: low

Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: JP Simard <[email protected]>
jpsim pushed a commit that referenced this issue Nov 29, 2022
Description: fixing some formatting issues from #431
Risk Level: low

Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: JP Simard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants