response time in varnishncsa

Ken Brownfield kbrownfield at google.com
Tue May 10 13:18:32 CEST 2011


Angelo's email address isn't valid anymore, so here's a patch against 2.1.5
for anyone interested in some extra fields.

The patch adds three fields to the end of the log line if you provide the -e
switch to varnishncsa:

   - long: Age in seconds
      - A 0 value doesn't necessarily mean it was a miss.
   - long: Hits; requires X-Hits header to be added in vcl_deliver():
      - set resp.http.X-Hits = obj.hits;
      - This doesn't seem to be available in the log, otherwise.
      - A 0 value means it was a miss.
   - float: Response time in seconds (resp-req)

Not heavily tested, v1.0, YMMV, etc., but it seems fine under load and
doesn't seem to leak.

I think adding LogFormat functionality (per the TODO) is the better
implementation, but that's outside the scope of my free time. ;)
-- 
kb



On Wed, Nov 3, 2010 at 07:10, Angelo Höngens <A.Hongens at netmatch.nl> wrote:

> >> -----Original Message-----
> >> From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-
> >> bounces at varnish-cache.org] On Behalf Of Angelo Höngens
> >> Sent: vrijdag 8 oktober 2010 13:35
> >> To: 'Varnish-misc'
> >> Subject: RE: response time in varnishncsa
> >>
> >> Havent seen anything on the list about this. I would also really like
> >> to see the time-taken field in the varnishnca log. And what I would
> >> want even more, is a field indicating hit/miss! I might even convince
> >> my boss to pay for the hours taken.
> >
> > -----Original Message-----
> > From: Angelo Höngens
> > Sent: zaterdag 23 oktober 2010 17:41
> > To: 'Poul-Henning Kamp (phk at phk.freebsd.dk)'
> > Subject: RE: response time in varnishncsa
> >
> > Poul-Henning,
> >
> > Just a quick question off-list: I really want the extra feature below
> > (2 extra fields in varnishncsa output).
> >
> > Would you be willing to do this for pay? I'm pretty sure I can get my
> > employer to pay for this feature. Don't know if you have any time, or
> > how many hours it would take you, but I was thinking about some fixed
> > price based on an initial estimate of your hours?
> >
> > Please let me know..
>
>
> Since PHK is not responding, is there anyone else that's interested in
> making a buck on this?
>
>
> --
>
>
> With kind regards,
>
>
> Angelo Höngens
>
> Systems Administrator
>
> ------------------------------------------
> NetMatch
> tourism internet software solutions
>
> Ringbaan Oost 2b
> 5013 CA Tilburg
> T: +31 (0)13 5811088
> F: +31 (0)13 5821239
>
> mailto:A.Hongens at netmatch.nl
> http://www.netmatch.nl
> ------------------------------------------
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110510/9ae6a758/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: varnishncsa_ext.patch
Type: application/octet-stream
Size: 2521 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110510/9ae6a758/attachment-0003.obj>


More information about the varnish-misc mailing list