Disable Load Balancing or use FQDN


#1

I’m new to Kong and trying to use it to access an api provider that provides customers with subdomains, but apparently uses the subdomain of the incoming url to route traffic correctly.

As far as I can tell Kong is trying to load balance via DNS and using whatever IP comes up instead of sending the FQDN and therefore the route fails.

I can’t find any options to disable load balancing or forcing Kong to use the FQDN and am dead in the water, please help!

I am able to proxy the API provider in question via Nginx or access it via Postman with no problems so I know it is working via FQDN.

I am using 0.14.1 AWS image.

UPDATE:

I have been able to determine some seemingly strange behavior on this.

If I use Postman and set the Host header to the Upstream, the request is processed correctly by upstream.

If I use the Request Transform Plugin to either add the same host header,or change it, the upstream request fails.

When I look at the difference in the two requests in the log, the ONLY difference is that the successful request, ie the one where Postman sets the header, lists the host header first, and the failed request lists it last.

I have tried different combinations of Replace/Append/Add, with the plugin at the service level and route level with the exact same result.

Same for setting the Route to Preserve Host or not, as long as the Host Header is sent by Postman and appears first in the logs the request succeeds.

I have also tried all the above with an entry in /etc/hosts pointing to the upstream host with no difference.

Using Postman I can use the IP address and set the Host header and access the upstream server directly and it works.

I’ve exhausted by abilities to fix this and baffled as to how to proceed,