Re: [PHP4BETA] PHP integration for Roxen (1.4-)

From: Date: Mon, 24 May 1999 01:17:18 +0000
Subject: Re: [PHP4BETA] PHP integration for Roxen (1.4-)
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-1010@lists.php.net to get a copy of this message
> But that doesn't make much sense. That's not PHP's job at all. That > would be the job of a reverse proxy you would slide in front of the web > server. That's not easy to do, since no reverse proxy I have seen so far can come even close to roxens performance.... Let me explain the architecture of the internal C-module that handles HTTP (with speeds in excess of 24 000 requests/second on a PII400 running Solaris x86.) There are several layers of caching in order to reach this performance for dynamic documents: 1. Primary memory cache (>24k req/sec) 2. Primary disk cache (>10k req/sec) 3. Secondary memory cache (>2k req/sec) 4. The source files (>600 req/sec) The first level cache is _very_ fast (a lookup costs less than 100 cycles on a PII) and contains the whole parsed contents of the resource requested including all headers needed to reply to the request. This cache is normally rather small (less than 256Mb, say) and contains only the most popular documents in a high traffic site. The contents of this cache don't live very long, less than 10 seconds is rather normal. But even if the contents only stay in here for one second, you still get _huge_ performance gains. The second level cache only contains the parsed pages for files that does not depend on things like client version and databases etc, such as generated images (and normal images, there is a rather large cache miss penalty, since I have to do a call to pike-code to resolve the miss, which immediately drops performance down below the 2k req/second level.) The contents of the second level cache can at times be read into the first level cache (small files, with sizes below 64Kb are promoted right now) The third and fourth levels are implemented in pike. The third level only applies to parsed files, it caches the contents of _parts_ of the pages, when applicable, and some other things, like the results of <gtext> and <cimg> tags etc. The last level is the source file. So, what I want to know is whether or not it's possible to fit PHP4 into this or if the user will have to use explicit <cache-time> and <cache> tags and containers to manually implement caching. Basically. -- Per Hedbor http://per.hedbor.org/ -- PHP 4 Beta

« previous php.version4 (#1010) next »