UPDATE: Apache + ZServer complete solution
Thanks to Evan Simpson (author of SiteAccess), I now have a complete working solution for embedding ZServer behind Apache, allowing all or part of a website to run with fast, multithreaded Zope content while other legacy content and configurations are unaffected. http://www.zope.org/Members/anser/apache_zserver/ Enjoy, and as always I welcome suggestions and comments.
Hi Anser, At 21:33 Uhr -0500 04.01.2000, anser wrote:
Thanks to Evan Simpson (author of SiteAccess), I now have a complete working solution for embedding ZServer behind Apache, allowing all or part of a website to run with fast, multithreaded Zope content while other legacy content and configurations are unaffected.
thanks for that interesting HowTo! I guess there's a rather big speed loss to this, even though it permits (apache-) server farms and threaded execution of ZServer. Doing a http-request always has a time overhead. Do you or anyone else have an idea on how to set up a Zope-Site behind apache that serves most content including the HomePage from Zope but permits usage of plain apache-urls as well? Up to now I've only seen solutions to "some content from Zope (HP from apache)" and "everything from Zope" Regards Jochen
Jochen Haeberle wrote:
Do you or anyone else have an idea on how to set up a Zope-Site behind apache that serves most content including the HomePage from Zope but permits usage of plain apache-urls as well? Up to now I've only seen solutions to "some content from Zope (HP from apache)" and "everything from Zope"
I'm not sure what you mean with 'HP from Apache', but it's certainly possible to combine Zope with apache; check out: http://www.zope.org/Members/michel/HowTos/ApacheRewriting I have a site set up this way and it works just fine. Regards, Martijn
Martijn, sorry for not answering for nearly a week, but I was away from office... At 13:43 Uhr +0100 05.01.2000, Martijn Faassen wrote:
Jochen Haeberle wrote:
Do you or anyone else have an idea on how to set up a Zope-Site behind apache that serves most content including the HomePage from Zope but permits usage of plain apache-urls as well? Up to now I've only seen solutions to "some content from Zope (HP from apache)" and "everything from Zope"
I'm not sure what you mean with 'HP from Apache', but it's certainly possible to combine Zope with apache; check out:
http://www.zope.org/Members/michel/HowTos/ApacheRewriting
I have a site set up this way and it works just fine.
Yes, this works for me too, but I do not see a good solution for serving the homepage (HP :-) from Zope, most content from Zope but diverce content from apache as well. The Rewrite-HowTo shows you how to set up part of your site (not including the homepage) from Zope but most from apache or everything from apache. Jochen
Jochen Haeberle [mailto:listen@MIDRAS.de] writes:
At 21:33 Uhr -0500 04.01.2000, anser wrote:
Thanks to Evan Simpson (author of SiteAccess), I now have a complete working solution for embedding ZServer behind Apache, allowing all or part of a website to run with fast, multithreaded Zope content while other legacy content and configurations are unaffected.
thanks for that interesting HowTo! I guess there's a rather big speed loss to this, even though it permits (apache-) server farms and threaded execution of ZServer. Doing a http-request always has a time overhead.
How are you measuring a "rather big speed loss"? Loss when compared with what? If you are just saying that you imagine there _must_ be a penalty for using ProxyPass, I suggest you try it first and see for yourself. It's pretty miniscule if there is one. Definitely a lightweight "layer" compared to the amount of processing time ZServer does, not to mention doing it via CGI.
Do you or anyone else have an idea on how to set up a Zope-Site behind apache that serves most content including the HomePage from Zope but permits usage of plain apache-urls as well?
I haven't tested anything but you could probably accomplish this via mod_rewrite. The Apache content would need to live in some defined subtrees and/or filetypes.
anser wrote:
Jochen Haeberle [mailto:listen@MIDRAS.de] writes:
thanks for that interesting HowTo! I guess there's a rather big speed loss to this, even though it permits (apache-) server farms and threaded execution of ZServer. Doing a http-request always has a time overhead. How are you measuring a "rather big speed loss"? Loss when compared with what?
If you are just saying that you imagine there _must_ be a penalty for using ProxyPass, I suggest you try it first and see for yourself. It's pretty miniscule if there is one. Definitely a lightweight "layer" compared to the amount of processing time ZServer does, not to mention doing it via CGI.
In order to compare proxy with pcgi, I check the code of PCGI and medusa. The codes of PCGI is definitely much simpler than the asyncore in medusa. But, here is several last lines of class PCGIPublisher:def handler(self, conn): if len(stderr) > 0: conn.send(stderr) conn.close() Does it mean that pcgi server will close every tcp connection after it finishes every ONE response ? It let me think of the difference between HTTP 1.0 and HTTP 1.1 -- the penalty of a lot of repeated tcp connection >_< I give a glimpse to FastCGI at last. It seems that FastCGI has the most promise. FastCGI is more like the HTTP 1.1 while PCGI is like HTTP 1.0. But I have not checked the implementation of FastCGI in ZServer carefully and don't know the relation between FastCGI Server and Medusa. Can anybody give some benchmarks to compare these three methods (PCGI, Proxy, FastCGI) ? ( It is appreciated if including mod_perl, mod_php and mod_jserv :> ) Regards, lenx
Hi anser, sorry for not replying earlier, but I was out of office for a while. At 8:18 Uhr -0500 05.01.2000, anser wrote:
thanks for that interesting HowTo! I guess there's a rather big speed loss to this, even though it permits (apache-) server farms and threaded execution of ZServer. Doing a http-request always has a time overhead.
How are you measuring a "rather big speed loss"? Loss when compared with what?
Compared to FastCGi or direct ZServer execution. Building a http-connection involves protocol overhead for building the connection and transferring the data. I do not have any numbers on this, thus the question.
If you are just saying that you imagine there _must_ be a penalty for using ProxyPass, I suggest you try it first and see for yourself. It's pretty miniscule if there is one. Definitely a lightweight "layer" compared to the amount of processing time ZServer does, not to mention doing it via CGI.
You have to add the time ZServer uses to process the proxy call to the overall request time, don't you?
Do you or anyone else have an idea on how to set up a Zope-Site behind apache that serves most content including the HomePage from Zope but permits usage of plain apache-urls as well?
I haven't tested anything but you could probably accomplish this via mod_rewrite. The Apache content would need to live in some defined subtrees and/or filetypes.
So it would be possible to include your proxypass together with some mod_rewrites? I will have to go into this more deeply, really ;-) Jochen
anser wrote:
Thanks to Evan Simpson (author of SiteAccess), I now have a complete working solution for embedding ZServer behind Apache, allowing all or part of a website to run with fast, multithreaded Zope content while other legacy content and configurations are unaffected.
http://www.zope.org/Members/anser/apache_zserver/
Enjoy, and as always I welcome suggestions and comments.
Have you attempted to use ZDiscussion or other ZCatalog Aware ZClasses on your site. I ask because we have attempted to use SiteAccess and have found that entries in a Catalog entered via a VirtualHost appear to store their reference incorrectly somehow, and when a search is done for what the objects are via the children() or posts() methods we get erroneous references. Have you seen any such problems. We really would like to be using SiteAccess or some such VirtualHosting product to get our sites fronted by Apache. Any ideas would be great. -- ------------------------------- tonyr@ep.newtimes.com Director of Web Technology Newtimes Inc. -------------------------------
I have not tried using ZDiscussion with a virtual host Apache proxy. If I get the time I will try it. You can take a look at the environment passed to your objects by the dtml-var REQUEST trick; it may be that ZDiscussion is using some other method of finding its base URL. (I actually sent a patch to Evan for SiteAccess because he does not set SERVER_URL, which a few products may use.) -----Original Message----- Have you attempted to use ZDiscussion or other ZCatalog Aware ZClasses on your site. I ask because we have attempted to use SiteAccess and have found that entries in a Catalog entered via a VirtualHost appear to store their reference incorrectly somehow, and when a search is done for what the objects are via the children() or posts() methods we get erroneous references. Have you seen any such problems.
participants (5)
-
anser -
Jochen Haeberle -
Martijn Faassen -
tonyr@ep.newtimes.com -
Wei Tao