I did not find any "architecture related" mailing list, so I deceided topost on the general list. I hope this is OK.

I am struggling with my new zeo/zope architecture for some days now.
I come to the conclusion that I should ask for help.

I currently single cpu machine hosting zope + apache.

I am trying to migrate to the architecture:

machine A : Apache+pound        
machine B : 1 zeo + 1 zope      
machine C : 2 zope      
machine D : 2 zope      

all dual core, debian etch testing, Zope is 2.8.1-final and python 2.3.5.

1) Apache (machine A)

In /etc/apache2/apache2.conf I inserted the rewrite rule:

ServerName ist-guizay.univ-st-etienne.fr
DocumentRoot /var/www/
RewriteEngine On
RewriteRule ^/(.*)$1

That is to say that ist-guizay.univ-st-etienne.fr is machine A ...
I want to pass to my pound (listening on the same machine, port 81), all 
request on 80 port of ist-guizay.univ-st-etienne.fr

2) Pound (machine A)

In /etc/pound/pound.cfg, I have:

[...] ListenHTTP *,81

UrlGroup ".*"
BackEnd ip_machine_B,8080,1
BackEnd ip_machine_C,8080,2
BackEnd ip_machine_D,8080,2

The architecture is all hosted in the same service (inside an university, no 
external firewalls except the one on the machine that are filtering 
zeo/zope/pound/apache ports).

I can do :


All give me the welcome Zope installation page, as well as 
(pound conf is ok)

But I cannot go any further in my installation.

There 2 things that troubles my understanding:

A) RewriteRule:

http://machineA.mondomain.com as well as http://machineA.mondomain.com/Portail
(where /Portail is the path to plone site in fact), both replies:

"Bad Gateway

The proxy server received an invalid response from an upstream server."

I shall have done some mistakes in apache2.conf on the rewriterule:
RewriteRule ^/(.*)$1

but obviously I don't see it.
The current production for 2 years does work (one single cpu with both apache 
and zope instance) with the same kind of RewriteRule mechanism.

B) About running zope on dual core cpus:

Not as critical but I missed something here too.

I read (http://mail.zope.org/pipermail/zope/1999-December/100589.html) that 
python core got some lock policies in single thread mode, but I expected to 
associate one instance per cpu to solve it out. That is the reason why I 
configured 2 instances per machine (they are dual core ...).
Nevertheless, If I log into machine B (running two zope instances), making tail -f ./instances/instance1/log/Z2.log
and in another terminal, for the same machine:
tail -f ./instances/instance2/log/Z2.log

Then, I configure pound to redirect all requests on machine B and finally hit 
http://machineB:81 a lots, all requests goes to instance1 (first launched).
I would expect the system to make the balancing (if one cpu is used by a thread 
instance1, instance2 can still response with cpu 2 ...)
Obviously this is not the case, why ?
I solve it by making instances listen on different ports so that pound got now 
2 differents entries for one host (one entry per instance).

Sorry for the long post, but these are all things needed to be explained to let 
you understand my problem.

Best Regards,

Christophe Gravier
Laboratoire DIOM, groupe SATIn - Doctorant
ISTASE - Ingénieur d'études
Perso: http://perso.univ-st-etienne.fr/gravchri/
SATIn: http://www.istase.com/satin
Tel : 04 7748 5034

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to