<div dir="ltr"><div>The fact the IPs are identical is weird, but I wouldn't be surprised if the dns entry actually contained 3 identical IPs.</div><div><br></div><div>> Shouldn't Varnish be able to figure out that in that case it can just choose any one and it will work as expected?</div><div><br></div><div>Shouldn't your DNS entries be clean? ;-)</div><div><br></div><div>Honestly, if the IP(s) behind the service name is liable to change, you shouldn't use a dynamic backend because Varnish resolves the IP when the VCL is loaded, so if the IP changes behind your back, Varnish won't follow it, and you'll be screwed.</div><div>Instead, you should use dynamic backends, of which there are a handful:</div><div>- <a href="https://github.com/nigoroll/libvmod-dynamic">dynamic</a>, by UPLEX: it's been around for ages, it's battle-tested, and it's included in the <a href="https://hub.docker.com/_/varnish">oficial Varnish Docker image</a><br></div><div>- <a href="https://docs.varnish-software.com/varnish-enterprise/vmods/udo/#subscribe">udo+activedns</a>, by Varnish Software: the design is slightly different and allows you to specify pretty much any load-balancing policy you might need. You'll need a subscription but you'll get excellent support (disclaimer, I'm an ex employee)</div><div>- <a href="https://github.com/gquintard/vmod_reqwest#backend-https-following-up-to-5-redirect-hops-and-brotli-auto-decompression">reqwest</a>, by yours truly: the interface focuses on providing a simple experience and a few bells and whistles (HTTPS, HTTP2, brotli, following redirects)<br></div><div><br></div><div>As you can see, the static backend's reluctance to fully handle DNS has been a fertile ground for vmods :-)<br></div><div><br></div><div>-- <br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Guillaume Quintard<br></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 19, 2023 at 1:49 AM Batanun B <<a href="mailto:batanun@hotmail.com">batanun@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg1361981827130200355">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
All of the sudden Varnish fails to start in my development environment, and gives me the following error message:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Message from VCC-compiler:
<div>Backend host "redacted-hostname": resolves to too many addresses.</div>
<div>Only one IPv4 and one IPv6 are allowed.</div>
<div>Please specify which exact address you want to use, we found all of these:</div>
<div> 555.123.123.3:80</div>
<div> 555.123.123.3:80</div>
555.123.123.3:80<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I have changed the hostname and the IP above to not expose our server, but all three IP numbers are 100% identical. Shouldn't Varnish be able to figure out that in that case it can just choose any one and it will work as expected? It really should remove duplicates,
and only if there are more than one non-duplicate IP then it should fail.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
The problem is that the backend host is a so called "app service" in Microsoft Azure, which is basically a platform as a service (PaaS), where Microsoft handles the networking including the domain name (no user access it directly). I have no idea why it suddenly
resolves to multiple duplicate IPs.</div>
</div>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></blockquote></div>