What is “Reverse Proxy” and “Load Balancing” in Nginx / Web server terms?

后端 未结 4 844
遇见更好的自我
遇见更好的自我 2021-02-03 10:01

These are two phrases I hear about very often, mainly associated with Nginx. Can someone give me a laymans defintion?

4条回答
  •  萌比男神i
    2021-02-03 10:41

    In simplest term:

    A reverse proxy accepts a request from a client, forwards it to a server that can fulfill it, and returns the server’s response to the client.

    A load balancer distributes incoming client requests among a group of servers, in each case returning the response from the selected server to the appropriate client.

    But they sound pretty similar, right? Both types of application sit between clients and servers, accepting requests from the former and delivering responses from the latter. No wonder there’s confusion about what’s a reverse proxy vs. load balancer. To help tease them apart, let’s explore when and why they’re typically deployed at a website.


    Load Balancing


    Load balancers are most commonly deployed when a site needs multiple servers because the volume of requests is too much for a single server to handle efficiently. Deploying multiple servers also eliminates a single point of failure, making the website more reliable. Most commonly, the servers all host the same content, and the load balancer’s job is to distribute the workload in a way that makes the best use of each server’s capacity, prevents overload on any server, and results in the fastest possible response to the client.

    Reverse Proxy

    Whereas deploying a load balancer makes sense only when you have multiple servers, it often makes sense to deploy a reverse proxy even with just one web server or application server. You can think of the reverse proxy as a website’s “public face.” Its address is the one advertised for the website, and it sits at the edge of the site’s network to accept requests from web browsers and mobile apps for the content hosted at the website.

    more details...

提交回复
热议问题