From c84b9ef7a694716ef3b7fa31efa9157153d2cb6c Mon Sep 17 00:00:00 2001 From: Tom Arnfeld Date: Mon, 11 Aug 2014 14:08:16 +0100 Subject: [PATCH] Updated the README with details of TTLs --- README.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ac3ecc3..738802e 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,11 @@ An authoritative DNS nameserver that queries an [etcd](http://github.com/coreos/ - Delegation via `NS` and `SOA` records - `SRV` and `PTR` for service discovery and reverse domain lookups - Multiple resource records of different types per domain (where valid) -- Runtime and application metrics are captured regularly for monitoring (stdout or grahite) - Support for wildcard domains - -#### Coming Soon - -- Support for configurable TTLs on a per-record basis (currently everything has a TTL of 0) -- Support for zone transfers (`AXFR`), though enabling these would be on a short-lived basis -- Better error handling ([see #10](https://github.com/duedil-ltd/discodns/issues/10)) +- Support for TTLs + - Global default on all records + - Individual TTL values for individual records +- Runtime and application metrics are captured regularly for monitoring (stdout or grahite) #### Production Readyness @@ -196,6 +193,21 @@ Only a select few of record types are supported right now. These are listed here - `PTR` - `SRV` +### TTLs (Time To Live) + +You can configure discodns with a default TTL (the default default is `300` seconds) using the `--default-ttl` command line option. This means every single DNS resource record returned will have a TTL of the default value, unless otherwise specified on a per-record basis. + +To change the TTL of any given record, you can use the `.ttl` suffix. For example, to use a TTL of 60 minutes for the `discodns.net.` A record, the database might look like this... + +- `/net/discodns/.A -> 10.1.1.1` +- `/net/discodns/.A.ttl -> 18000` + +If you have multiple nested records, you can still use the suffix. In this example, the record identified by `foo` will use the default TTL, and `bar` will use the specified TTL of 60 minutes. + +- `/net/discodns/.TXT/foo -> foo` +- `/net/discodns/.TXT/bar -> bar` +- `/net/discodns/.TXT/bar.ttl -> 18000` + ### Value storage formats All records in etcd are, of course, just strings. Most record types only require simple string values with no special considerations, except their natural constraints and types within DNS (valid IP addresses, for example)