Caching versus Accelerators (www.websiteoptimization.com)

Created 59 minutes ago

last 1 comments, out of 1

sufehmi says:
Dec 16 at 14:51 PM

How would this be better than using something like eAccelerator for PHP, or some such caching engine?

Better by several hundred / thousand times.

A friend's website got popular. He tried everything - installed PHP accelerators (depending on your system, this can be quite painful), tweak MySQL, do various adjustments to his scripts, etc.

No joy, every noon his server will fell over, drowned in incoming requests so fast, it's like being DDoS-ed

So I came in, dropped in Squid, enabled caching in php.ini, enabled caching in Wordpress (one line change in one of its script) -- voila, server is happy.

Used to be overloaded like mad, now it's CPU utilization is averaging in 5% only.

He happily reported that after a month, his traffic has doubled. Because his server is so much faster and always up & running now.

In return I reported to him that I detected loads of his visitors actually are bots / crawlers; such as the famous Teleport Pro. This is usually bad news, by default Teleport Pro will launch 10 simultaneous connections against your server, so it can finish the job as soon as possible.
I asked him if he want to block these visitors.

He said, no, don't bother. Since the server is now able to withstand even them without breaking a sweat, he doesn't even care :)
By enabling cache (using Squid), the torrent of traffic doesn't reach MySQL. It does not even reach PHP. Heck, it does NOT even reach Apache.

Nearly all of the traffic are served from Squid's high speed cache.

I benchmarked his server, it's capacity was 2 requests per second. Now it's able to serve up to 1000 requests per second.
I wouldn't even bother with APC / eAccelerator. There's too much performance advantage in deploying cache over those; and with almost ZERO risk involved.
Try to top that :)

add comment