NGINX implement reverse proxy load Balancer Server

Source: Internet
Author: User
Tags nginx load balancing

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.