varnishlog output column meaning
Tung Nguyen
tnguyen at bleacherreport.com
Sun Mar 22 22:41:56 CET 2009
I take that back, I needed to add all of these to vcl_fetch to get the rails
app to cache via varnish..
sub vcl_fetch {
unset obj.http.set-cookie;
unset obj.http.expires;
set obj.ttl = 1m;
deliver;
}
Tung
On Sun, Mar 22, 2009 at 2:22 PM, Tung Nguyen <tnguyen at bleacherreport.com>wrote:
> Hey guys,
>
> Adding this, to the simple.vcl config enabled caching in the app #2.
>
> sub vcl_fetch {
> unset obj.http.set-cookie; # NEED TO DELETE COOKIE ON THE FETCH ALSO?
> unset obj.http.expires;
> set obj.ttl = 1m;
> }
>
>
> https://gist.github.com/ca5ef043fdfb89a5b143
>
>
> Why do I need to delete the cookie on the vcl_fetch so varnish will
> actually cache..?
>
> Thanks in advanced again,
> Tung
>
>
> On Sun, Mar 22, 2009 at 4:11 AM, Tung Nguyen <tnguyen at bleacherreport.com>wrote:
>
>> Ic, Poul-Henning thank you!
>> Hey guys,
>>
>> Im still trying to get a handle how to debug these vcl rules best here..
>>
>> https://gist.github.com/ca5ef043fdfb89a5b143
>>
>> Ive got some simple tests set up, mainly based on
>> http://overstimulate.com/articles/varnish-getting-started
>>
>> With app #1 caching happens fine, but with app #2 with the same very
>> general vcl rules, I cant seem to get caching to work :(.
>>
>> There's a few questions at the end of the gist:
>> 1. Why isnt app #2 picking up the cache? I think maybe the rails app
>> returns a slighly
>> different header that could be causing a problem but I dont see anything
>> different in the
>> varnishlog output :(.
>> 2. Is there a way to check what is in the cache from the "telnet localhost
>> 6082" or anything
>> else, if I have the key, "/articles;feed?tag_id=16" in this case. Maybe
>> thats whats going on,
>> the data isnt being written into the cache...
>> 3. I also tried adding some C code (commented out) to maybe puts some
>> output out or writing to
>> a file (maybe through a system call could work too) to see which part of
>> the vcl chain Im
>> hitting. Whats a good way of doing that? This would be great to know how
>> to do so I can
>> check the vcl rules.
>>
>>
>> Thanks again and any responses are appreciated.
>> Tung
>>
>>
>> On Sun, Mar 22, 2009 at 2:08 AM, Poul-Henning Kamp <phk at phk.freebsd.dk>wrote:
>>
>>> In message <ca6364050903220201t1f50f65btd5b4904f5703f735 at mail.gmail.com>,
>>> Tung
>>> Nguyen writes:
>>> >Hey guys,
>>> >
>>> >In the the varnishlog output
>>> >
>>> >https://gist.github.com/8b163cc29fbd5e3141f6
>>> >
>>> >Where can I find out more info on what the columns mean,
>>> >So what does the 7 vs 10 mean in the first column?
>>> >What does the b vs c mean in the second column?
>>>
>>> The first column is a magic number for each transaction.
>>>
>>> This is what allows you collect all the messages that
>>> belong to the same transaction.
>>>
>>> For the time being, it is also the file descriptor number
>>> of the socket, but this is not guaranteed to always be the
>>> case.
>>>
>>> The 'b' means "backend transaction, and 'c' client side
>>> transaction.
>>>
>>> > 7 VCL_return c pass
>>> >10 BackendOpen b default 127.0.0.1 57141 0.0.0.0 3000
>>> > 7 Backend c 10 default default
>>> >10 TxRequest b HEAD
>>>
>>> --
>>> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
>>> phk at FreeBSD.ORG | TCP/IP since RFC 956
>>> FreeBSD committer | BSD since 4.3-tahoe
>>> Never attribute to malice what can adequately be explained by
>>> incompetence.
>>>
>>
>>
>>
>> --
>> Tung Nguyen, Lead Developer
>> Bleacher Report, The Open Source Sports Network
>> (510) 928-0475
>>
>
>
>
> --
> Tung Nguyen, Lead Developer
> Bleacher Report, The Open Source Sports Network
> (510) 928-0475
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20090322/3116f6dd/attachment-0001.html>
More information about the varnish-misc
mailing list