<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I've got our load balancer requesting a MySQL driven PHP page via
Apache and via Varnish.<br>
<br>
Every second, our load balancer probes a page on our site. This page
is set to "pass" through Varnish to Apache which then asks PHP to
check MySQL. If all is ok, the page returns the text "All checks
passed" - if that text isn't there within 0.5s (for example, Varnish
is unavailable, Apache is unavailable, MySQL is unavailable etc),
then that server is removed from our load balanced pool. If we do
maintenance, we just kill Varnish (our site is still accessible to
ourselves via port 8080 which the Apache port), bring Varnish back
up and then wait a couple of seconds for the load balancer to notice
the "All checks passed" text is being returned.<br>
<br>
Rich<br>
<br>
On 15/09/2010 15:55, Caunter, Stefan wrote:
<blockquote
cite="mid:7F0AA702B8A85A4A967C4C8EBAD6902C42C1F4@TMG-EVS02.torstar.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">If your load balancer can do a port 80 check (or
whatever port
you are using), you can block port 80 with pf to stop
traffic flow, do your
updating, and return it to service by unblocking the port.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">Stefan Caunter :: Senior Systems Administrator ::
TOPS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);">e: <a class="moz-txt-link-abbreviated" href="mailto:scaunter@topscms.com">scaunter@topscms.com</a> :: m: (416) 561-4871<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><a class="moz-txt-link-abbreviated" href="http://www.thestar.com">www.thestar.com</a> <a class="moz-txt-link-abbreviated" href="http://www.topscms.com">www.topscms.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<div style="border-right: medium none; border-width: 1pt medium
medium; border-style: solid none none; border-color: rgb(181,
196, 223) -moz-use-text-color -moz-use-text-color; padding:
3pt 0cm 0cm;">
<p class="MsoNormal"><b><span style="font-size: 10pt;
font-family: "Tahoma","sans-serif";"
lang="EN-US">From:</span></b><span style="font-size:
10pt; font-family:
"Tahoma","sans-serif";" lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:varnish-misc-bounces@varnish-cache.org">varnish-misc-bounces@varnish-cache.org</a>
[<a class="moz-txt-link-freetext" href="mailto:varnish-misc-bounces@varnish-cache.org">mailto:varnish-misc-bounces@varnish-cache.org</a>] <b>On
Behalf Of </b>Mohan Rao<br>
<b>Sent:</b> September-15-10 9:26 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<b>Subject:</b> Probing to see if Varnish is Alive.<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Is there a way to probe a varnish server
to see if it is
alive ? We have a couple of varnish servers that are load
balanced. We would
like the load balancer to stop sending traffic to a
particular varnish server
if we are updating that server. Is there a recommended way
to do this ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks & Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Mohan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
varnish-misc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a>
<a class="moz-txt-link-freetext" href="http://lists.varnish-cache.org/mailman/listinfo/varnish-misc">http://lists.varnish-cache.org/mailman/listinfo/varnish-misc</a></pre>
</blockquote>
<br>
</body>
</html>