On Thu, Sep 09, 2010 at 01:59:02PM +0200, Sebastien Estienne wrote:
> It seens that it is also called  X-Reproxy-URL
> 
> By setting the X-Reproxy-Url header, a backend process tells
> mod_reproxy to serve the response from another location, effectively
> letting the request redirect transparently (and within the same
> request). This can help to reduce load considerably.

There are no plans for doing such a thing. HTTP is not just a URL, it
contains many headers which only the client may decide what to put in.
Haproxy will certainly not invent Host, Accept, Authorization, Cookie,
If-Modified-Since, If-None-Match, nor Accept-encoding to name a few.

In my opinion, this hack can only help misdesigned sites. It will
always prevent the client from caching the real object (while a 302
would have made this possible), and if some HTML or CSS is ever
returned by such a redirect, relative links in it will be wrong,
as well as possible 302 or any path in a set-cookie header.

In the link below, Alexey explains an arguably valid reason to do this,
but as you can see, this has nothing to do with performance, only with
hiding the location from the browser.

> http://kovyrin.net/2010/07/24/nginx-fu-x-accel-redirect-remote/

Still, a signed URL is much more portable and can even work with off-site
servers.

Last, I don't agree with you on the fact that it would "help to reduce
load considerably". If you're talking about the application servers'
load, generating this header is equal to generating a redirect. If you're
talking about the file server's load, it does not change anything for it.
If you're talking about the load balancer, it still has to handle two
connections while the standard redirect could have saved one by making
use of layer4 load balancing for the file server. If you're talking about
the network, well, you're saving one short response (redirect) and one
short request, which are very small compared to the rest of the data,
but since you can't allow the client to cache, the whole data will have
to be completely retransferred every time the client wants it.

As you can see, I can't even identify one positive aspect of this method,
only a lot of downsides and possible issues.

Regards,
Willy


Reply via email to