Ignoring health checks in statistics
Frank Gruellich
frank.gruellich at mapsolute.com
Thu Apr 1 14:20:23 CEST 2010
Hi,
okay, I'll have to see if I can make our load balancer to consider an
HTTP 404 as healthy... Or could I simple say error 200 "I am OK"?
Can I make this dependent on the health of my backend? Would something
like this
sub vcl_recv
{
set req.backend = my_backend;
if (req.url = "/static.txt")
{
if (req.backend.healthy)
{
error 200 "I am OK";
}
else
{
error 404 "I am not OK";
}
}
}
work and still not have that counted in statistics?
Kind regards,
Frank.
On 03/23/10 14:11, Caunter, Stefan wrote:
> Just put this in sub vcl_recv
>
> else {
> error 404 "I am OK";
> }
>
>
> Stefan Caunter :: Senior Systems Administrator :: TOPS
> e: scaunter at topscms.com :: m: (416) 561-4871
> www.thestar.com www.topscms.com
>
> -----Original Message-----
> From: varnish-dev-bounces at varnish-cache.org
> [mailto:varnish-dev-bounces at varnish-cache.org] On Behalf Of Frank
> Gruellich
> Sent: March-23-10 7:03 AM
> To: varnish-dev at varnish-cache.org
> Subject: Ignoring health checks in statistics
>
> Hi,
>
> we have two Varnish instances and a load balancer in front. The load
> balancer periodically polls the varnishd's for a static file (lying also
> at all the backend servers) to check if varnishd is still working. It
> does that once per second. This completely messes up statistics like
> hit ratio because that static file is served from cache all the time, so
> currently our hit ratio is close to 99.9%. I would like to have counted
> this specific file neither as miss nor hit, but just serve it and ignore
> it otherwise. It doesn't even need to be logged.
>
> haproxy has an option monitor-net where you can specify that it does not
> need to log requests from that subnet. Does varnish offer a similar
> option? Or is there some cool VCL snippet I could add?
>
> Thanks in advance.
>
> Kind regards,
> --
> Navteq (DE) GmbH
> Frank Gruellich
> Map24 Systems and Networks
>
> Duesseldorfer Strasse 40a
> 65760 Eschborn
> Germany
>
> Phone: +49 6196 77756-414
> Fax: +49 6196 77756-100
>
> HRB 46215, Local Court Frankfurt am Main Managing Directors: Thomas
> Golob, Hans Pieter Gieszen, Martin Robert Stockman
> USt-ID-No.: DE 197947163
>
>
>
>
Mit freundlichen Gruessen,
Kind regards,
--
Navteq (DE) GmbH
Frank Gruellich
Map24 Systems and Networks
Duesseldorfer Strasse 40a
65760 Eschborn
Germany
Phone: +49 6196 77756-414
Fax: +49 6196 77756-100
HRB 46215, Local Court Frankfurt am Main
Managing Directors: Thomas Golob, Hans Pieter Gieszen, Martin Robert Stockman
USt-ID-No.: DE 197947163
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20100401/55d64a25/attachment-0003.pgp>
More information about the varnish-dev
mailing list