Caching issue
Shain Miley
smiley at npr.org
Mon Mar 10 23:41:11 CET 2008
Here is the output from an original request...nothing is cached at this
point..I hope it has the backend info you need. I started
varnish...requested index.html from firefox, stopped varnish to clear
it's cache, then requested index.html from IE...here are the results
(varnishlog > file_name).
PS...thank you to everyone who is giving up some of their time to give
me hand...
FIREFOX:
0 CLI Rd ping
0 CLI Wr 0 200 PONG 1205188277
12 SessionOpen c 172.30.4.23 50780
12 ReqStart c 172.30.4.23 50780 1501045688
12 RxRequest c GET
12 RxURL c /index.html
12 RxProtocol c HTTP/1.1
12 RxHeader c Host: server1.npr.org:8080
12 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
12 RxHeader c Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
12 RxHeader c Accept-Language: en-us,en;q=0.5
12 RxHeader c Accept-Encoding: gzip,deflate
12 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
12 RxHeader c Keep-Alive: 300
12 RxHeader c Connection: keep-alive
12 RxHeader c
12 VCL_call c recv
12 VCL_return c lookup
12 VCL_call c hash
12 VCL_return c hash
12 VCL_call c miss
12 VCL_return c fetch
15 BackendClose default
15 BackendOpen b default 172.1.1.2 36260 172.1.1.2 80
15 BackendXID b 1501045688
12 Backend c 15 default
15 TxRequest b GET
15 TxURL b /index.html
15 TxProtocol b HTTP/1.1
15 TxHeader b Host: server1.npr.org:8080
15 TxHeader b User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
15 TxHeader b Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
15 TxHeader b Accept-Language: en-us,en;q=0.5
15 TxHeader b Accept-Encoding: gzip,deflate
15 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
15 TxHeader b
15 TxHeader b X-Varnish: 1501045688
15 TxHeader b X-Forwarded-for: 172.30.4.23
15 RxProtocol b HTTP/1.1
15 RxStatus b 200
15 RxResponse b OK
15 RxHeader b Date: Mon, 10 Mar 2008 22:31:17 GMT
15 RxHeader b Server: Apache
15 RxHeader b Last-Modified: Mon, 10 Mar 2008 22:14:00 GMT
15 RxHeader b ETag: "11cbc-8553fa00"
15 RxHeader b Accept-Ranges: bytes
15 RxHeader b Cache-Control: max-age=0
15 RxHeader b Expires: Mon, 10 Mar 2008 22:31:17 GMT
15 RxHeader b Vary: Accept-Encoding
15 RxHeader b Content-Encoding: gzip
15 RxHeader b Content-Length: 17243
15 RxHeader b Content-Type: text/html
12 ObjProtocol c HTTP/1.1
12 ObjStatus c 200
12 ObjResponse c OK
12 ObjHeader c Date: Mon, 10 Mar 2008 22:31:17 GMT
12 ObjHeader c Server: Apache
12 ObjHeader c Last-Modified: Mon, 10 Mar 2008 22:14:00 GMT
12 ObjHeader c ETag: "11cbc-8553fa00"
12 ObjHeader c Cache-Control: max-age=0
12 ObjHeader c Expires: Mon, 10 Mar 2008 22:31:17 GMT
12 ObjHeader c Vary: Accept-Encoding
12 ObjHeader c Content-Encoding: gzip
12 ObjHeader c Content-Type: text/html
15 BackendReuse b default
12 TTL c 1501045688 RFC 0 1205188277 1205188277 1205188277 0 0
12 VCL_call c fetch
12 TTL c 1501045688 VCL 7200 1205188278
12 VCL_return c insert
12 Length c 17243
12 VCL_call c deliver
12 VCL_return c deliver
12 TxProtocol c HTTP/1.1
12 TxStatus c 200
12 TxResponse c OK
12 TxHeader c Server: Apache
12 TxHeader c Last-Modified: Mon, 10 Mar 2008 22:14:00 GMT
12 TxHeader c ETag: "11cbc-8553fa00"
12 TxHeader c Cache-Control: max-age=0
12 TxHeader c Expires: Mon, 10 Mar 2008 22:31:17 GMT
12 TxHeader c Vary: Accept-Encoding
12 TxHeader c Content-Encoding: gzip
12 TxHeader c Content-Type: text/html
12 TxHeader c Content-Length: 17243
12 TxHeader c Date: Mon, 10 Mar 2008 22:31:17 GMT
12 TxHeader c X-Varnish: 1501045688
12 TxHeader c Age: 0
12 TxHeader c Via: 1.1 varnish
12 TxHeader c Connection: keep-alive
12 ReqEnd c 1501045688 1205188277.778860092
1205188277.822711945 0.000495195 0.008096933 0.035754919
IE:
0 WorkThread 0x69a4d1b0 start
12 SessionOpen c 172.30.4.50 4319
12 ReqStart c 172.30.4.50 4319 1501045670
12 RxRequest c GET
12 RxURL c /index.html
12 RxProtocol c HTTP/1.1
12 RxHeader c Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
12 RxHeader c Accept-Language: en-us
12 RxHeader c UA-CPU: x86
12 RxHeader c Accept-Encoding: gzip, deflate
12 RxHeader c If-Modified-Since: Mon, 10 Mar 2008 21:33:26 GMT
12 RxHeader c If-None-Match: "11bd4-f4401580"
12 RxHeader c User-Agent: Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
12 RxHeader c Host: server1.npr.org:8080
12 RxHeader c Connection: Keep-Alive
12 RxHeader c Cookie: v1st=FB94D3E930840FF1;
GUID=000CD0009ECB070B15D1037761626364
12 VCL_call c recv
12 VCL_return c lookup
12 VCL_call c hash
12 VCL_return c hash
12 VCL_call c miss
12 VCL_return c fetch
15 BackendOpen b default 172.1.1.2 35345 172.1.1.2 80
15 BackendXID b 1501045670
12 Backend c 15 default
15 TxRequest b GET
15 TxURL b /index.html
15 TxProtocol b HTTP/1.1
15 TxHeader b Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
15 TxHeader b Accept-Language: en-us
15 TxHeader b UA-CPU: x86
15 TxHeader b Accept-Encoding: gzip, deflate
15 TxHeader b User-Agent: Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
15 TxHeader b Host: server1.npr.org:8080
15 TxHeader b Cookie: v1st=FB94D3E930840FF1;
GUID=000CD0009ECB070B15D1037761626364
15 TxHeader b X-Varnish: 1501045670
15 TxHeader b X-Forwarded-for: 172.30.4.50
15 RxProtocol b HTTP/1.1
15 RxStatus b 200
15 RxResponse b OK
15 RxHeader b Date: Mon, 10 Mar 2008 22:29:20 GMT
15 RxHeader b Server: Apache
15 RxHeader b Last-Modified: Mon, 10 Mar 2008 22:14:00 GMT
15 RxHeader b ETag: "11cbc-8553fa00"
15 RxHeader b Accept-Ranges: bytes
15 RxHeader b Cache-Control: max-age=0
15 RxHeader b Expires: Mon, 10 Mar 2008 22:29:20 GMT
15 RxHeader b Vary: Accept-Encoding
15 RxHeader b Content-Encoding: gzip
15 RxHeader b Content-Length: 17243
15 RxHeader b Content-Type: text/html
12 ObjProtocol c HTTP/1.1
12 ObjStatus c 200
12 ObjResponse c OK
12 ObjHeader c Date: Mon, 10 Mar 2008 22:29:20 GMT
12 ObjHeader c Server: Apache
12 ObjHeader c Last-Modified: Mon, 10 Mar 2008 22:14:00 GMT
12 ObjHeader c ETag: "11cbc-8553fa00"
12 ObjHeader c Cache-Control: max-age=0
12 ObjHeader c Expires: Mon, 10 Mar 2008 22:29:20 GMT 12
VCL_call c fetch
12 TTL c 1501045670 VCL 7200 1205188160
12 VCL_return c insert
12 Length c 17243
12 VCL_call c deliver
12 VCL_return c deliver
12 TxProtocol c HTTP/1.1
12 TxStatus c 200
12 TxResponse c OK
12 TxHeader c Server: Apache
12 TxHeader c Last-Modified: Mon, 10 Mar 2008 22:14:00 GMT
12 TxHeader c ETag: "11cbc-8553fa00"
12 TxHeader c Cache-Control: max-age=0
12 TxHeader c Expires: Mon, 10 Mar 2008 22:29:20 GMT
12 TxHeader c Vary: Accept-Encoding
12 TxHeader c Content-Encoding: gzip
12 TxHeader c Content-Type: text/html
12 TxHeader c Content-Length: 17243
12 TxHeader c Date: Mon, 10 Mar 2008 22:29:20 GMT
12 TxHeader c X-Varnish: 1501045670
12 TxHeader c Age: 0
12 TxHeader c Via: 1.1 varnish
12 TxHeader c Connection: keep-alive
12 ReqEnd c 1501045670 1205188160.207285881
1205188160.217762947 0.000722885 0.010413170 0.000063896
12 ObjHeader c Vary: Accept-Encoding
12 ObjHeader c Content-Encoding: gzip
12 ObjHeader c Content-Type: text/html
15 BackendReuse b default
12 TTL c 1501045670 RFC 0 1205188160 1205188160 1205188160 0 0
Dag-Erling Smørgrav wrote:
> "Shain Miley" <SMiley at .org> writes:
>
>> The output from below is a result of 'varnishlog > log.file'.
>> According to the man page if I don't use '-b' or '-c' both are
>> assumed.
>>
>
> Best practice for Varnish logging is to store the raw log data in a file
> which can later be read back by varnishlog and varnishncsa.
>
>
>> I don't know why any of the logging would be missing? Am I missing
>> somthing?
>>
>
> The backend traffic is missing; I can't tell why since I don't know
> precisely what you did.
>
>
>> In terms of the 'different Accept-Encoding header ' being set by the
>> other browser..do you mean the 'Vary' header?
>>
>
> No. The client sends Accept-*, the server sends Vary. The Vary header
> tells Varnish which of the Accept-* headers are relevant.
>
>
>> The reason I ask is because both set Accept-Encoding to 'gzip:deflate'
>> so they are the same there.
>>
>
> No, they aren't. Look closer.
>
>
>> If it is the result of 'Vary' can I simply remove that header and
>> achive what I am looking for?
>>
>
> Not unless you also strip any incoming Accept* headers.
>
>
>> I would also like to know if anyone knows how I can better debug the
>> hash that is being created...ie...I would like you know exaclty what
>> information is being used in it's creation, so I can get to a plcae
>> really where only the url is being used as the hash...
>>
>
> The way your vcl_hash is set up only the URL is being used in the hash.
> Vary support cannot be implemented correctly by just including it in the
> hash string, so it isn't.
>
> DES
>
More information about the varnish-dev
mailing list