Proxy_pass Directive !!

Francis Daly francis at daoine.org
Sat Jul 19 09:50:36 UTC 2014


On Sat, Jul 19, 2014 at 02:23:49PM +0500, shahzaib shahzaib wrote:

Hi there,

> I am confused about the proxy_pass directive. Suppose, i need to serve an
> mp4 file from Origin server and using proxy_pass directive in Edge server,
> whose resources(I/o,bandwidth,Ram) will be used ? Edge or Origin ?

Everyone's.

> Following is the topology to server mp4 file :-
> 
> client (request mp4 file) --> edge(ip is 1.2.3.4 so don't serve it locally
> and forward it to origin) --> origin (serves the requested mp4 file).

You have "client" (= web browser), which talks to "nginx" (= web server),
which is configured to proxy_pass some requests to "upstream" (= other
web server).

client asks nginx for content, nginx sends content to client. So the
full file goes from nginx to client.

If nginx needs to proxy_pass, then before nginx sends content to client,
nginx asks upstream for content, and upstream sends content to nginx. So
the full file also goes from upstream to nginx.

upstream never talks to client directly, in this topology.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list