/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-06 / a little hint for zope behind pound

[ << ] [ >> ]

[ ANNOUNCE: Pound - reverse proxy and load balancer ... ] [ DSLAM IPCop Pound Reverse-Proxy Environment / ... ]

a little hint for zope behind pound
Sascha Ottolski <sascha.ottolski(at)gallileus.de>
2005-06-06 12:35:37 [ FULL ]
Hi,

may be this is interesting for some of you:

we found the early binding of ports when starting up zope is problematic in 
our load balanced (behind a pound) setup. if a backend restarts and binds its 
ports, pound almost immediately thinks it's back in business and starts 
sending request. obviously, the server needs some more time to finish its 
startup; meanwhile, those requests are being unanswered (at least delayed for 
quite a while), and users need to wait for the response (if any). we only use 
high ports for the servers, so there's no real need for us to bind the ports 
with root privileges (of course it would be cleaner to check if low ports are 
configured, and only delay the binding if not).

last not least: the late binding seems to have a huge impact on the startup 
time (although this is no hard fact, just a feeling).

our solution is rather simple:

in lib/python/Zope2/Startup/ (or lib/python/Zope/Startup/ for 2.7):

Index: __init__.py
===================================================================
--- __init__.py (revision 30421)
+++ __init__.py (working copy)
(at)(at) -88,8 +88,8 (at)(at)
         self.setupPublisher()
         # Start ZServer servers before we drop privileges so we can bind to
         # "low" ports:
-        self.setupZServer()
-        self.setupServers()
+        #self.setupZServer()
+        #self.setupServers()
         # drop privileges after setting up servers
         self.dropPrivileges()
         self.makeLockFile()
(at)(at) -100,6 +100,10 (at)(at)
         # emit a "ready" message in order to prevent the kinds of emails
         # to the Zope maillist in which people claim that Zope has "frozen"
         # after it has emitted ZServer messages.
+
+        self.setupZServer()
+        self.setupServers()
+
         logger.info('Ready to handle requests')
         self.setupFinalLogging()

Cheers,

Sascha

Re: [Pound Mailing List] a little hint for zope behind pound
Robert Segall <roseg(at)apsis.ch>
2005-06-09 15:47:32 [ FULL ]
On Mon, 6 Jun 2005 12:35:37 +0200 Sascha Ottolski
<sascha.ottolski(at)gallileus.de> wrote:
[...]
problematic in [...]
binds its [...]
starts [...]
its [...]
delayed for [...]
only use [...]
ports [...]
ports are [...]
startup [...]
bind to[...]
emails[...]
"frozen"[...]

Thanks Sascha. Did you send this to the Zope developers as well?[...]

Re: [Pound Mailing List] a little hint for zope behind pound
Sascha Ottolski <sascha.ottolski(at)gallileus.de>
2005-06-09 16:01:09 [ FULL ]
Am Donnerstag, 9. Juni 2005 15:47 schrieb Robert Segall:[...]

yep: http://www.zope.org/Collectors/Zope/1802

Sascha

MailBoxer