20161205 17:13——17:30
操作備註:本文檔用於記錄關於nginX學習和實踐|使用中的要點。
負載均衡功能板塊
Using nginx as HTTP load balancer
http://nginx.org/en/docs/http/load_balancing.html
Introduction:
Load balancing across multiple application instances is a commonly used technique for optimizing resource utilization, maximizing throughput, reducing latency, and ensuring fault-tolerant configurations.
It is possible to use nginx as a very efficient HTTP load balancer to distribute traffic to several application servers and to improve performance, scalability and reliability of web applications with nginx.
1.Default load balancing configuration
The simplest configuration for load balancing with nginx may look like the following:
http {
upstream myapp1 {
server srv1.example.com;
server srv2.example.com;
server srv3.example.com;
}
server {
listen 80;
location / {
proxy_pass http://myapp1;
}
}
}