Welcome! Log In Create A New Profile

Advanced

Loadbalancer and failover issues

Ajay Sonawane
April 18, 2018 02:18AM
I am using nginx as a reverse proxy for my backend servers. My client is able to communicate to backend servers through proxy ( I have setup correct configuration).
To setup a load balancer I have used upstream directive to define a cluster of backend servers and default method of round robin. My clients are now connecting to backend servers in round robin fashion.

Now I want to see how load balancers handles the failover. To test this, I deliberately stopped one server so all connection will go to second server.

I have used below directive as well.

proxy_next_upstream_error timeout invalid_header http_500 http_502
proxy_connect_timeout 2

The problem I am facing is I get error 502 at client side intermittently. This is when one of the server is down. I was expecting that client will get connected to second server when first server is down. This works for most of time but intermittently I get 502 error.

Let me know if I am missing anything.

Ajay
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Loadbalancer and failover issues

Ajay Sonawane April 18, 2018 02:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 283
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready