You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Grant Peel <gp...@thenetnow.com> on 2007/11/26 14:25:40 UTC

[users@httpd] 301 Redirects

Hi all,

I have a client for whom I have added about 500 301 redirects in thier 
VirtualHost container. The server has about 200 VirtualHosts total.

What kind of performance issues would one think all those redirects have on 
the whole (Apache) server?

-Grant 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to check for availability of remote server or services?

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 26, 2007 6:41 PM, Robert Granvin <Ro...@metrostate.edu> wrote:
>
>
> Not sure that's a particularly descriptive subject ...
>
> What we're facing here is a simple situation, but not so clear of a
> solution.  Perhaps this is easy and/or someone can offer me suggestions from
> past experience?
>
> Basically, our primary web server has a link to an important, well used, web
> site that resides on a physically different server (we have root access to
> both, by the way, so configuration changes are possible).
>
> When the remote web server is down/unavailable, we want the link to failover
> to a catch-all page that gives alternate access temporarily to important
> pieces.
>
> The second scenario is that the remote web server itself is up, but the
> application running (jboss in this case) is down or non-responsive.  We want
> to accomplish the same thing.
>
> My guess is that the first one is a lot easier than the second.  :-)  I'm
> not sure if #2 is as easy as creating a custom 404 page.

I guess what you need is a custom 500 page.

eg.
ErrorDocument 500 /falbacksite/index.html

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] How to check for availability of remote server or services?

Posted by Robert Granvin <Ro...@metrostate.edu>.
Not sure that's a particularly descriptive subject ...
 
What we're facing here is a simple situation, but not so clear of a
solution.  Perhaps this is easy and/or someone can offer me suggestions
from past experience?
 
Basically, our primary web server has a link to an important, well
used, web site that resides on a physically different server (we have
root access to both, by the way, so configuration changes are
possible).
 
When the remote web server is down/unavailable, we want the link to
failover to a catch-all page that gives alternate access temporarily to
important pieces.
 
The second scenario is that the remote web server itself is up, but the
application running (jboss in this case) is down or non-responsive.  We
want to accomplish the same thing.
 
My guess is that the first one is a lot easier than the second.  :-) 
I'm not sure if #2 is as easy as creating a custom 404 page.
 
Anyways, really appreciating input and suggestions.
 
 
\\ Robert J. Granvin                                            
Webmaster
 \\ robert.granvin@metrostate.edu                       Metro State
University

Re: [users@httpd] 301 Redirects

Posted by Krist van Besien <kr...@gmail.com>.
On Nov 26, 2007 2:52 PM, Christian Folini <ch...@post.ch> wrote:
> On Mon, Nov 26, 2007 at 08:25:40AM -0500, Grant Peel wrote:
> > I have a client for whom I have added about 500 301 redirects in thier
> > VirtualHost container. The server has about 200 VirtualHosts total.
> >
> > What kind of performance issues would one think all those redirects have on
> > the whole (Apache) server?
>
> apache bench (ab) would tell you.
>
> Otherwise: Think about what is happening on the network level and
> within your server.
>
> For every request, the processing process/thread iterates over up
> to 500 rules. Sometimes it issues a redirect status code back to
> the client who in turn issues a new request.

I had a similar situation, and solved it by using a rewritemap. That
way in stead of going over 500 rules the server just made one lookup
in a hashtable.

Krist


-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 301 Redirects

Posted by Christian Folini <ch...@post.ch>.
On Mon, Nov 26, 2007 at 08:25:40AM -0500, Grant Peel wrote:
> I have a client for whom I have added about 500 301 redirects in thier 
> VirtualHost container. The server has about 200 VirtualHosts total.
> 
> What kind of performance issues would one think all those redirects have on 
> the whole (Apache) server?

apache bench (ab) would tell you.

Otherwise: Think about what is happening on the network level and
within your server.

For every request, the processing process/thread iterates over up
to 500 rules. Sometimes it issues a redirect status code back to
the client who in turn issues a new request.

It is fairly easy to show, that the redirect itself is expensive
when compared to the 500 rules. At least for the individual client.
It's a bit different for the server.

It is also fairly simple to understand, that you can optimise
the order of the rules. Ideally, you decide on the first
line, that either _no_ rule will apply or _one of those 500 rules_
will apply. That way you can branch and do not affect the server
very much and do not have requests, that run over 500 rules
and not a single one applies. 

In the end it boils down to testing in the real world with your
real application.

As a sidenote: If you run ssl, then rewrite rules hardly matter
at all, as the ssl-handshake takes ages compared to a rewrite
rule.

just my 2 cents,

Christian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org