[Zope] RE: Zope and mod_python
Pascal Peregrina
Pperegrina at Lastminute.com
Tue Feb 8 06:08:43 EST 2005
Yes, I still have a Zeo instance running, because mod_python does not
provide a "global" interpreter, so there is no way to give access to a
FileStorage (because each child process would try to open/read/write it, so
there would be locking problems, etc, on the file).
Yup, well, I use the Zope module standard functions to read configuration
for a zope.conf file, where I have declared my Zeo server.
The main difference between the standard zope.conf file and the one I use it
that the Servers (HTTP,WEBDAV,FTP) section is removed.
So I guess that a question I will soon hear about will be : how to get
WEBDAV/FTP working ?
I have no answer, if I needed them, I would keep a separate "real" Zope
instance for that purpose I guess, that would connect to Zeo.
But it may be possible to do some mod_python handler for WebDav and FTP, as
Apache support these protocols, as far as I know.
Before submitting a feature+patch on zope.org, I would like to make more
tests :
+ load tests
+ replace one of our "real" Zope instances by this in our production
environment
+ get more feedback (I have contacted mod_python developper, so he may have
a look too)
...
But of course, at some point, I do it.
About load testing, the first very simple AB test we did : "out-of-the box
zope.conf" Zope instance vs. "out-of-the box httpd.conf"
Apache2/mod_python/ZopeHandler showed that the later was 2 times faster.
But I think I have to make the number of child processes in Apache and the
number of connections (both implying the max number of sumultaneous requests
that can be handled on both architectures) and then load test again.
At least I can say that with Apache2/mod_python/ZopeHandler CPU repartition
is much better for multi-cpu servers because each request really runs in a
separate OS process.
Pascal
-----Message d'origine-----
De : Chris Withers [mailto:chris at simplistix.co.uk]
Envoyé : mardi 8 février 2005 11:51
À : Pascal Peregrina
Cc : 'zope at zope.org '
Objet : Re: [Zope] RE: Zope and mod_python
Pascal Peregrina wrote:
> The targeted architecture is : Apache2/mod_python/ZopeHandler <-> ZEO
Aha, so you still have a long running python process the form of ZEO?
> At startup Apache initialize a pool of child processes (the processes that
> handle requests).
> Each Apache child process starts a python interpreter (mod_python does it)
> which in turns initialize an embedded Zope instance.
Right, and that opens a ClientStorage connection or two through to ZEO?
> Child processes are reusable, so if you correclty set the pool in Apache,
> the python processes should live as long as Apache itself.
Didn't know that, cool :-)
> It's just that when I wanted to try running Zope with mod_python, I found
on
> the web that apparently noone had done it before, and even that in odler
> versions of mod_python it was clearly stated that it was impossible to
> achieve.
> So I just decided to expose what I did to the community, to get feedback.
Hehe, well, the community is very greatful :-) Hopefully this can end up
as something that ships with Zope by default? Can you submit the work
you've done to http://www.zope.org/Collectors/Zope as a feature+patch?
> My installation has now been running for 5 days, and I have still no
issues,
> both browsing my site or using the ZMI.
Coool, have you tried load testing it with AB or some such?
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
More information about the Zope
mailing list