Nginx as LB to redirect/return to upstream server instead of Proxy

anish10dec nginx-forum at
Mon Oct 15 07:08:42 UTC 2018

We want to use Nginx as LB in a way so that Nginx can return 301 or 302
redirect to client instead of Proxying request to backend/upstream servers.

It is required as Server which is configured as LB is having limited
throughput of 1 Gbps while upstream servers are having throughput of 10Gbps

We want users to directly connect to Upstream Server for Data delivery. 
Nginx LB Server to make sure that all upstream are up and functional before
giving 301 or 302 redirect to any of upstream server


Nginx LB Returns Redirected URL to Client 301 or 302 ( That upstream should
be up)

Is this possible by :

return 301 http://$upstream_addr/data/download

Posted at Nginx Forum:,281590,281590#msg-281590

More information about the nginx mailing list