You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jorge González <jo...@degesys.com> on 2007/06/19 11:23:46 UTC
[users@httpd] LoadBalancing with sessions
Hi all!
I need to build a cluster with 2 Apache. PHP will be installed in both
web servers so I need to mangle sessions. I tried balancing with Apache
and mod_proxy_balanced but when there is a session the user goes always
to the same backend web server. I think this is not usefull because if
the server where the user is goes down then the user could not keep the
session.
How do you do guys apache load balancing with persistant sessions? LVS?
Heartbeat + ldirector?
thanks in advance, cheers!
Re: [users@httpd] LoadBalancing with sessions
Posted by Serge Dubrouski <se...@gmail.com>.
On 6/20/07, Jorge González <jo...@degesys.com> wrote:
> Hi!
>
> Ok, Apache balancing requests. Another option is LVS without Apache
> nither mod_load_balancer / mod_proxy_balancer. the problem: the user
> with session is going always to the same backend web server. This is not
> real balancing for me.
It would do that only if you tell Apache to support sticky sessions.
But actually this is a standard practice to direct all request for the
same session to the same serfver.
>
> The major problem is do real balancing between servers and keeping user
> session alive. I'm wondering if could be done with DRBD (shared disk) as
> you say. Thre are two way to store sessions, on DB or Disk. Sessions on
> DB is trivial, no problem. Sessions on disk, if are shared with DRBD
> then maybe the question is solved?
Yes if you do want to do that kingf of load balancing.
>
> Is for a shared hosting and users choose the way they develop. We
> couldn't say users to store sessions on DB or Disk
As I said the standard practice is to use sticky sessions and have
shared storage with presistent sessions for failover case if one node
dies.
>
> thanks, Cheers!
>
> Serge Dubrouski escribió:
> > 1. Apache + mod_load_balancer
> > 2. Heartbeat + DRBD to make Apache highly available and to provide PHP
> > a shared storage for creating persistent sessions.
> >
> > Serge,
> >
> > On 6/19/07, Jorge González <jo...@degesys.com> wrote:
> >> Hi all!
> >>
> >> I need to build a cluster with 2 Apache. PHP will be installed in both
> >> web servers so I need to mangle sessions. I tried balancing with Apache
> >> and mod_proxy_balanced but when there is a session the user goes always
> >> to the same backend web server. I think this is not usefull because if
> >> the server where the user is goes down then the user could not keep the
> >> session.
> >>
> >> How do you do guys apache load balancing with persistant sessions? LVS?
> >> Heartbeat + ldirector?
> >>
> >> thanks in advance, cheers!
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>
--
Serge Dubrouski.
---------------------------------------------------------------------
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] LoadBalancing with sessions
Posted by Jorge González <jo...@degesys.com>.
Hi!
Ok, Apache balancing requests. Another option is LVS without Apache
nither mod_load_balancer / mod_proxy_balancer. the problem: the user
with session is going always to the same backend web server. This is not
real balancing for me.
The major problem is do real balancing between servers and keeping user
session alive. I'm wondering if could be done with DRBD (shared disk) as
you say. Thre are two way to store sessions, on DB or Disk. Sessions on
DB is trivial, no problem. Sessions on disk, if are shared with DRBD
then maybe the question is solved?
Is for a shared hosting and users choose the way they develop. We
couldn't say users to store sessions on DB or Disk
thanks, Cheers!
Serge Dubrouski escribió:
> 1. Apache + mod_load_balancer
> 2. Heartbeat + DRBD to make Apache highly available and to provide PHP
> a shared storage for creating persistent sessions.
>
> Serge,
>
> On 6/19/07, Jorge González <jo...@degesys.com> wrote:
>> Hi all!
>>
>> I need to build a cluster with 2 Apache. PHP will be installed in both
>> web servers so I need to mangle sessions. I tried balancing with Apache
>> and mod_proxy_balanced but when there is a session the user goes always
>> to the same backend web server. I think this is not usefull because if
>> the server where the user is goes down then the user could not keep the
>> session.
>>
>> How do you do guys apache load balancing with persistant sessions? LVS?
>> Heartbeat + ldirector?
>>
>> thanks in advance, cheers!
>>
>> ---------------------------------------------------------------------
>> 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] LoadBalancing with sessions
Posted by Serge Dubrouski <se...@gmail.com>.
1. Apache + mod_load_balancer
2. Heartbeat + DRBD to make Apache highly available and to provide PHP
a shared storage for creating persistent sessions.
Serge,
On 6/19/07, Jorge González <jo...@degesys.com> wrote:
> Hi all!
>
> I need to build a cluster with 2 Apache. PHP will be installed in both
> web servers so I need to mangle sessions. I tried balancing with Apache
> and mod_proxy_balanced but when there is a session the user goes always
> to the same backend web server. I think this is not usefull because if
> the server where the user is goes down then the user could not keep the
> session.
>
> How do you do guys apache load balancing with persistant sessions? LVS?
> Heartbeat + ldirector?
>
> thanks in advance, cheers!
>
> ---------------------------------------------------------------------
> 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
>
>
--
Serge Dubrouski.
---------------------------------------------------------------------
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] LoadBalancing with sessions
Posted by Santi Saez <sa...@hostalia.com>.
El 19/06/2007, a las 11:23, Jorge González escribió:
> Hi all!
>
> I need to build a cluster with 2 Apache. PHP will be installed in
> both web servers so I need to mangle sessions. I tried balancing
> with Apache and mod_proxy_balanced but when there is a session the
> user goes always to the same backend web server. I think this is
> not usefull because if the server where the user is goes down then
> the user could not keep the session.
>
> How do you do guys apache load balancing with persistant sessions?
> LVS? Heartbeat + ldirector?
Dear Jorge,
you can try with LVS persistent connection option, it works fine for me:
http://www.linuxvirtualserver.org/docs/persistence.html
Another option is to store sessions in a DB, or in a distributed
memory object caching system like memcached:
http://danga.com/memcached/
Regards,
--
Santi Saez
---------------------------------------------------------------------
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