Skip to content

Question: Support for http2/3 health checks? #14

Open

Description

@evantorrie

Expected Behavior

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).

Activity

  1. uthiramohan commented on May 26, 2021

    @uthiramohan

    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

  2. evantorrie commented on May 26, 2021

    @evantorrie
    Author

    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?

  3. juen1jp commented on May 26, 2021

    @juen1jp
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions