[dns-operations] Recommended zone serial number format for over 100 changes / day

Mark Andrews marka at isc.org
Thu Mar 31 11:57:17 UTC 2016

In message <CAHW=2z7rNcZjCBru_NyaWPE_iE=s8ArdJQDjWGSn9QAXDQ2+PQ at mail.gmail.com>, Roy Hooper writes:
> Even with thousands of updates a day, and 86400 seconds per day, there's
> plenty of headroom to handle same-second updates when they do happen...
> One approach is to use this pseudocode:
> if time() > current_serial:
>    new_serial = time()
> else:
>    new_serial = serial + 1
> This handles both clock rewind scenarios (that never happens in the real
> world...) as well as multiple updates in the same second.
> It also simply becomes a counter if you have over 86400 updates/day,
> although in that case the suggestion to just use a counter makes more sense
> so you can start at 1.

We do all that.  note the above code has a race condition in it.
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org

More information about the dns-operations mailing list