From 8a188e23d9d22796b20f962e16700e78a214787b Mon Sep 17 00:00:00 2001 From: Alvaro Saurin Date: Fri, 29 May 2015 12:44:41 +0200 Subject: [PATCH] Documented the '--ttl' argument --- site/weavedns.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/site/weavedns.md b/site/weavedns.md index 23684eab..8d5f7095 100644 --- a/site/weavedns.md +++ b/site/weavedns.md @@ -134,7 +134,7 @@ Notice how the ping reaches different addresses. WeaveDNS removes the addresses of any container that dies. This offers a simple way to implement redundancy. E.g. if in our example we stop one of the `pingme` containers and re-run the ping tests, eventually -(within ~30s at most, since that is the weaveDNS cache expiry time) we +(within ~30s at most, since that is the weaveDNS [cache expiry time](#ttl)) we will only be hitting the address of the container that is still alive. @@ -179,6 +179,25 @@ to the container args: $ weave launch-dns 10.2.254.1/24 --watch=false ``` +## Using a different TTL value + +By default, weaveDNS specifies a TTL of 30 seconds in any reply sent to +another peer. Peers will honor the TTL received and cache the answer +until it is considered invalid. + +However, you can force a different TTL value by launching weaveDNS with +the `--ttl` argument: + +```bash +$ weave launch-dns 10.2.254.1/24 --ttl=10 +``` + +This will shorten the lifespan of answers sent to other peers, +so you will be effectively reducing the probability of them having stale +information, but you will also be increasing their resolution times (as +their cache hit rate will be reduced) and the number of request this +weaveDNS instance will receive. + ## Configuring the domain search paths If you don't supply a domain search path (with `--dns-search=`),