-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Can't use HTTP health check in front proxy to vhosted server #2450
Description
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: ADDRESSAs I said, not really sure whether this is really an issue or just misplaced expectation :) Let me know if I can help more.