Last Updated: February 25, 2016
·
1.774K
· rishav

Nginx Load Balancing Tip - Marking servers as backup

You can mark servers as backup using the "backup" directive when setting up the upstream. These servers are used when all of the normal upstream servers stop responding to requests.


 upstream backend {
      server 1.0.1.1;
      server 1.0.1.2;
      server 1.0.1.3;
      server 1.0.1.4 backup;
      server 1.0.1.5 backup;
}   </code>
</pre>