Search squid archive

Re: Caching dynamic content, trading between HTTP versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/04/2013 10:45 p.m., Andrea Aime wrote:
Thanks for the prompt reply. Comments inline.

On Tue, Apr 30, 2013 at 12:21 PM, Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote:
So basically, we need the cache to talk HTTP 1.1 with the webapp.

Both If-Modified-Since and If-None-Modified are optional features. There is
no requirement in HTTP for any of the client, gateway or server to use
either of them.
Yes, that was my understanding as well. However, I thought major browsers
support them, and assumed (wrongly it seems) that Squid would also support them.
By your mail it seems Squid does not support validation towards the dynamic
webapp via If-None-Modified.
Out of curiosity, does it support If-Modified-Since instead?

This all depends on your definition of "support"...

Squid will accept If-None-Match from clients and validate cached content using it, as well as passing it on if necessary to upstream servers. What Squid is missing is _generating_ the header if it is not supplied by the client.

Yes Squid supports both client-supplied and Squid-generated If-Modified-Since headers.



So far so good. Now enter a second level of caching, a CDN made with
cloudfront,
and here is the gotcha: cloudfront only supports HTTP 1.0 requests towards
the
origin, which in this case would be Squid.

That is unfortunate. A missing feature in CloudFront. Even more
unfortunately it coincides with Squid missing the same feature ...
Unfortunately CloudFront is not open source, so nothing I can do about it:
http://aws.amazon.com/cloudfront/
(besides eventually looking into another CDN solution)

I'm a litte surprised to hear that they are omitting If-None-Match, I would have expected that they at least pass on the browser supplied headers like Squid does. That is trivial to support and has good benefits for caching.


Any other suggestion about how this could be handled?

Adding the If-None-Modified feature to either CloudFront or Squid is

Arg. Sorry. I meant If-None-Match there.

probably a good solution. I believe measurement-factory.com have a project
underway to add it to Squid. You may want to contact Alex there about
getting access or sponsoring further progress.
Thanks for letting me know.
However, would it do me any good if CloudFront does not support
If-None-Modified?

... and yes it sounds like exactly what you need.

Amos




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux