High concurrency large flow of topics --- 11 Web server load balancing

High concurrency large flow of topics --- 11 Web server load balancing

A summary

Sentence summary:

Nginx recommended seven (application layer) load balancing to achieve: it is quite simple to configure
{HTTP 
    upstream cluster { 
        Server srv1; 
        Server SRV2; 
        Server srv3; 
    } 
    Server { 
        the listen 80 ; 
        LOCATION / { 
            proxy_pass HTTP : // Cluster; # invoke content above the upstream cluster 
        } 
    } 
}

 

1, seven (the application layer) load balancing and describes how to achieve?

Seven represents the application layer: seven (application layer) load balancing based on application layer load balancing URL and other information
Nginx's proxy: Nginx proxy is that it's a very powerful capability to enable a Layer 7 load balancing

 

2, seven (the application layer) load balancing advantage?

Simple and flexible configuration; powerful, high performance, stable operation
It can automatically remove the back-end server is not working properly
Upload files using asynchronous mode
Supports multiple assignment policy, you can assign a weight, flexible allocation

 

3, Nginx load balancing strategy?

Built-in policy: IP Hash, weighted round robin: install nginx time has hit kernel
Expansion strategy: fair policy, universal hash, consistency hash: we need to install their own extensions

 

4, weighted round robin load balancing strategy Nginx built-in strategy is like?

To the high weight of the machine: First of all requests are distributed to the high weight of the machine, until the weight of the machine down to lower than other machines, it began to be given to the request under a high weight machine
Cleanup down out of the machine: When all the back-end machines is down, Nginx will immediately flag will be cleared of all the machines to the initial state in order to avoid the status of all the machines are in the timeout

 

5, IP Hash Nginx load balancing strategies built-in strategy is like?

And polling policies like: Nginx another built-in load balancing policies, procedures, and polling is very similar, but some of these changes algorithms and specific strategies
Disguised polling algorithms: IP Hash algorithm is a disguised form of polling algorithm

 

6, Nginx load balancing expand fair policy strategy is like?

The response time of the back-end servers [] determine the load condition of the machine to choose the lightest load shunt

 

7, Nginx load balancing expansion strategy of Universal Hash, Hash policy consistency is what?

Universal hash is relatively simple, you can [to Nginx is a built-in variable hash key]
[Nginx consistency hash using the built-in consistency hash ring], support memcache

 

8, seven load balancing Nginx configuration to achieve enlightenment?

|||-begin

{HTTP 
    upstream cluster { 
        Server srv1; 
        Server SRV2; 
        Server srv3; 
    } 
    Server { 
        the listen 80 ; 
        LOCATION / { 
            proxy_pass HTTP : // Cluster; # invoke content above the upstream cluster 
        } 
    } 
}

|||-end

Nginx recommended seven (application layer) load balancing to achieve: it is quite simple to configure

 

9, how to achieve load balancing four?

Destination address and port + server selection method: by packet destination address and port, plus the server load balancing device selection mode is set, the final decision to select the internal server
NAT, DR and TUN: LVS achieve server load balancing cluster in three ways, NAT, DR and TUN

 

 

 

 

Second, content in summary

 

 

 

 

Reproduced in: https: //www.cnblogs.com/Renyi-Fan/p/11054936.html

Guess you like

Origin blog.csdn.net/weixin_33755649/article/details/93572346