[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-dev
Subject:    [PATCH] Fixes an issue in backend probe initialization that causes the default value of .initial to
From:       Dag Haavi Finstad <daghf () varnish-software ! com>
Date:       2013-02-21 9:50:51
Message-ID: CAEh05VY-QDR+XUPOy27eehEPaXs32p6iKjpXt1VkSJOWSqY9Ug () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


See attachment.

-- 
  <http://www.varnish-software.com>  *Dag Haavi Finstad*
Developer | Varnish Software AS
Phone: +47 21 98 92 60
We Make Websites Fly!

[Attachment #5 (text/html)]

<div dir="ltr">See attachment.<br clear="all"><div><div><br>-- <br><table \
style="font-style:normal;font-weight:normal;font-size:12px;line-height:1.5em;font-family:&#39;Helvetica \
Neue&#39;,Arial,sans-serif;color:#666666;width:550px;border-top:1px solid \
#eeeeee;border-bottom:1px solid \
#eeeeee;margin-top:20px;padding-top:5px;padding-bottom:5px" border="0" \
cellpadding="0" cellspacing="0">

<tbody><tr>
<td width="100">
<a href="http://www.varnish-software.com" target="_blank"><img \
src="http://www.varnish-software.com/static/media/logo-email.png" \
style="float:left;margin-left:10px"></a> </td>
<td>
<b style="font-size:14px;color:#222222">Dag Haavi Finstad</b><br> 
Developer | Varnish Software AS<br> Phone: +47 21 98 92 60<br><span \
style="font-weight:bold">We Make Websites Fly!</span></td> </tr>
</tbody></table>

</div></div></div>

--20cf30780cf09ee35604d6390255--


["probe-initial-default.patch" (application/octet-stream)]

From 13d1d0ff6aec9c76186009f1243e24255f0c9d66 Mon Sep 17 00:00:00 2001
From: Dag Haavi Finstad <daghf@varnish-software.com>
Date: Wed, 20 Feb 2013 14:24:46 +0100
Subject: [PATCH] Fixes an issue in backend probe initialization that causes
 the default value of .initial to equal .threshold.

The default for .initial is now .threshold - 1, meaning that the backend
starts up as sick and a single successful poll is required for it to be
considered healthy.

With the previous behaviour, a sick backend would not be considered sick
until after the initial polls exit the polling window.

Thanks to Colin Curtin.

Fixes: #1227
---
 bin/varnishd/cache/cache_backend_poll.c |    2 +-
 doc/sphinx/reference/vcl.rst            |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/varnishd/cache/cache_backend_poll.c b/bin/varnishd/cache/cache_backend_poll.c
index ab405f9..4780165 100644
--- a/bin/varnishd/cache/cache_backend_poll.c
+++ b/bin/varnishd/cache/cache_backend_poll.c
@@ -461,7 +461,7 @@ vbp_new_vcl(const struct vrt_backend_probe *p, const char *hosthdr)
 	if (vcl->probe.exp_status == 0)
 		vcl->probe.exp_status = 200;
 
-	if (vcl->probe.threshold == ~0U)
+	if (vcl->probe.initial == ~0U)
 		vcl->probe.initial = vcl->probe.threshold - 1;
 
 	if (vcl->probe.initial > vcl->probe.threshold)
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 731da16..3aec723 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -201,8 +201,10 @@ Probes take the following parameters:
   the backend healthy.
   Defaults to 3.
 .initial
-  How many of the probes are considered good when Varnish starts.
-  Defaults to the same amount as the threshold.
+  How many of the polls in .window are considered good when Varnish
+  starts.  Defaults to the value of threshold - 1. In this case, the
+  backend starts as sick and requires one poll to be considered
+  healthy.
 .expected_response
   The expected backend HTTP response code.
   Defaults to 200.
-- 
1.7.10.4



_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic