duplicate StoreEntries?

From: Chengdu Huang <chuang@dont-contact.us>
Date: Thu, 17 Apr 2003 12:30:25 -0400 (EDT)

Hi, I have a question about Squid's behavior when it experiences huge
amount of client requests. Here's the scenario:

When Squid sees a client request asking for a URL, if there's no
existing StoreEntry available for this URL, it creates a new
StoreEntry which starts with a private key and nobody else can see
this StoreEntry. After the reply comes back from the origin server,
the StoreEntry might be set to public key depends on whether the reply
is cachable. But again, before that, no other request can see this
StoreEntry.

Those are my understandings of the code and here comes the question:
what if before the key is set to public Squid gets a lot of other
client requests all of which ask for the same URL? From the code, I
can't see anything special to handle this case and I guess Squid just
creates "duplicate" StoreEntries for this URL. Is that true? If so,
does Squid have multiple disk swap files for this URL too? and why
isn't that a problem?

Actually I did some experiments using httperf asking for a single file
with high request rate. Squid cache.log tells me storeCreateEntry got
called multiple times for the same URL.

Thanks a lot for your answers!

--
Chengdu
Received on Thu Apr 17 2003 - 15:17:18 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:41 MST