This is a discussion on special module for proxy functionality within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello there, Is there a module available for Apache 2 which will have more functionality just like mod_proxy? With mod_proxy ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello there,
Is there a module available for Apache 2 which will have more functionality just like mod_proxy? With mod_proxy there are only 1:1 relations possible - but I need a real dispatching functionality: From Apache Webserver to more than one target host (with detection of targets that are down ...). I just experimented with the BEA Weblogic Module "mod_wl.so" - here it's possible to configure more than one target hosts... But this module is not for free and not supported to dispatch to other systems like BEA WLS/X ... Regards, Christian |
|
|||
|
> Is there a module available for Apache 2 which will have more
> functionality just like mod_proxy? With mod_proxy there are only 1:1 > relations possible - but I need a real dispatching functionality: > From Apache Webserver to more than one target host (with detection of > targets that are down ...) You can do this with mod_rewrite in conjunction with the [proxy] flag. See http://httpd.apache.org/docs-2.0/en/...e.html#content, look for "Load Balancing". The example contains everything you want except the detection of down hosts, but you can add it easely to the lb.pl script provided there - or google around a bit for an already enhanced version - i'm quite certain it exists somewhere. HTH Christian Ramseyer |
|
|||
|
> > Is there a module available for Apache 2 which will have more
> > functionality just like mod_proxy? With mod_proxy there are only 1:1 > > relations possible - but I need a real dispatching functionality: > > From Apache Webserver to more than one target host (with detection of > > targets that are down ...) > > You can do this with mod_rewrite in conjunction with the [proxy] flag. > See http://httpd.apache.org/docs-2.0/en/...e.html#content, > look for "Load Balancing". The example contains everything you want > except the detection of down hosts, but you can add it easely to the > lb.pl script provided there - or google around a bit for an already > enhanced version - i'm quite certain it exists somewhere. while using mod_rewrite with the [P] or [R] flag is a great idea to do LoadBalancing, the way it is described in the rewriting guide is suboptimal. external rewriting programs should be avoided at all costs due to lower performance and the fact that they'll lock up the server when they lock up or die for any reason. the right way to do this is: RewriteEngine On RewriteMap balance rnd:/path/to/file.txt RewriteRule (.*) http://${balance:key}/$1 [P] with /path/to/file.txt containing key backend1|backend2|backend3... and having a script updating file.txt. joachim |
|
|||
|
>
> while using mod_rewrite with the [P] or [R] flag is a great idea to do > LoadBalancing, the way it is described in the rewriting guide is > suboptimal. external rewriting programs should be avoided at all costs > due to lower performance and the fact that they'll lock up the server > when they lock up or die for any reason. > > the right way to do this is: > > RewriteEngine On > RewriteMap balance rnd:/path/to/file.txt > > RewriteRule (.*) http://${balance:key}/$1 [P] > > with /path/to/file.txt containing > > key backend1|backend2|backend3... > > and having a script updating file.txt. > > joachim Good point, using randomized RewriteMaps as described is way more elegant. regards christian ramseyer |
| Thread Tools | |
| Display Modes | |
|
|