You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Darryl Miles <da...@netbauds.net> on 2006/06/17 17:56:26 UTC

mod_proxy_xxxxx last resort fallback redirect ?

I'm interested in your comments (good and bad) on implementing a new 
option to ProxyPass which would make apache perform a redirect when the 
proxy server or balancer cluster is not available.  This minics the same 
functionality of a dedicated hardware load balancer by issuing a HTTP 
redirect response to a holding page ("This service is not available", or 
"We are updating out website").

Can anyone see any reason why this is a bad idea to implement within 
apache, or see any obstacles in my way ?


The last time I looked at the internals of apache it had a sub-request 
facility, I would like to be able to redirect to both external and 
internal pages.  External being a HTTP 3xx response with Location: 
header and would be configured with a absolute url "http://...".  
Internal being a fall through to the configured mapping and content 
handler for the URL just as-if the ProxyPass directive wasn't there, I 
was thinking along the lines of this being configured with a 
"fallthrough:" scheme prefix.  This means it would be possible to use:

DocumentRoot /opt/apache/htdocs
ProxyPass / balancer://group1/ timeout=5 maxattempts=3 
fallback-redirect=fallthrough:/holding.html

Then if the "balancer://group1" cluster fails the document at 
/opt/apache/htdocs/holding.html is served instead.


Request for comments,

Darryl

-- 
Darryl L. Miles



Re: mod_proxy_xxxxx last resort fallback redirect ?

Posted by Nick Kew <ni...@webthing.com>.
On Saturday 17 June 2006 16:56, Darryl Miles wrote:

> Request for comments,

Starting from ErrorDocument, what would you envisage needs
changing to meet your aspirations?

-- 
Nick Kew

Re: mod_proxy_xxxxx last resort fallback redirect ?

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
> DocumentRoot /opt/apache/htdocs
> ProxyPass / balancer://group1/ timeout=5 maxattempts=3 
> fallback-redirect=fallthrough:/holding.html

Would this work?

RewriteCond %{REQUEST_URI} !-U
RewriteRule /.* http://fallback.server/notworking.html

Joost

Re: mod_proxy_xxxxx last resort fallback redirect ?

Posted by Ruediger Pluem <rp...@apache.org>.

On 06/17/2006 05:56 PM, Darryl Miles wrote:

> Internal being a fall through to the configured mapping and content
> handler for the URL just as-if the ProxyPass directive wasn't there, I
> was thinking along the lines of this being configured with a
> "fallthrough:" scheme prefix.  This means it would be possible to use:
> 
> DocumentRoot /opt/apache/htdocs
> ProxyPass / balancer://group1/ timeout=5 maxattempts=3
> fallback-redirect=fallthrough:/holding.html

This already works. Just add the following to your configuration:

<Proxy balancer://group1>
  ErrorDocument 503 /holding.html
</Proxy>

Regards

RĂ¼diger