Skip to content
BENIBIX Learn

Load Balancer vs Reverse Proxy

People think a load balancer and a reverse proxy are two different kinds of server, and very often they are one and the same. A reverse proxy takes each request and passes it to a server behind it. A load balancer is a reverse proxy that shares the work across many servers. Nginx can do both jobs. With just one app server behind it, there is no load to share.

Infrastructure🌐 Networking

Load Balancer

A box that hands out web traffic to many servers. Users see one address.

A load balancer spreads incoming requests across a group of servers. Users reach one address, and the balancer picks a server for each request. It can take turns, or pick the server with the least work. It runs health checks and stops sending traffic to a server that fails. So you can add a server, or lose one, and users do not notice.

Example
Lucy's shop runs on three servers behind a load balancer. One server crashes at lunch, and the balancer sends its traffic to the other two.
Why it matters
It is how a site grows past one server, and how it stays up when one breaks.
Full entry
Infrastructure🌍 Web Serving & Nginx

Reverse Proxy

A server in front of your apps. It takes each request and passes it on.

A reverse proxy is a server that sits in front of your app servers and takes every request first. It passes each one on to a server behind it and sends the answer back. Visitors never talk to the app servers directly. On the way, it can handle TLS, cache answers, block bad traffic and share the load.

Example
Lucy's shop app listens only on localhost port 3000. Nginx takes HTTPS requests on port 443 and passes them to the app.
Why it matters
It gives many apps one safe front door. TLS, logs and limits are set up in one place.
Full entry

In one line

Load Balancer
A box that hands out web traffic to many servers. Users see one address.
Reverse Proxy
A server in front of your apps. It takes each request and passes it on.