correct RFC3484 address selection caveat (#2407)

and move it to a more prominent location

Fixes #1710
This commit is contained in:
Matthias Radestock authored and GitHub committed 2016-07-04 16:19:20 +01:00
1 parent 4216231ec7
commit 881e795db5
2 files changed
+8 -12

No files matched your search

-12
View File
@@ -17,18 +17,6 @@ When weaveDNS is queried for a name in the `.weave.local` domain, it
looks up the hostname in its memory database and responds with the IPs
of all containers for that hostname across the entire cluster.
###Basic Load Balancing and Fault Tolerance
WeaveDNS returns IP addresses in random order to facilitate basic
load balancing and failure tolerance. Most client side resolvers sort
the returned addresses based on reachability, and place local addresses
at the top of the list (see [RFC 3484](https://www.ietf.org/rfc/rfc3484.txt)).
For example, if there is container with the desired hostname on the local
machine, the application receives that container's IP address.
Otherwise, the application receives the IP address of a random
container with the desired hostname.
When weaveDNS is queried for a name in a domain other than
`.weave.local`, it queries the host's configured nameserver, which is
the standard behaviour for Docker containers.
@@ -33,6 +33,14 @@ PING pingme.weave.local (10.32.0.2) 56(84) bytes of data.
Notice how the ping reaches different addresses.
However, due to
[RFC 3484 address selection](https://tools.ietf.org/html/rfc3484#section-6)
most DNS resolver libraries prefer certain addresses over others, to
the point where in some circumstances the same address is always
chosen. To avoid this behaviour, applications may want to perform
their own address selection, e.g. by choosing a random entry from the
result of
[`getaddrinfo()`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html).
## <a name="fault-resilience"></a>Fault Resilience