Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I was looking at the setup of reverse proxies, like nginx in front of apache, to reduce load on webservers for serving static content.

For any given URL, our web pages will have different parts static and dynamic. How do reverse proxies know when to serve resources themselves, or pull it from the source web server behind them? Obviously things like images and javascript files are static, but even some of those, like captchas, are dynamically generated. Our drupal sites actually look at the path in the url and serve different content accordingly, taking path elements as arguments.

Does it simply require a lot of configuration on the reverse-proxy side, with the configurator having deep knowledge about which parts of the site are dynamic versus static?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Reverse proxies can distinguish static contents from dynamic ones the same way forward proxies do: using caching informations in the HTTP headers.

HTTP includes some fields specifically to tell browsers (and proxies) what can be cached and for how much time; reverse proxies can (and do) analyze these fields in order to know when cached responses expire.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.