The best way to set up Multiple Zopes?
Zopista's, I want to set up multiple Zope's on my Linux Box (6.1 running Apache with Virtual Hosts). The sites need to respond to different URLs and I think they should have different ZODBs. So... the questions are... 1) What is the best way to do this? (Proxy Pass, Zope.cgi, etc) 2) Has anyone done this and what has been their experience? 3) Are there any resource issues in terms of memory, processor, etc? Thanks, J
"J. Atwood" wrote:
I want to set up multiple Zope's on my Linux Box (6.1 running Apache with Virtual Hosts). The sites need to respond to different URLs and I think they should have different ZODBs. So... the questions are...
1) What is the best way to do this? (Proxy Pass, Zope.cgi, etc)
I think ProxyPass is the "cleanest" way to do this. You need an IP for each of them, and I've found no way to do it "virtually" (the way you can with SiteRoots, etc.) The zope talks to the same IP as the VirtualHost, but on differing ports.
2) Has anyone done this and what has been their experience?
I've done it a few times, and I'd have to say that you're really better off virtualhosting with a naked Zope using siteaccess if you have multiple sites per Zope, or just straight if you're not. If you're doing SSL, of course, that's not an option (but see m2crypto). <dtml-if opinion> I do not believe there is any compelling reason to have different ZODBs, unless you're determined to have Product differentiation per site. The upcomimg debut of ZEO is all the more reason to minimise your number of ZODB's, *especially* since, with ZEO, you can have a unified object store and then have differentiated Products in the Zopes that "front" it. People can do 95% of the things they could do with products using DTML and Python methods. The remaining 5% - which mostly involve playing with the filesystem - aren't the kind of things I think should be handed to an end user, especially if you're not doing some sort of encryption for *every* type of access they do. </dtml-if>
3) Are there any resource issues in terms of memory, processor, etc?
My production zope is utilizing about 80 megabytes of ram. That's compiled from source, using installed python. My Zope installed with it's own python is occupying about 36MB, and it is, essentially, "idle". I'm using the standard 6 open threads each, and have seen no sign (thus far) that they're saturating those open threads. I have done nothing to manage the amount of memory or resources my Zopes take: it is my understanding that you can talk them into being leaner. You can, of course, reduce the number of threads per zope. When a thread goes "active" it consumes 20-30% of cpu on my AMD K6-III 400. Inactive threads consume 1-3% of cpu. Good luck! -- ethan mindlace fremen mindlace@imeme.net zope -&- imap email -&- mailing list weave your web with the web at http://imeme.net
I think ProxyPass is the "cleanest" way to do this. You need an IP for each of them, and I've found no way to do it "virtually" (the way you can with SiteRoots, etc.) The zope talks to the same IP as the VirtualHost, but on differing ports.
You don't need multiple IP addresses. Just run each site through an Apache Virtual Host. ... NameVirtualHost 192.193.10.10 <VirtualHost 192.193.10.10> ServerName siteone.foo.bar ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost> <VirtualHost 192.193.10.10> ServerName sitetwo.foo.bar ProxyPass / http://localhost:7080/ ProxyPassReverse / http://localhost:7080/ </VirtualHost> ... Cheers, Stephen -- Stephen Harrison - stephen@nipltd.com New Information Paradigms - www.nipltd.com
I think ProxyPass is the "cleanest" way to do this. You need an IP for each of them, and I've found no way to do it "virtually" (the way you can with SiteRoots, etc.) The zope talks to the same IP as the VirtualHost, but on differing ports.
You don't need multiple IP addresses. Just run each site through an Apache Virtual Host.
[Snip] Oops. I forgot that in order to get Virtual Hosts to work in this way, I did have to patch Apache! Otherwise Apache rewrites the server name and all zopes links are wrong. I don't have the details to hand right now, but I will be writing a HowTo on multi-host apache/zope/whatever configuration soon, which will cover this. Cheers, Stephen -- Stephen Harrison - stephen@nipltd.com New Information Paradigms - www.nipltd.com
I want to set up multiple Zope's on my Linux Box (6.1 running Apache with Virtual Hosts). The sites need to respond to different URLs and I think they should have different ZODBs. So... the questions are...
1) What is the best way to do this? (Proxy Pass, Zope.cgi, etc)
ProxyPass is certainly a nice clean way to do it. Since you are already using Virtual Hosts this should be no problem - just set up a VHost for each site. If you want distinct zope installations then configure each one to run with a separate port base (eg. 8000, 7000, 8100, 8200). Conceptually you want to assign a block of 100 ports to each zope installation, out of this block zope uses the ports it wants (xx21 ftp, xx80 http, xx99 monitor). Finally, proxy pass each VHost to localhost:xx80/
2) Has anyone done this and what has been their experience?
Not with multiple zopes, but with a combination of zope and other http servers on the same machine and the principle is the same, although it won't be too long before we are running multiple zopes.
3) Are there any resource issues in terms of memory, processor, etc?
Obviously, each instance of zope is going to require another set of resources (memmory, disk, i/o). Are you sure you need multiple zopes? Or could you run each site inside a directory in one zope with, say, a SiteRoot product in each one? Cheers, Stephen -- Stephen Harrison - stephen@nipltd.com New Information Paradigms - www.nipltd.com
participants (3)
-
J. Atwood -
mindlace -
Stephen Harrison