[Varnish] #1334: DNS Director with hostname resolving to multiple IPs is not possible

Varnish varnish-bugs at varnish-cache.org
Wed Aug 28 17:34:22 CEST 2013


#1334: DNS Director with hostname resolving to multiple IPs is not possible
--------------------------------+--------------------
 Reporter:  timrh               |       Type:  defect
   Status:  new                 |   Priority:  normal
Milestone:                      |  Component:  build
  Version:  3.0.3               |   Severity:  normal
 Keywords:  dns director .host  |
--------------------------------+--------------------
 The [https://www.varnish-cache.org/docs/3.0/reference/vcl.html#the-dns-
 director Varnish Reference Manual] 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:
         xxx.xxx.xxx.xxx
         xxx.xxx.xxx.xxx
 }}}

 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.

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1334>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list