The difference between Nginx load balancing and counter-selection agent?
A: I think there is no difference, one is called reverse proxy, more than one is called load balancing, they are used together
Second, the Nginx load balancing principle
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/84/0B/wKiom1eEXQmxD3X8AAJFEphKtCY549.png "title=" lb.png "alt=" Wkiom1eexqmxd3x8aajfephktcy549.png "/>
Third, configure the Nginx load balancer
Modify Nginx.conf
http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; upstream backend { (Backend: cluster module) server 172.16.1.7:80 weight=1; (address pool) server 172.16.1.8:80 weight=1; (address pool) } server { listen 80; server_name blog.etiantian.org; location / { proxy_pass http://backend; (Call the cluster module) proxy_set_header host $ host; (with host header request back-end cluster) } } server { listen 80; server_name bbs.etiantian.org; location / { proxy_pass http://backend; proxy_set_header Host $host; } }server { listen 80; server_name www.etiantian.org; location / { Proxy_pass http://backend; proxy_set_ header host $host; } }}
This article from the "21 kinds of hesitation" blog, declined reprint!
NGINX implement reverse proxy load Balancer Server