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

**URL:** <https://www.ruby-forum.com/t/removal-of-server-from-nginx-load-balancer-does-not-reflect-after-nginx-reload/243001>\
**Category:** NGINX\
**Created:** [August 14, 2015, 8:20am UTC](https://www.ruby-forum.com/t/removal-of-server-from-nginx-load-balancer-does-not-reflect-after-nginx-reload/243001 "2015-08-14T08:20:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 14, 2015, 8:20am UTC](https://www.ruby-forum.com/t/removal-of-server-from-nginx-load-balancer-does-not-reflect-after-nginx-reload/243001/1 "2015-08-14T08:20:54Z")

</div>

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](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:

> **[Removal of server from nginx load balancer does not reflect after nginx reload](https://forum.nginx.org/read.php?2,260999,260999#msg-260999)**
>
> 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 {

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 14, 2015, 7:27pm UTC](https://www.ruby-forum.com/t/removal-of-server-from-nginx-load-balancer-does-not-reflect-after-nginx-reload/243001/2 "2015-08-14T19:27:47Z")

</div>

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 removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
