<< Back to Help, tips and troubleshooting page
Here's a scenario possible for maximum performance discussed on the English mailing-list:
Using thttpd to serve physical files (original thread title is thttpd as a supplemental webserver )
The basic intro story goes like this. What we aim for is to have Apache process PHP and mySQL queries only, and a supplemental webserver to take over and process images and/or static stuff, while freeing Apache's resources for another PHP/mySQL process.
Two supplemental webservers came to mind - Tux and thttpd. Thttpd can process PHP in a very limited implementation, Tux can't process PHP at all. Tux requires kernel mods, thttpd doesn't. Although Tux is faster, thttpd it will be.
I have given up on proposed thttpd configuration after xris pointed my nose to Pound. Exactly what I needed. A transparent connector/redirector/balancer.
The testing platform will be a RedHat 7.3-based WHM/cPanel production VPS, 512 MB guaranteed RAM, Apache 1.3x with PHP 4.3.10, Zend Optimizer 2.5.7 and Turck MMCache, mySQL 4.0.22. PHP compiled as a DSO Apache module.
There is an auction script hosted with many images around 50k (ideal for testing), running encoded through Ixed. This will be our first testing playground.
First we make thttpd serve images. Then we make thttpd serve static pages. Then we shall play with TYPO3 static export. The ultimate goal would be to make thttpd serve TYPO3 static pages, images, OpenOffice docs, PDFs etc. ie. all we can let it handle. I have read somewhere in TYPO3 docs that in case of static export, a setup can be made that first queries are made for static pages, and if they don't exist then query goes dynamic. I'll read up on this some more in time, see if I remembered well.
If question comes to mind - why not let thttpd serve PHP?
The answer is - serialized queries - here:
Current versions of thttpd can use PHP as CGI, however thttpd is not well suited to serving high volume dynamic content with PHP. Web sites wishing to take advantage of thttpd's strengths should consider using another web server, such as Apache, to serve PHP content while serving static content with thttpd. ---> thttpd FAQ
OK, so the initial plan has changed a bit. Due to it's immersible caching and redirection capabilities, we have decided to first try Squid and Squirm for proxy/redirection/caching connector.
Best of all - it will all be chroot jailed separately. Every hosted account in it's own chroot jail, every service chrooted (Apache, Squid, thttpd, mySQL, PHP) - all in their own separate chroot jails. We already have this setup in testing and soon going into production.
Since TYPO3 will be used for multiple sites with real accounts opened in WHM, a chroot jail for TYPO3 will have to be somewhat different, but we'll get to that eventually.
I have a great friend who is very, very good with Linux assembling this setup, so when we're done I'll ask him to write a few tech specs here.
Stay with us for more of this fabulous series ;)