Re: Status module – cache expiration, invalidation & poisoning.

Quintin Par quintinpar at gmail.com
Sun Oct 14 19:06:51 UTC 2012


Hi Antonio,

Can you help me a bit more? I have never written in lua

Say for every hit I want to hit a rrd proxy like this

echo "$location_url:1" | nc -w 1 -u host.com 8125

how do I go about doing this in lua?



On Sun, Oct 14, 2012 at 11:32 AM, António P. P. Almeida <appa at perusio.net>wrote:

> On 14 Out 2012 20h11 CEST, quintinpar at gmail.com wrote:
>
> > Hi all,
> >
> > I have a website that’s heavily cached – or intended to be heavily
> > cached via Nginx .
> >
> > But somehow looking at the page response time I feeling there is a
> > very high eviction/invalidation rate.
> >
> > Now is there way I can look at the cache status in Nginx for
> > different. I don’t use the purge module.
> >
> > The only way I check cache status is through
> >
> > add_header X-Cache-Status $upstream_cache_status;
> >
> > I want to o/p the cache status to a RRD tool and look at the
> > metrics.
> >
> > Is this possible?
>
>  With Lua shouldn't be that difficult. You just inspect the value of
>  $upstream_cache_status.
>
> ngx.var.upstream_cache_status paired with
> http://wiki.nginx.org/HttpLuaModule#ngx.location.capture
> to use a specific location to write to RRDtool.
>
> Just an idea,
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121014/831df0df/attachment.html>


More information about the nginx mailing list