Forward Proxy

Client → Forward Proxy → Server

Reverse Proxy

The proxy can hide server’s info (e.g. Load Balancer, CDN, NGINX). The client doesn’t know the server behind the proxy.

Reverse Proxy: Load Balancer

The load balancer communicates with web servers in the same network through private IPs which is unreachable over the internet for better security

Dispatch Strategy

Round Robin

Dispatch the request to servers in rotation. But when one of the server is slow, that server still get the even amount of traffic.

Round Robin (Weighted)

Dispatch the request to servers in their weight (%) in rotation.

Least Connections

Dispatch the request to the fewest active server.

Location

Dispatch the request to closest server.

Consistent Hashing

Read: Consistent Hashing. The database Sharding (especially NoSQL) is also using this technique to create Shard Key.

Layer 4 Load Balancer