August 2017
Intermediate to advanced
278 pages
8h 53m
English
Also, it's possible to weight the servers, meaning it will preference upstream servers with a higher weight. If your servers aren't exactly the same, you can use weighting to preference your higher capacity systems so that they receive more requests. Consider this example:
upstream localapp {
server 127.0.0.1:8080 weight=2;
server 127.0.0.1:8081;
server 127.0.0.1:8082;
}
Because we set the first server with a weighted value of 2, it will receive twice as many requests as the others.
Read now
Unlock full access