12

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

robue-a7119895
  • 816
  • 2
  • 11
  • 31

3 Answers3

25

Definitions are often difficult to understand. I guess you just need some explanation for their use case.

A short explanation is: load balancing is one of the functionalities of reverse proxy, and reverse proxy is one of the softwares that can do load balancing.

And a long explanation is given below.

For example a service of your company has customers in UK and German. Because the policy is different for these two countries, your company has two web servers, uk.myservice.com for UK and de.myservice.com for German, each with different business logic. In addition, your company wants there to be only one unified endpoint, myservice.com for the service. In this case, you need to set up a reverse proxy as the unified endpoint. The proxy takes the url myservice.com, and rewrites the url of incoming requests so that requests from UK(determined by source ip) go to uk.myservice.com and requests from German go to de.myservice.com. From the view of a client from UK, it never knows the response is actually generated from uk.myservice.com.

In this case, the load of request traffic to the service is actually balanced to servers on uk.myservice.com and de.myservice.com as a side effect. So we normally don't call it used as a load balancer, just say it as a reverse proxy.

But lets say if your company uses the same policy for all countries, and has 2 servers, a.myservice.com and b.myservice.com, only for the reason that the work load is to heavy for one server machine. In this case, we normally call the reverse proxy as load balancer to emphasize the reason why it is being used.

ChainLooper
  • 380
  • 3
  • 7
6

Here is the basic definition:

Reverse Proxy is a proxy host, that receives requests from a client, and sends it to one of the servers behind itself. Nginx and apache httpd are commonly used as reverse proxies. These are in the administrative network of the web server that a servers a request.

This is in contrast with a (forward) Proxy, which sits in front of a client, and sends requests on behalf of a client to a web server. As an example, your corporate network address translator is a forward proxy. These are in the administrative network of the client from where the request originates.

Load balancing is a function performed by reverse proxies. The client requests are received by a load balancer, and the load balancer tries to send that request to one of the nodes (hosts) in the server pool, in an attempt to balance the load across various nodes.

Manish Maheshwari
  • 4,045
  • 2
  • 15
  • 25
0

I see both of them as a functionality of a HTTP/Web Server.

Load balancer’s job is to distribute the workload between servers node in a way that makes the best use of it.

Reverse proxy is a interface for external world ,forwarding request to a server node (even when we have a single node) Its other use cases are caching of static content ,compression etc

Maverick
  • 626
  • 6
  • 11