Skip to content

Allow http-check health checks for backends with HTTPS #574

Description

@alexdlukens-canonical

Enhancement Proposal

Currently, http-check health checks are disabled when backends use HTTPS:

@property
def enable_http_check(self) -> bool:
"""Return whether to enable HTTP health checks.
Returns:
bool: True if backend protocol is HTTP, False otherwise.
"""
return self.application_data.protocol == "http"

From a cursory look, it seems like it should be possible to use http-check with https backends:

https://www.haproxy.com/documentation/haproxy-configuration-tutorials/reliability/health-checks/#customize-connect-arguments

Use the connect directive to enable SNI, connect over SSL/TLS, perform health checks over SOCKS4, and choose the protocol, such as HTTP/2 or FastCGI. Here’s an example where health checks are performed using HTTP/2 and SSL:

backend servers
  option httpchk
  http-check connect ssl alpn h2
  http-check send meth HEAD uri /health ver HTTP/2 hdr Host www.test.local
  server srv1 192.168.1.5:443 check

Impact

High (The feature has short-term technical value)

Impact Rationale

Will allow http-check health checks for services that use https to the backend e.g. PS7 Vault, IS Jenkins-aaS, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions