You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Carlos <zo...@ig.com.br> on 2004/04/16 16:12:59 UTC
[users@httpd] Load Balancing with mod_rewrite
Hi!!
We are trying to use an Apache Server as a Reverse Proxy to two IIS
Servers, with Load Balancing capabilities. So far we have managed to get
it working, thanks to the tips in
http://www.engelschall.com/pw/apache/rewriteguide/, but, at this point, if
one of the IIS servers is down, the Apache Server doesn´t know about that,
and gives a 404 page to the browsers that get "rewrited" to the server that
is down.
What can be done to solve this... If one of the servers are down, then
everyone gets "rewrited" to the server that is up?
Regards,
Carlos.
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Michael Gale <mi...@bluesuperman.com>.
Hello,
The LVS supports three methods of load-balancing, one of which is using
NAT and the internal machines can be any operating system. I am not to
sure about the other two methods and OS restrictions.
You also would not need a apache server, I don't think anyways.
Michael.
On Mon, 19 Apr 2004 10:08:51 -0300
Carlos <zo...@ig.com.br> wrote:
> HI Michael!!
>
> Thanks for the reply!!
>
> I am not very familiar with the LVS project, but I thought it only
> worked for Linux servers.. Can I use it to do load balance two IIS
> servers (W2K) through an Apache Server (Linux)?
>
> Another question, a little off topic. For load balancing purposes,
> among Apache servers only, wouldn´t it be better to do it with
> mod_backhand, instead of LVS?
>
> Regards,
> Carlos.
>
> At 14:09 18/4/2004, you wrote:
> >Hello,
> >
> > You should look at LVS (Linux Virtual Server) it is designed
> > to be a
> >load balancer. Could put a apache box in front of the LVS or on the
> >same box if you still wanted to.
> >
> >Michael.
> >
> >
> >On Fri, 16 Apr 2004 11:12:59 -0300
> >Carlos <zo...@ig.com.br> wrote:
> >
> > > Hi!!
> > >
> > > We are trying to use an Apache Server as a Reverse Proxy to two
> > > IIS Servers, with Load Balancing capabilities. So far we have
> > > managed to get it working, thanks to the tips in
> > > http://www.engelschall.com/pw/apache/rewriteguide/, but, at this
> > > point, if one of the IIS servers is down, the Apache Server
> > > doesn´t know about that, and gives a 404 page to the browsers that
> > > get"rewrited" to the server that is down.
> > >
> > > What can be done to solve this... If one of the servers are down,
> > > then
> > >
> > > everyone gets "rewrited" to the server that is up?
> > >
> > > Regards,
> > > Carlos.
> > >
> > >
> > > -----------------------------------------------------------------
> > > ---- 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
> > >
> >
> >
> >--
> >Hand over the Slackware CD's and back AWAY from the computer, your
> >geek rights have been revoked !!!
> >
> >Michael Gale
> >Slackware user :)
> >Bluesuperman.com
> >
> >
> >--
> >Hand over the Slackware CD's and back AWAY from the computer, your
> >geek rights have been revoked !!!
> >
> >Michael Gale
> >Slackware user :)
> >Bluesuperman.com
> >
> >---------------------------------------------------------------------
> >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
>
>
> ---------------------------------------------------------------------
> 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
>
--
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!
Michael Gale
Slackware user :)
Bluesuperman.com
--
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!
Michael Gale
Slackware user :)
Bluesuperman.com
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Carlos <zo...@ig.com.br>.
HI Michael!!
Thanks for the reply!!
I am not very familiar with the LVS project, but I thought it only worked
for Linux servers.. Can I use it to do load balance two IIS servers (W2K)
through an Apache Server (Linux)?
Another question, a little off topic. For load balancing purposes, among
Apache servers only, wouldn´t it be better to do it with mod_backhand,
instead of LVS?
Regards,
Carlos.
At 14:09 18/4/2004, you wrote:
>Hello,
>
> You should look at LVS (Linux Virtual Server) it is designed to be a
>load balancer. Could put a apache box in front of the LVS or on the same
>box if you still wanted to.
>
>Michael.
>
>
>On Fri, 16 Apr 2004 11:12:59 -0300
>Carlos <zo...@ig.com.br> wrote:
>
> > Hi!!
> >
> > We are trying to use an Apache Server as a Reverse Proxy to two IIS
> > Servers, with Load Balancing capabilities. So far we have managed to
> > get it working, thanks to the tips in
> > http://www.engelschall.com/pw/apache/rewriteguide/, but, at this
> > point, if one of the IIS servers is down, the Apache Server doesn´t
> > know about that, and gives a 404 page to the browsers that get
> > "rewrited" to the server that is down.
> >
> > What can be done to solve this... If one of the servers are down, then
> >
> > everyone gets "rewrited" to the server that is up?
> >
> > Regards,
> > Carlos.
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
>
>
>--
>Hand over the Slackware CD's and back AWAY from the computer, your geek
>rights have been revoked !!!
>
>Michael Gale
>Slackware user :)
>Bluesuperman.com
>
>
>--
>Hand over the Slackware CD's and back AWAY from the computer, your geek
>rights have been revoked !!!
>
>Michael Gale
>Slackware user :)
>Bluesuperman.com
>
>---------------------------------------------------------------------
>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
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Michael Gale <mi...@bluesuperman.com>.
Hello,
You should look at LVS (Linux Virtual Server) it is designed to be a
load balancer. Could put a apache box in front of the LVS or on the same
box if you still wanted to.
Michael.
On Fri, 16 Apr 2004 11:12:59 -0300
Carlos <zo...@ig.com.br> wrote:
> Hi!!
>
> We are trying to use an Apache Server as a Reverse Proxy to two IIS
> Servers, with Load Balancing capabilities. So far we have managed to
> get it working, thanks to the tips in
> http://www.engelschall.com/pw/apache/rewriteguide/, but, at this
> point, if one of the IIS servers is down, the Apache Server doesn´t
> know about that, and gives a 404 page to the browsers that get
> "rewrited" to the server that is down.
>
> What can be done to solve this... If one of the servers are down, then
>
> everyone gets "rewrited" to the server that is up?
>
> Regards,
> Carlos.
>
>
> ---------------------------------------------------------------------
> 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
>
--
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!
Michael Gale
Slackware user :)
Bluesuperman.com
--
Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!
Michael Gale
Slackware user :)
Bluesuperman.com
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Carlos <zo...@ig.com.br>.
Hi!
Your message suggests that Load Balancing in a reverse proxy scenario could
be done by mod_proxy, although lacking the ability to check for the backend
servers status. Is that right? Should I do load balancing with
mod_rewrite, or mod_proxy, or another method better than these two?
Thanks again,
Carlos.
At 18:27 16/4/2004, you wrote:
>On Fri, 16 Apr 2004, Joshua Slive wrote:
>
> > > > We are trying to use an Apache Server as a Reverse Proxy to two IIS
> > (chop)
> > mod_rewrite has no internal way to check for dead servers.
>
>In the context of a reverse proxy, it could possibly make sense to
>manage connections to the backend as a connection pool (apr_reslist).
>
>Apart from possible performance improvements, this would enable a
>reverse proxy to reroute away from any dead backend very nicely,
>simply by invalidating any connection that is no longer functional.
>
>I've contemplated hacking mod_proxy to enable this. It's unlikely
>to hit the top of my priorities list anytime soon (unless someone
>pays), but it's a possibility.
>
>--
>Nick Kew
>
>Nick's manifesto: http://www.htmlhelp.com/~nick/
>
>
>---------------------------------------------------------------------
>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
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Nick Kew <ni...@webthing.com>.
On Fri, 16 Apr 2004, Joshua Slive wrote:
> > > We are trying to use an Apache Server as a Reverse Proxy to two IIS
> (chop)
> mod_rewrite has no internal way to check for dead servers.
In the context of a reverse proxy, it could possibly make sense to
manage connections to the backend as a connection pool (apr_reslist).
Apart from possible performance improvements, this would enable a
reverse proxy to reroute away from any dead backend very nicely,
simply by invalidating any connection that is no longer functional.
I've contemplated hacking mod_proxy to enable this. It's unlikely
to hit the top of my priorities list anytime soon (unless someone
pays), but it's a possibility.
--
Nick Kew
Nick's manifesto: http://www.htmlhelp.com/~nick/
---------------------------------------------------------------------
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] mod_proxy_html problem
Posted by Pete Stokes <st...@quinn-direct.com>.
Thanks for the reply.
LoadFile libxml2 is already in place in httpd.conf, and I've upgraded
libxml2 to 2.6.x. I've even tried this on SuSE Pro 9, rather than RedHat
ES 3, but I get exactly the same thing.
Not that I know any C, but looking at the code, I'm assuming that
htmlCreatePushParserCtxt should be obtained from
#include <libxml/HTMLparser.h>
and looking in there I can see it defined in the "Interfaces for the
Push mode". When compiling in the mod_proxy_html, it goes fine so I'd
assume it got everything it needed. I'm all out here.
Any ideas would be great.
Rgds,
Pete.
Nick Kew wrote:
> On Mon, 19 Apr 2004, Pete Stokes wrote:
>
>
>>Hi,
>>
>>I've got mod_proxy_html built, but trying to start apache server I get:
>>
>>Syntax error on line 238 of /usr/local/apache2/conf/httpd.conf:
>>Cannot load /usr/local/apache2/modules/mod_proxy_html.so into server:
>>/usr/local/apache2/modules/mod_proxy_html.so: undefined symbol:
>>htmlCreatePushParserCtxt
>
>
> You need to LoadFile libxml2.
>
>
>>I have correct ver of libxml2 (2.5.10-5), but cannot progress this.
>
>
> 2.5.10 is a recommended minimum, but these days you might care to use
> a later version. But in any case, it's no use having it on the system
> if it's not loaded into Apache.
>
>
***********************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.
This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.
***********************************************************************************
For any information on the Quinn Group of Companies please visit :-
http://www.quinn-group.com
---------------------------------------------------------------------
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] mod_proxy_html problem
Posted by Nick Kew <ni...@webthing.com>.
On Mon, 19 Apr 2004, Pete Stokes wrote:
> Hi,
>
> I've got mod_proxy_html built, but trying to start apache server I get:
>
> Syntax error on line 238 of /usr/local/apache2/conf/httpd.conf:
> Cannot load /usr/local/apache2/modules/mod_proxy_html.so into server:
> /usr/local/apache2/modules/mod_proxy_html.so: undefined symbol:
> htmlCreatePushParserCtxt
You need to LoadFile libxml2.
> I have correct ver of libxml2 (2.5.10-5), but cannot progress this.
2.5.10 is a recommended minimum, but these days you might care to use
a later version. But in any case, it's no use having it on the system
if it's not loaded into Apache.
--
Nick Kew
Nick's manifesto: http://www.htmlhelp.com/~nick/
---------------------------------------------------------------------
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] mod_proxy_html problem
Posted by Pete Stokes <st...@quinn-direct.com>.
Hi,
I've got mod_proxy_html built, but trying to start apache server I get:
Syntax error on line 238 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_proxy_html.so into server:
/usr/local/apache2/modules/mod_proxy_html.so: undefined symbol:
htmlCreatePushParserCtxt
The only ref on the net for this defines it as a "possible geek error
message", with no comments, from
http://www.infocopter.com/know-how/mod_proxy_html.htm
I have correct ver of libxml2 (2.5.10-5), but cannot progress this.
Don't suppose any1 had this and solved it ?
Thanks,
Pete.
***********************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager.
This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.
***********************************************************************************
For any information on the Quinn Group of Companies please visit :-
http://www.quinn-group.com
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Joshua Slive <jo...@slive.ca>.
On Mon, 19 Apr 2004, Carlos wrote:
> I configured my rewrites based on rnd, and the file that is looked up
> contains the ip addresses of my two IIS servers. My Apache server, acting
> as a reverse proxy, gets about 1.400.000 hits a day. Would it be possible
> and advisable to change the rewrite conf to use a program that choses one
> of the IIS servers, verifies if its up, and then returns the server IP
> address to the Apache server?
On a per-request basis? That would essentially double the response time
and probably kill performance. As I said, use a cron job to check the
server availability, and remove the server from your list of available
addresses if it is down. Doing this even once per minute would be way
more efficient than trying to check on every request.
(Of course, you need to watch out for the fact that mod_rewrite will cache
lookups in a text database. An apache graceful restart may be necessary.)
Joshua.
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Carlos <zo...@ig.com.br>.
At 14:57 16/4/2004, Joshua Slive wrote:
>On Fri, 16 Apr 2004, Milan Andric wrote:
>
> > On Fri, Apr 16, 2004 at 11:12:59AM -0300, Carlos wrote:
> > > Hi!!
> > >
> > > We are trying to use an Apache Server as a Reverse Proxy to two IIS
> > > Servers, with Load Balancing capabilities. So far we have managed to get
> > > it working, thanks to the tips in
> > > http://www.engelschall.com/pw/apache/rewriteguide/, but, at this
> point, if
> > > one of the IIS servers is down, the Apache Server doesn´t know about
> that,
> > > and gives a 404 page to the browsers that get "rewrited" to the
> server that
> > > is down.
> > >
> > > What can be done to solve this... If one of the servers are down, then
> > > everyone gets "rewrited" to the server that is up?
> >
> > well, it probably depends on how you configured the rewrites but a shot
> in the
> > dark is to edit your /etc/hosts file on the proxy machine so request to the
> > machine that goes down is routed to the machine that is up. similarly in
> > windows maybe lmhosts file will do the trick?
>
>The other option being to have an external (cron job) process that checks
>the availability of the servers, and modifies an external rewrite map if
>one of them is down.
>
>mod_rewrite has no internal way to check for dead servers.
>
>Joshua.
Hi!!
Thanks everyone for the replies !!
I configured my rewrites based on rnd, and the file that is looked up
contains the ip addresses of my two IIS servers. My Apache server, acting
as a reverse proxy, gets about 1.400.000 hits a day. Would it be possible
and advisable to change the rewrite conf to use a program that choses one
of the IIS servers, verifies if its up, and then returns the server IP
address to the Apache server?
Thanks again !!
Carlos.
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 16 Apr 2004, Milan Andric wrote:
> On Fri, Apr 16, 2004 at 11:12:59AM -0300, Carlos wrote:
> > Hi!!
> >
> > We are trying to use an Apache Server as a Reverse Proxy to two IIS
> > Servers, with Load Balancing capabilities. So far we have managed to get
> > it working, thanks to the tips in
> > http://www.engelschall.com/pw/apache/rewriteguide/, but, at this point, if
> > one of the IIS servers is down, the Apache Server doesn´t know about that,
> > and gives a 404 page to the browsers that get "rewrited" to the server that
> > is down.
> >
> > What can be done to solve this... If one of the servers are down, then
> > everyone gets "rewrited" to the server that is up?
>
> well, it probably depends on how you configured the rewrites but a shot in the
> dark is to edit your /etc/hosts file on the proxy machine so request to the
> machine that goes down is routed to the machine that is up. similarly in
> windows maybe lmhosts file will do the trick?
The other option being to have an external (cron job) process that checks
the availability of the servers, and modifies an external rewrite map if
one of them is down.
mod_rewrite has no internal way to check for dead servers.
Joshua.
---------------------------------------------------------------------
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] Load Balancing with mod_rewrite
Posted by Milan Andric <ma...@eecs.berkeley.edu>.
On Fri, Apr 16, 2004 at 11:12:59AM -0300, Carlos wrote:
> Hi!!
>
> We are trying to use an Apache Server as a Reverse Proxy to two IIS
> Servers, with Load Balancing capabilities. So far we have managed to get
> it working, thanks to the tips in
> http://www.engelschall.com/pw/apache/rewriteguide/, but, at this point, if
> one of the IIS servers is down, the Apache Server doesn´t know about that,
> and gives a 404 page to the browsers that get "rewrited" to the server that
> is down.
>
> What can be done to solve this... If one of the servers are down, then
> everyone gets "rewrited" to the server that is up?
well, it probably depends on how you configured the rewrites but a shot in the
dark is to edit your /etc/hosts file on the proxy machine so request to the
machine that goes down is routed to the machine that is up. similarly in
windows maybe lmhosts file will do the trick?
just a thought, hope it helps,
--
Milan
---------------------------------------------------------------------
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