DNS Director with hostname resolving to multiple IPs

Tim Harrison Tim.Harrison2 at bbc.co.uk
Thu Aug 22 20:10:52 CEST 2013


The Varnish Reference Manual<https://www.varnish-cache.org/docs/3.0/reference/vcl.html#the-dns-director> suggests that the DNS director can be used with a hostname that resolves to multiple IP addresses,

“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.”

And I believe the following is the correct VCL to implement this,

director test dns {
           .backend = {
                .host = "hostname.with.multiple.ips";
     .ttl = 10s;

However, on compilation Varnish complains,

Backend host "hostname.with.multiple.ips": resolves to multiple IPv4 addresses.
Only one address is allowed.
Please specify which exact address you want to use, we found these:

Having looked at the source code in vcc_dir_dns.c and vcc_backend.c, it seems that the hostname associated with a .host 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.

I think this may be a bug, can you help please?

Many thanks,

Tim Harrison


This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-bugs/attachments/20130822/9ec3c9b6/attachment.html>

More information about the varnish-bugs mailing list