[Zope] Hooking Zope into Apache - please read

John Edstrom edstrom@Poopsie.hmsc.orst.edu
Fri, 4 Feb 2000 09:44:20 -0800 (PST)


Tres Seaver
> 
> Tom Deprez <tom.deprez@uz.kuleuven.ac.be> wrote:
> > 
> > Hi all,
> > 
> > No, this is not a question on how to do it. All the how-to's available
> > clearly explain this... it just an informational question and I hope
> > somebody can give me a straight answer.
> > 
> > In reading Jeff Shelton's Python conference summaries (by the way, thanks
> > Jeff for doing this! Now, people who're not able (because of their job,
> > ...) to go to this conference can still pick something up! Great!) I read
> > the following :
> > 
> > In Jim's opinion, the "preferred way" to hook into Apache will soon become
> > FastCGI rather than PCGI.
> > 
> > Well, I can understand that FastCGI is better than PCGI, but I read (and
> > implemented) a how-to of anser (Using Apache with ZServer (Not Zope cgi))
> > in which he explains the use of ProxyPass and ProxyPassReverse.
> > Well, this mehtod looks to me really handy. You use all the positive
> > things, because you can use Apache, but also the fast ZServer.
> > 
> > So, now, you'll understand that I'm a little bit confused. What is now the
> > best way ... using FastCGI or ProxyPass....? What are the differences
> > between the two? What are the pro's and con's?
> 
> Would you mind if I "borrowed" your question for a Zope Guru of the Week topic?
> (assuming it doesn't get answered quickly here).
> 


Jeeze, guys, just measuer it.

Using Apache 1.3.11 on a DEC UNIX machine I tested responses with
apache's benchmarking program ab.  I serverd the same zope page
directly, via proxy/proxyreverse (no cache) and via fcgi.  I used
single and recurrent responses.  The results are below. Essentialy,
proxy is faster than fcgi and both are slower than than direct
connections.

ab header blurb:
  This is ApacheBench, Version 1.3c <$Revision: 1.37 $> apache-1.3
  Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
  Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Document Length:        3315 bytes

--------------------- proxy method : concurrent --------------------------------
Concurrency Level:      5
Time taken for tests:   5.888 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      349600 bytes
HTML transferred:       331500 bytes
Requests per second:    16.98
Transfer rate:          59.38 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     1     5
Processing:   144   287   747
Total:        144   288   752

--------------------- proxy method : single shot ------------------------------
Concurrency Level:      1
Time taken for tests:   7.146 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      349600 bytes
HTML transferred:       331500 bytes
Requests per second:    13.99
Transfer rate:          48.92 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     0     1
Processing:    64    70   264
Total:         64    70   265

--------------------- proxy method : concurrent --------------------------------
Concurrency Level:      5
Time taken for tests:   8.307 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      355900 bytes
HTML transferred:       331500 bytes
Requests per second:    12.04
Transfer rate:          42.84 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     3    73
Processing:   247   411  1020
Total:        247   414  1093

--------------------- fcgi method : single shot ------------------------------
Concurrency Level:      1
Time taken for tests:   9.362 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      355900 bytes
HTML transferred:       331500 bytes
Requests per second:    10.68
Transfer rate:          38.02 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     0     1
Processing:    88    93   146
Total:         88    93   147

--------------------- raw method : concurrent --------------------------------
Concurrency Level:      5
Time taken for tests:   5.404 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      352920 bytes
HTML transferred:       332720 bytes
Requests per second:    18.50
Transfer rate:          65.31 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     1     5
Processing:   163   264  1055
Total:        163   265  1060


--------------------- raw method : single shot ------------------------------
Concurrency Level:      1
Time taken for tests:   5.406 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      350000 bytes
HTML transferred:       330000 bytes
Requests per second:    18.50
Transfer rate:          64.74 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     0     1
Processing:    53    53    82
Total:         53    53    83



One thing I don't understand is why the total transferred and HTML
transferred rows change when direct Zope connections are used.


> Or perhaps I should be "harvesting" stuff like this (including answers) from the
> list archives into "prefab" ZGotW questions, just as a searchable reference.
> 
> -- 
> =========================================================
> Tres Seaver         tseaver@palladion.com    713-523-6582
> Palladion Software  http://www.palladion.com
> 


-- 
 John Edstrom