Allow healthchecks to be performed on another port#560
Allow healthchecks to be performed on another port#560daedric wants to merge 1 commit intoenvoyproxy:masterfrom
Conversation
|
We use this PR in production to perform healthchecks against http services, alongside grpc services on the same upstream. |
|
Hi, Thanks a lot for working on this. I linked in the tracking issue for this feature. I would like to propose a different set of interfaces for implementing this. I'm hoping it won't be too much work to implement the proposal. My main issue with this approach is that it puts port into a whole lot of places which might not have any port (for example pipe/uds). Here is what I would do:
How we actually get the alternate host address for HC port now becomes cluster specific (DNS, static, SDS, etc.). We don't necessarily have to implement them all at the same time. What cluster types are you using? Thanks, |
|
I'll let @jbdalido answer to the question on the type of cluster. Cheers |
Actually I was thinking of this, in case of a dns entry resolving to several host it leads to an ambiguity. Let's take for instance a domain name |
|
I think there are a few options here depending on the cluster type that you need this to work for:
|
|
Hi, Cheers |
|
@daedric OK, I'm still not 100% crazy about the "alt_hc_port" option in the sense that we don't need it for static or SDS clusters (it can be a property of the returned host). I'm really leaning towards having it be part of the "URL" somehow. @lyft/network-team @rshriram @htuch opinions on the config for ^? |
|
It might be nice if we can keep URLs as valid URIs, to allow using standard parsing functions and interoperate with libraries that generate them in config pipelines. It's probably not a strong requirement though and might make it more concise in this case (and with srv). I don't see the issue with alt_hc_port though if it's optional - it's the same as just omitting the second : fragment from the URL. |
|
OK if we go with alt_hc_port though we will have to reconcile w/ SDS and static where you might not want the port to be the same for each host. In that case we almost definitely want it to be part of each host definition, so I guess we can only look at it in DNS cases. I don't feel that strongly, so I'm fine either way. |
|
I agree with @htuch that it would be better to keep the URL as a valid URI. Makes it much easier for all the config gens to generate envoy config. Besides, Here is a random thought: why not use a URI in the health check as well, instead of having a separate port field? [May be it has already been discussed in this thread]. For example, user could specify either a PATH or a URI field for the health check (not both). For SDS/static, there would be no change. For strict_dns/logical_dns, when a separate port is desired, people could specify it as a complete URL (there will be duplication of hostname, but thats better than a port number that stands out in the config). It won't pollute the config with a separate port that needs to be kept track of. As a nice side effect, we could even do health check with a different host. E.g., strict/logical dns points to foo.bar.com external service, while the health check service goes to uptime.com:1234/check/foo.bar.com. In future, if we move to subsets or global health check service, we could reuse the same machinery [I am just thinking out aloud here, havent thought through fully yet]. |
|
Going to close this for now. Please reopen if/when you are ready to clean this up. I also noted that this PR is ongoing in the primary issue. |
|
Following up on this from the original issue, having a full URL doesn't make much sense in the usual case, which is you want "the same one as the connection is going to" with perhaps different protocol and port. How would that be expressed this this proposed reworking? |
Signed-off-by: Pengyuan Bian <bianpengyuan@google.com>
Removing E2E gRPC testing infrastructure since we are unable to communicate with a vanilla gRPC service due to: envoyproxy/envoy-mobile#502 Signed-off-by: Alan Chiu <achiu@lyft.com> Description: remove unused tests for grpc and protos Risk Level: low Testing: none Docs Changes: n/a Release Notes: n/a [Optional Fixes #Issue] [Optional Deprecated:] Signed-off-by: JP Simard <jp@jpsim.com>
Removing E2E gRPC testing infrastructure since we are unable to communicate with a vanilla gRPC service due to: envoyproxy/envoy-mobile#502 Signed-off-by: Alan Chiu <achiu@lyft.com> Description: remove unused tests for grpc and protos Risk Level: low Testing: none Docs Changes: n/a Release Notes: n/a [Optional Fixes #Issue] [Optional Deprecated:] Signed-off-by: JP Simard <jp@jpsim.com>
Please find a pull request to allow one to configure a specific port for the health checks.
fixes #439