<div dir="ltr"><div>Thank, I think I get it now. How about:</div><div><br></div><div style="margin-left:40px"><span style="font-size:12px;display:inline;background-color:rgb(255,255,255);font-family:monospace">backend
theBackend none;</span></div><div><br></div><div>Here's the relevant documentation: <a href="https://varnish-cache.org/docs/trunk/users-guide/vcl-backends.html#the-none-backend">https://varnish-cache.org/docs/trunk/users-guide/vcl-backends.html#the-none-backend</a></div><div>It was added in 6.4.</div><div><br></div><div>Hope that helps.<br></div><div><br></div><div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div><div>Guillaume Quintard<br></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 19, 2023 at 1:36 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="msg-5745895346908820217">
<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)">
Hi <span style="font-family:Calibri,sans-serif;font-size:14.6667px;display:inline;background-color:rgb(255,255,255)">
Guillaume</span>,</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)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)">> I'm curious,
if it's completely deactivated what's the benefit of having it in the vcl?</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)">It is only
intended to be deactivated in production (until we go live). Our test and staging environments have the backend active.</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
> if (false) {
<div>> set req.backend_hint = you_deactivated_backend;</div>
> }<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)">Thanks,
I will test this. </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)">My current
prod-specific setup for this backend looks like this:</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)">backend
theBackend {
<div> .host = "localhost";</div>
<div> .port = "9999";</div>
<div> .probe = {</div>
<div> .interval = 1h;</div>
<div> }</div>
}<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="font-size:12px;display:inline;background-color:rgb(255,255,255)">This
seems to be working when testing it locally. It also solves the problem of having to assign some arbitrary ip or hostname (the actual backend host for this service hasn't been created in production yet, since we are several months away from go live), which
actually was our main problem. What do you think about this approach instead? Preferably this would be a built in feature in Varnish, with a setting "disabled = true" or similar in the backend definition, and then it would not require any host or ip to be
configured.</span></div>
<div id="m_-5745895346908820217appendonsend"></div>
<div>
<div>
<div><br>
</div>
</div>
</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>