httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Load balancer with sticky sessions
Date Thu, 22 Jul 2004 13:13:09 GMT
On Thu, 22 Jul 2004 12:07:15 +0900, Batara Kesuma
<bkesuma@ml.gaijinweb.com> wrote:
> Hi,
> 
> I am using mod_proxy and mod_rewrite as frontend to split the load to
> the backends running mod_perl. It is a simple round robin one, the conf
> looks like this:
> 
> ## htppd.conf
> RewriteMap  server      rnd:/usr/local/httpd_proxy/conf/server.txt
> RewriteRule ^/(.*\.pl)$  http://${server:backend}:8080/$1 [P]
> 
> ## server.txt
> backend         mod_perl1|mod_perl2|mod_perl3
> 
> I am wondering how can I make a load balancer with sticky sessions. I
> read that mod_backhand can do this, but the last time I checked it only
> ran on Apache 1.3 (I use Apache 2.0). Can I use mod_proxy and
> mod_rewrite to do this? Is there any other solutions (other than getting
> the hardware load balancer)? Thank you in advance.

I'm not an expert in this area, but I suppose it could be done if your
session is controlled by a cookie that indicates which back-end server
it originated from.  Then you could use a RewriteCond to check for the
appropriate cookie and Rewrite to that server.  If the cookie didn't
exist, you would fall back to the random map RewriteRule.

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


Mime
View raw message