[Cubicweb] running the web frontend and cw backend as 2 separate processes on the same machine

Arthur Lutz arthur.lutz at logilab.fr
Mon Jun 14 11:28:01 CEST 2010


On Fri, Jun 11, 2010 at 03:49:52PM +0200, Aurélien Campeas wrote:
> Le vendredi 11 juin 2010 à 15:30 +0200, Florent Cayré a écrit :
> > Why aren't you using 2 similar instances with a load balancer that
> > preserves your sessions ? Squid can do that pretty easily.
> 
> Any link to some documentation, or config. examples ? 
> 
> (squid is big and I am not familiar with it)
> 

I would recommend pound for a simple load balancer

URL : http://www.apsis.ch/pound/

then the config is pretty straight forward : 

ListenHTTP
        Address 127.0.0.1
        Port    8080

        ## allow PUT and DELETE also (by default only GET, POST and HEAD)?:
        xHTTP           0

        Service
                BackEnd
                        Address localhost
                        Port    9080
                End
                BackEnd
                        Address localhost
                        Port    9081
                End
                Session
                    Type    Cookie
                    ID      "__session"
                    # CubicWeb http-session-time + 1 sec
                    TTL     43201
                End
        End
End

For balancing based on other parameters (URL, Header, HTTP value, auth, etc) check 
the SESSIONS sections of the pound page.

Arthur



More information about the Cubicweb mailing list