Squid, the Caching Proxy - General Squid Overview
(Page 2 of 4 )
We'll start with the basic terminology. Anybody that has some sort of familiarity with the world of IT knows that caching is about storing items (such as files) depending on their frequency. The idea is to store the most required items so that they can be received faster from the cache than they would be originally. Web caching takes a similar approach; those items are, in fact, web documents.
Implementing a caching system requires understanding its limitations as well. The technical terms come from computer architecture (your CPU also has cache): cache hit and cache miss. The first one, as its name suggests, is a specific situation where the required conditions are met and the user is served directly (and only) from the cache. The latter happens when the required item cannot be found in the cache.
All in all, web caching is a proven way of saving bandwidth, reducing response times (eliminating lag/high latencies) and server load. It should be noted that in order for the system to work flawlessly, specific techniques are implemented to verify the validity of the content stored in the cache (such as freshness). Squid has a set of algorithms that define when the content expires and acts accordingly.
Now that we know the basic terminology we can go further and analyze Squid's requirements. The most important factors that can either make or break this utility's performance are memory and available disk space. Processor speed isn't that important, but cannot be neglected either. Any decent processor that delivers an up-to-par operating system performance under your OS should be all right (Linux/Windows).
To answer the memory and disk-space related relationship, we're going to quote the creator of Squid, the author of the book Squid: The Definitive Guide. Check below:
"As a rule of thumb, you need 32 MB of memory for each GB of disk space. [...] I tell people to build a system with enough disk space to hold 3-7 days worth of web traffic. For example, if your users consume 1 Mbps (HTTP and FTP traffic only) for 8 hours per day, that's about 3.5 GB per day. So, I'd say you want between 10 and 25 GB of disk space for each Mbps of web traffic." ~ by Duane Wessels, from the book, chapter 1.3
However, these are just broad guidelines and shouldn't be taken for granted. You can certainly try Squid on your main server and see for yourself how it works. Chances are that most of today's servers can satisfy these needs. Then, of course, comes the configuration part, which is once again really critical. Having a well-secured but also optimized installation of Squid is crucial. Now let's check out its major features.
Next: Squid's Major Functions >>
More Server Administration Articles
More By Barzan 'Tony' Antal