Pinboard (jm)
https://pinboard.in/u:jm/public/
recent bookmarks from jmLeap Smear | Public NTP | Google Developers2017-01-04T23:14:54+00:00
https://developers.google.com/time/smear
jmgoogle clocks time ntp leap-smearing leap-second opshttps://pinboard.in/https://pinboard.in/u:jm/b:102ddfaef4da/How and why the leap second affected Cloudflare DNS2017-01-03T13:23:43+00:00
https://blog.cloudflare.com/how-and-why-the-leap-second-affected-cloudflare-dns/
jmThe root cause of the bug that affected our DNS service was the belief that time cannot go backwards. In our case, some code assumed that the difference between two times would always be, at worst, zero. RRDNS is written in Go and uses Go’s time.Now() function to get the time. Unfortunately, this function does not guarantee monotonicity. Go currently doesn’t offer a monotonic time source.
So the clock went "backwards", s1 - s2 returned < 0, and the code couldn't handle it (because it's a little known and infrequent failure case).
Part of the root cause here is cultural -- Google has solved the leap-second problem internally through leap smearing, and Go seems to be fundamentally a Google product at heart.
The easiest fix in general in the "outside world" is to use "ntpd -x" to do a form of smearing. It looks like AWS are leap smearing internally (https://aws.amazon.com/blogs/aws/look-before-you-leap-the-coming-leap-second-and-aws/), but it is a shame they aren't making this a standard part of services running on top of AWS and a feature of the AWS NTP fleet.]]>ntp time leap-seconds fail cloudflare rrdns go golang dns leap-smearing ntpd awshttps://pinboard.in/https://pinboard.in/u:jm/b:3c7fbbfbf19d/