Why would I use Squid?
I have Googled, searched StackOverflow and here. Still I can not fully understand what or why someone would use Squid.
All I can find out so far is that it is some sort of cache that can make it less work that your server (i.e. Apache) has to do. So can someone clarify exactly what Squid does and more importantly, why would I want to use Squid?
I have a large social network site so maybe it would benefit for serving images or something, I am currently running lighttpd seperate from Apache, just for serving images.
Solution 1:
Squid is a web cache that caches web content, and returns it quickly on request. Handling a request through squid is frequently faster than a general-purpose webserver even for simple files (e.g. images), but it really comes into its own for caching pages that are dynamically generated, which can be expensive and slow. It thus allows you to build your pages dynamically but lets you serve a static, cached copy quickly to requesters. There's a lot of configuration possible about how long it caches for, which pages it caches, and how to invalidate a cached result.
For instance, Wikipedia uses caches (squid and others) as a content accelerator, so that every hit on a page doesn't make it be regenerated from the database through a lot of PHP. When pages are changed, the cache entry is invalidated.
Solution 2:
Its opensource and even works with Windows.
I would also like to add that it isnt only a web cache. The squid.conf file has tons of options. We are running it as a webfilter (using free blacklists) and are even using it to block ports on a handful of machines.
Solution 3:
Apart from all the answers here, Squid can also be used to filter content provided to the end user. For example you can prevent minors from viewing adult sites.
Squid can also scan downloaded files against viruses.
Yes, it's really powerful.