Squid for web server caching

I didn't know about Squid before. From the Postgres perfomance mailing list I noticed a recomendation to use Squid to reduce the load and speedup your server.
...I've found that our CMS spends more time sending a 23KB image to a dial up
user than it does generating and serving dynamic content.

This means that if you have a "light" squid process who caches and serves
your images and static content from it's cache then your apache processes
can truly focus on only the dynamic data.

Case in point: A first time visitor hits your home page. A dynamic page is
generated (in about 1 second) and served (taking 2 more seconds) which contains links to 20 additional files (images, styles and etc). Then expensive apache processes are used to serve each of those 20 files, which takes an additional 14 seconds. Your precious application server processes have now spent 14 seconds serving stuff that could have been served by an upstream cache. I am all for using upstream caches and SSL accelerators to take the load off of application servers. My apache children often take 16 or 20MB of RAM each. Why spend all of that on a 1.3KB image?
Just food for thought. ...[Matthew Nuzum]

Basically, Squid stored frequently used items in memory and passes the rest to a server.

Comments

Popular posts from this blog

Shortest Sudoku solver in Python

Downloading projecteuler.net