Skip to content

Set HTTP status code based on status in health report API #17457

@henrikno

Description

@henrikno

The health report #16056 is a great addition.
However load balancers typically can only hit HTTP(s) and check for their status code, and does not parse their body. They often send a HEAD request. So it's not possible to use it directly from a load balancer.
E.g. https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html

The way Elasticsearch solves it is by having a ?wait_for_status=green parameter. If the status isn't the expected one, it returns a 5xx status.
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions