Re: [squid-users] Re: How to use tcp_outgoing_address with cache_peer

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Wed, 01 May 2013 09:37:17 -0600

On 05/01/2013 03:42 AM, Amos Jeffries wrote:
> On 1/05/2013 10:21 a.m., babajaga wrote:
>> Am I correct in the following:
>> The selection of one of the 2 cache_dirs is not deterministic for same URL
>> at different times, both for round-robin or least load.

The selection of a cache_dir to _store_ a new object may indeed be
nondeterministic in this sense.

>> Which might have the consequence of generating a MISS, although the
>> object ist cached in the other cache_dir.

The selection of a disk to _load_ a cached object is always
deterministic. The cached object will be found and loaded from the
correct cache_dir.

> Your whole chain of logic above depends on the storage areas (cache_dir)
> being separate entities. This is a false assumption. They are only
> separate to the operating system. They are merged into a collective
> "cache" index model in Squid memory - a single lookup to this unified
> store indexing system finds the object no matter where it is (disk or
> local memory) with the same HIT/MISS result based on whether it exists
> *anywhere* in at least one of the storage areas.

Amos description is correct on a high level, but, just to avoid any
future wrong assumptions, modern Squid may use separate indexes for some
cache_dirs and do separate lookups in those cache_dir indexes. However,
the resulting lookup speed is probably almost the same and a "cached
object will be found at the right disk" principle still applies, which
is all that matters for this high-level discussion.

HTH,

Alex.
Received on Wed May 01 2013 - 15:37:28 MDT

This archive was generated by hypermail 2.2.0 : Thu May 02 2013 - 12:00:03 MDT