Welcome! Log In Create A New Profile

Advanced

Re: mod_aclr2

Andrey Belov
January 11, 2012 01:10PM
Martin,

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:

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_temp_path

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.


>
> Regards
>
> M
>
> On Wed, Jan 11, 2012 at 11:54 AM, António P. P. Almeida <appa@perusio.net> wrote:
> On 11 Jan 2012 13h17 WET, defan@nginx.com wrote:
>
> > Hello!
> >
> > 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
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
> --
> 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.
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

mod_aclr2

Andrey Belov January 11, 2012 08:18AM

Re: mod_aclr2

Joe January 11, 2012 08:42AM

Re: mod_aclr2

António P. P. Almeida January 11, 2012 08:56AM

Re: mod_aclr2

Martin Loy January 11, 2012 10:34AM

Re: mod_aclr2

Andrey Belov January 11, 2012 01:10PM

Re: mod_aclr2

Jimmysongo January 12, 2012 08:54AM

Re: mod_aclr2

Martin Loy January 13, 2012 07:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 335
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready