Skip to content

Can't use HTTP health check in front proxy to vhosted server #2450

@pingles

Description

@pingles

Title: Upstream health checks fail when the upstream doesn't recognise the host cluster_name.

Description:
Currently envoy allows HTTP health checks to be performed against upstreams configured for the cluster. We're trying to use envoy as a load-balancing proxy which is connecting to some nginx processes that sit behind different ELBs. These nginx processes are configured with multiple virtual hosts that don't match the service name (but instead match the address we use).

Config
For example,

  clusters:
  - name: some_service
    type: STRICT_DNS
    health_checks:
      timeout: 5s
      interval: 30s
      unhealthy_threshold: 3
      healthy_threshold: 1
      http_health_check:
        path: "/"
    hosts: 
    - socket_address: { address: "app.elb1.domain", port_value: 443 }
    - socket_address: { address: "app.elb2.domain", port_value: 443 }
    - socket_address: { address: "app.elb3.domain", port_value: 443 }

In this situation I was expecting the health check to be performed having set Host to be the address used (app.elb1.domain).

It's difficult to know whether this is just a total misuse of envoy (sorry if so ;), or whether its a topology that should/could be supported. If so, I'd imagine the health check would need some kind of host_rewrite option so that it'd use the address of one of the configured hosts, or perhaps something like this:

http_health_check:
  path: /
  host: ADDRESS

As I said, not really sure whether this is really an issue or just misplaced expectation :) Let me know if I can help more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    beginnerGood starter issues!enhancementFeature requests. Not bugs or questions.help wantedNeeds help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions