Thank goodness for Slashdot for providing me with so much blog fodder over the past few days … what would we do without Cmdrtaco?!
I am a PHP developer and have been for quite some time. I’m no frickin’ brainiac but I do okay. I am also an avid user of Apache and more importantly Apache 2. We have been using Apache 2 here with the worker mpm + nptl threads + 2.6 kernel on ftp.osuosl.org for quite sometime with amazing success. I actually can’t justify more hardware because switching to that from Apache 1.3 + 2.4 kernel made such a huge difference. We can handle 1000 req/s at 250Mbit/s without ever getting the load on the machine above 1.0.
We also use Apache 1.3 here for hosting our PHP applications and like most folks we cannot justify moving to Apache 2 on those machines … it just doesn’t make sense for us.
Now I feel for both the Apache and PHP camps. Its a tough debacle to be in and one that is obviously generating some tension between developers. So how do you get folks to make the switch? My answer: features.
Apache 1.3 is great, but it just doesn’t scale like Apache 2 can. Now, I know with Apache 2 + PHP you still have to use prefork and this essentially makes it like Apache 1.3 in terms of scalability. However, some of the new features and updates to old ones coming out in Apache 2.1 I believe will make users make the switch simply for ease of use and ability to keep your environment sane.
Last week we had the chance to interview Paul Querna for a job here at the OSL. Part of the interview was to do a presentation on developing the next-generation infrastructure for the Mozilla Foundation’s applications (such as update|download|developer.mozilla.org). Paul’s presentation was fantastic and shed light on some of the features that I believe will bring Apache 2 into the lime light: mod_proxy, mod_cache and mod_proxy_balancer.
Now I know what you’re saying: “mod_proxy and mod_cache have been around for years … heck they were in Apache 1.3!” Well, I drilled down a little by grabbing the latest alpha via SVN from svn.apache.org and also talked with some of the developers of those modules. mod_proxy and mod_cache have been updated quite a bit and developers are expecting about a 20% performance improvement over the versions in 1.3 and even 2.0. This is great for long-time users of the best-single-threaded-app-ever: Squid. With mod_proxy and the mod_cache memory and disk modules now, you can essentially replace Squid plus get the added benefits of a fully-threaded application that can scale plus with added support for all of the HTTP 1.1 calls (some of which even Squid still has problems with). Not only that, you can leverage all of the other modules in Apache like mod_rewrite, etc that allow you infinite flexibility in managing your site(s).
mod_proxy_balancer is really interesting. Now, tie in mod_proxy and mod_cache … you have a great caching reverse proxy solution. Now, if you can leverage your static content through this plus tie that back to your Apache 2 + PHP in prefork on the backend you can get a lot more mileage out of your hardware. Your caching servers would essentially do most of the heavy lifting and then would hand back queries to the application servers that would than pass them through the caching servers. Sweet ass sweet ™!!!!
The next question is to see how all of this works in practice … I shall be the guinea pig of course …
Big thanks goes out to Paul Querna for his excellent presentation and getting us to think about this stuff.
If my initial tests show anything, I can forsee the combination of the above modules bringing Apache 2 together with PHP once and for all … ![]()
No comments
Comments feed for this article
Trackback link
http://kveton.com/blog/2004/12/22/apache-2-php/trackback/