Unable to connect to ECE Cluster with Load Balancer

I have Nginx as a LB which sits in front of the ECE proxy.

When I added a wildcard DNS which pointed directly to the ECE proxy IP, I was able to connect to the cluster using the cluster endpoint. The DNS record is:
*.ece.org -> 10.1.2.3, where 10.1.2.3 is the proxy IP)

When a LB sits in front of the proxy, the connection does not work. First, I added a wildcard DNS which points to the LB
*.ece.org -> 10.1.2.99 (where 10.1.2.99 is the IP of the load balancer)

Then, in the nginx load balancer, the conf file is as follows:

upstream ece-proxies{ server  10.1.2.3:9200;}
server{
    listen 80;
    server_name *.ece.org;
    location / {
        proxy_pass  http://ece-proxies/;
}

Is it correct that the LB just points directly to the IP of the proxy machine?

When I entered the proxy machine IP and port directly in the browser, nothing was returned.

You need to have proxy_http_version 1.1; under location /, otherwise looks OK

If adding that didn't work, can you get any debug logging from nginx? My guess would be that it was some hard-to-spot-with-the-eye misconfig in that case

Yes, I added the proxy_http_version 1.1 and proxy_set_header HOST $host lines and the cluster endpoint URL is able to connect via the nginx load balancer now. Thanks for the tip

However, there is a need to remove the port from the URL, otherwise the endpoint does not connect. e.g. http://(clusterID).ece.org can connect but http://(clusterID).ece.org:9200 is not able to connect.

Is this considered correct or is there additional configuration needed?

Isn't that just because of the listen 80 declaration? ie your nginx is configured to listen on 80 and route to 9200? Apologies if I misunderstood!

1 Like

Yes, nginx is listens on port 80 and routes it to 9200. Looks like it is correct. Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.