Nginx load Balancing strategy and direction agent principle

Source: Internet
Author: User
Tags nginx load balancing
Nginx's load balancing strategy can be divided into two categories: built-in policies and extension strategies. Built-in policies include weighted polling and IP hashes, which, by default, are compiled into the Nginx kernel, simply by specifying the parameters in the Nginx configuration. There are many extension strategies, such as fair, universal hash, consistent hash, etc., by default not compiled into the Nginx kernel.

First, we introduce the reverse proxy of nginx. A proxy server is generally classified as a forward proxy (usually directly referred to as a proxy server) and a reverse proxy.

Let's draw a picture so we can understand it.

Forward Proxy: You can imagine the kind of router that we're going to use to surf the Internet. (can be said to be agent of the client)

Reverse proxy: The client's request comes over to the reverse proxy server, and then the reverse proxy server is handed back to the real server in the background. (This is the server-side proxy)

What we are talking about today is the implementation of Nginx's reverse proxy function. At the same time, the reverse proxy can also achieve load balancing function. You can think for yourself.


The above describes the Nginx load balancing strategy and the principle of the direction of the agent, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.