<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 07:10:53 Thursday, 22 August 2013 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.b5106d6a-14db-4c5e-b594-6a7a4117503b {
        MARGIN: 0cm 0cm 0pt
}
LI.b5106d6a-14db-4c5e-b594-6a7a4117503b {
        MARGIN: 0cm 0cm 0pt
}
DIV.b5106d6a-14db-4c5e-b594-6a7a4117503b {
        MARGIN: 0cm 0cm 0pt
}
TABLE.b5106d6a-14db-4c5e-b594-6a7a4117503bTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<p class="b5106d6a-14db-4c5e-b594-6a7a4117503b"></p>
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The <a href="https://www.varnish-cache.org/docs/3.0/reference/vcl.html#the-dns-director">
Varnish Reference Manual</a> suggests that the DNS director can be used with a hostname that resolves to multiple IP addresses,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt"><i>“DNS round robin balancing is supported. If a hostname resolves to multiple backends, the director will divide the traffic between all of them in a round-robin manner.”<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And I believe the following is the correct VCL to implement this,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">director test dns {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">     {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">           .backend = {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">                .host = "hostname.with.multiple.ips";<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">           }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">     }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">     .ttl = 10s;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">}<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, on compilation Varnish complains,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Backend host "hostname.with.multiple.ips": resolves to multiple IPv4 addresses.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Only one address is allowed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Please specify which exact address you want to use, we found these:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        xxx.xxx.xxx.xxx<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">        xxx.xxx.xxx.xxx<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Having looked at the source code in vcc_dir_dns.c and vcc_backend.c, it seems that the hostname associated with a
<span style="font-family:"Courier New"">.host</span> object can never resolve to more than one IP address, so it’s not clear how the functionality described in the Reference Manual can be achieved.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I think this may be a bug, can you help please?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB">Tim Harrison</span><o:p></o:p></p>
</div>
<p></p>
<p class="b5106d6a-14db-4c5e-b594-6a7a4117503b"> </p>
<p class="b5106d6a-14db-4c5e-b594-6a7a4117503b">----------------------------<br>
<font size="3" face="Times New Roman"><font size="3" face="Times New Roman"><font size="3" face="Times New Roman"><br>
<font size="3" face="Times New Roman"><a href="http://www.bbc.co.uk" target="_blank">http://www.<span class="il">bbc</span>.<span class="il">co</span>.<span class="il">uk</span></a><br>
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the
<span class="il">BBC</span> unless specifically stated.<br>
If you have received it in error, please delete it from your system.<br>
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br>
Please note that the <span class="il">BBC</span> monitors e-mails sent or received.<br>
Further communication will signify your consent to this.</font></font></font></font></p>
<p class="b5106d6a-14db-4c5e-b594-6a7a4117503b">---------------------</p>
</body>
</html>