Removal of server from nginx load balancer does not reflect after nginx reload

ryd994 ryd994 at 163.com
Fri Aug 14 17:27:10 UTC 2015


Hi,

Are you using free Nginx or Nginx Plus? Per my memory, server group
reconfigure without restart is a Plus only feature.

On Fri, Aug 14, 2015, 14:20 dhirajpraj at gmail.com <nginx-forum at nginx.us>
wrote:

> Hi,
> I am using nginx 1.8.0 as a load balancer.
>
> Below is the configuration snippet:
>
>         upstream appservers {
>         least_conn;
>         server 10.21.3.123:8083;
>         server 10.21.3.125:8083;
>     }
>
> server {
> listen 443 ssl spdy backlog=2048;
> add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
>
> add_header        Alternate-Protocol  443:npn-spdy/3;
>
> ssl_certificate
> /etc/nginx/click.rummycircle.com/click.rummycircle.com.crt;
> ssl_certificate_key
> /etc/nginx/click.rummycircle.com/click.rummycircle.com.key;
>
> ssl_ciphers
>
> ECDHE-RSA-AES256-SHA384:AES256-SHA256:AES256-SHA256:RC4:HIGH:!MD5:!SSLv2:!ADH:!aNULL:!eNULL:!NULL:!DH:!ADH:!EDH:!AESGCM;
> ssl_prefer_server_ciphers   on;
> ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
>
>         location / {
>                  #  log_format postdata '$remote_addr - $remote_user
> [$time_local] '
>                   #     '"$request" $status $bytes_sent '
>                    #    '"$http_referer" "$http_user_agent"
> "$request_body"';
>                    # access_log /home/deploy/nginx_logs/new_access.log
> postdata;
>                    proxy_set_header Host $http_host;
>                    proxy_set_header X-Real-IP $remote_addr;
>                    proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
>                    proxy_pass http://appservers;
>                    }
>     }
>
> Nginx is balancing the load between our 2 servers: 10.21.3.123 and
> 10.21.3.125. I want to remove one server from the load balancer at runtime
> without any packet loss. So I removed i by changing the configuration like
> below:
>  upstream appservers {
>         least_conn;
>         server 10.21.3.123:8083;
>     }
>
> Then I reloaded nginx: sudo service nginx reload
> I checked with nginx -t that Nginx successfully reloaded.
> However, it still continues to send new requests to the removed server.
> Please assist.
>
>
> My OS details:
> uname -a
> Linux an-lb-01 2.6.32-504.12.2.el6.x86_64 #1 SMP Wed Mar 11 22:03:14 UTC
> 2015 x86_64 x86_64 x86_64 GNU/Linux
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,260999,260999#msg-260999
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150814/648e75d4/attachment.html>


More information about the nginx mailing list