|From:||Andrey Belov (def...@nginx.com)|
|Date:||Jan 11, 2012 10:08:58 am|
On Jan 11, 2012, at 7:31 PM, Martin Loy wrote:
Would you explain the main difference between using your module and using nginx
as a reverse proxy and caching static content ?
In some situations, mod_aclr2 helps to avoid excessive disk I/O, especially for big static responses.
When nginx is used as a local reverse proxy and proxy_buffering is enabled, every upstream reponse which can not fit into proxy buffers may be temporarily saved on disk:
For example, we have to process the request for 700mb video file, without mod_aclr2:
1) nginx sends the request to apache 2) apache sends 700mb file back to nginx 3) nginx saves received file on disk (proxy_temp_path) and starts sending it back to the client
and with mod_aclr2:
1) nginx sends the request to apache 2) apache sends a few bytes header with X-Accel-Redirect back to nginx 3) nginx starts sending the file directly from disk
You save your time and your disk at step #2.
Of course, you also may use proxy_cache along with mod_aclr2, but if your disks are fast enough, probably you won't need to do any caching at all.
Hope this helps.
Ever wondered how to set up NGINX as a local proxy for Apache 2.x with minimum efforts?
Nice work Andrey. Opens up Nginx as a possibility for shared hosting (keep using .htaccess) and voids any resistance people might have trying Nginx out. It's sooo easy now :)
Thanks, --- appa
Nunca hubo un amigo que hiciese un favor a un enano, ni un enemigo que le
hiciese un mal, que no se viese recompensado por entero.