I'm currently trying to setup a load balancer for a bunch of download mirrors. While reading into this subject I saw Nginx lends itself perfectly as a load balancer, great! But when looking at the different configurations, I got kind of confused.
One can decide to redirect or proxy to the back-end servers. Redirect is pretty clear, you tell the client to go somewhere else instead and the request is passed on and handled, the load balancer is out of the picture.
However, if you choose to use a proxy, doesn't that basically cripple the whole idea of having multiple download mirrors running? Given nginx will forward the request to the backend server, download the file and pass that on to the client?
So to visualize how I think it works (Stream of packets):
Redirect: Client => Load Balancer => Backend => Client
Proxy: Client => Load Balancer => Backend => Load Balancer => Client
Or will the proxy do some magic and tell the client to actually connect to the backend to download his file?
In case proxying indeed kind of defeats the purpose of having multiple download mirrors in order get more throughput, is redirect the only alternative?
EDIT: Or am I confusing the workings of a proxy with that of a rewrite? Does a proxy actually pass on the request like a redirect does while still using the same URL?