Health check does not send the host header


#1

Multiple sites are on the same IIS machine, all the 80 ports are bound, the host headers are set to different domain name, the upstream server detects invalidation, health http path cannot be found, because the health check does not send the host header. How to solve, please help.

  • Kong version ( $ kong version ) 0.14.1

#2

Have you tried on Kong 1.0? I just tested Kong health checks with my target set to a hostname(rather than ip) and it seems to have set the host header just fine.

-Jeremy


#3

Load balancing and health checks and weights KONG’s features are what I need, and if the target is set to a domain(hostname) name, these features will not be available.

my scene E.g:
Server X:
10.129.8.1:80 WWW.A.COM (site binding ip / port / host name)
10.129.8.1:80 WWW.B.COM

Server Y:
10.129.8.2:80 WWW.A.COM
10.129.8.2:80 WWW.B.COM

Server Z:
10.129.8.3:80 WWW.A.COM
10.129.8.3:80 WWW.B.COM


#4

How to solve the problem?


#5

I think I see what you are saying, and I am just a community member so by no means an expert. You want control to set the host header per each target essentially right(and specify your targets as IP:Port? That is not currently implemented as functionality to my understanding.)

I think I see your reasoning, although its kinda a specific use case, since if you were to set the target as hostname, kongs dns would resolve it to an ip and then you would lose the lb’ing you want with the other 2 servers. I wonder if the request transformation plugin could help force a host header on proxy(but it would not be able to set both your A and B based on the targets… only a static one)