You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does NetCHASM support http2 (or later) health checks?
It's unclear from my scanning of the documentation whether NetCHASM supports making health checks to servers which support only http2 (i.e. no http/1.1 support).
Current Behavior
Change would be to add http2 support (if it does not exist).
Context
Such support would be useful for checking servers running gRPC services which are http2 based, but do not support http/1.1. We often have a situation now running Java gRPC services where a health check comes in for, say, GET /status.html HTTP/1.1 on the same port as the Java gRPC service. In Java gRPC, this results in an error and a long stack backtrace (see grpc/grpc-java#7692).
As the code is currently written, it is not a configurable option. However, it would be trivial to do so.
You would want to insert the following line:
curl_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
That would replace the current HTTP/S calls using a curl config locked to 1.1.
A better solution would probably be to either request a feature to pass curl options directly (also wouldn't be too difficult todo) or it would be even easier to add a new checktype locked to 1.1. However, from an architectural perspective, it seems better to allow curl options to be passed through the config framework.
Activity
uthiramohan commentedon May 26, 2021
NetCHASM uses the default version of HTTP provided by the libraries.
For example,
curl 7.62.0 and above uses HTTP 2 over TLS (HTTPS)
With versions before that HTTP 1.1 is used
evantorrie commentedon May 26, 2021
Not that I want it, but is there a way to force it to use HTTP 1.1 even when it's running with curl 7.62.0 and above?
juen1jp commentedon May 26, 2021
As the code is currently written, it is not a configurable option. However, it would be trivial to do so.
You would want to insert the following line:
curl_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
here:
https://github.com/yahoo/NetCHASM/blob/master/src/internal/HMWorkHealthCheckCurl.cpp#L234
That would replace the current HTTP/S calls using a curl config locked to 1.1.
A better solution would probably be to either request a feature to pass curl options directly (also wouldn't be too difficult todo) or it would be even easier to add a new checktype locked to 1.1. However, from an architectural perspective, it seems better to allow curl options to be passed through the config framework.