[Cubicweb] running the web frontend and cw backend as 2 separate processes on the same machine
florent at secondweb.fr
Fri Jun 11 15:30:27 CEST 2010
Why aren't you using 2 similar instances with a load balancer that preserves
your sessions ? Squid can do that pretty easily.
2010/6/11 Sylvain Thénault <sylvain.thenault at logilab.fr>
> On 11 juin 14:08, Aurélien Campeas wrote:
> > Le jeudi 10 juin 2010 à 20:31 +0200, Alexandre Fayolle a écrit :
> > > Hello,
> > > I have a CW instance running on a 2 CPU computer. Because of the GIL,
> > > cannot really benefit from the 2 CPUs. Since CubicWeb can be setup to
> run on 2
> > > computers, one running the web frontend and the other one running the
> > > server itself, I was wondering if it was possible to use a similar
> setup, on a
> > > single machine, and if so, how would this be set up. I don't expect a
> x2 perf
> > > improvement, but even 20% would be good news.
> > >
> > > If this is not supported, maybe it could be considered, since multi
> > > computers are common these days. I'm pretty sure something can be done
> > > some environment variable hacking, which I could probably use to see
> > > status of the GIL contention vs. pyro call overhead tradeof.
> > >
> > > What do you think?
> It's supported. Create one instance with config=repository, another one
> config=twisted, the first one exposed as pyro object, the other one with
> a proper pyro-instance-id refering to the first one.
> I would be curious to get some benchmarks w/ both configuration.
> > I believe this should all be in the documentation.
> > I'd like to extend your questions with the following: would it be
> > complicated to have an all-in-one process handling web request & all
> > short-lived requests + one repository process handling the long-running
> > transactions (import/export, delete, clone) ?
> > For better use of a 2-cores processor, this split could really be
> > * 1 web front
> > * 1 short-lived requests repo
> > * 1 long transactions repo
> This is far more tricky, and I don't see how you expect this kind of
> thing to work... I don't think we want the web ui to deal with 2 distincts
> repos. The only thing I can imagine is to have to all-in-one repo, with
> a load balancer redirecting some urls to your 'long transactions instance'.
> Though I'm afraid this won't be doable until we have persistent session
> (else one instance doesn't know anything about session of the other
> instance). Also that depends on things you may be doing in your hooks,
> telling if you can get multiple instances without problems.
> Sylvain Thénault LOGILAB, Paris (France)
> Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
> Développement logiciel sur mesure: http://www.logilab.fr/services
> CubicWeb, the semantic web framework: http://www.cubicweb.org
> Cubicweb mailing list
> Cubicweb at lists.cubicweb.org
Ce message est la propriété de SecondWeb et peut contenir des informations
confidentielles. Si vous n'êtes pas le destinataire désigné, nous vous
remercions de bien vouloir nous en aviser immédiatement et de nous retourner
ce message ou de le détruire, sans faire un quelconque usage de son contenu,
ni le communiquer ou le diffuser, ni en prendre copie, électronique ou non.
This message is the property of SecondWeb and may contain confidential
information. If you are not the designated recipient, please notify us
immediately and return the message to us or destroy it, without making any
use whatsoever of the contents thereof. Furthermore you should not forward
or copy the message by electronic or other means.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cubicweb