Leap Smear

On how Google deals with leap seconds:

The solution we came up with came to be known as the “leap smear.” We modified our internal NTP servers to gradually add a couple of milliseconds to every update, varying over a time window before the moment when the leap second actually happens. This meant that when it became time to add an extra second at midnight, our clocks had already taken this into account, by skewing the time over the course of the day. All of our servers were then able to continue as normal with the new year, blissfully unaware that a leap second had just occurred.

Good idea. The second itself is meaningless. Spreading it out is much better/easier than accommodating for it in the rest of your stack.

Tags: , , ,

Related Posts

Related Posts

2 Responses to “Leap Smear”

  1. Leaper says:

    A gradual smear is not required for most companies. Simply shutting off external NTP sometime before midnight and then advancing the internal NTP server by a second will suffice.

    The advance won’t cause any issues with time-based keys and such, and after the leap second comes around, the systems will again match world time.

  2. […] 3:20 – The NTP “Leap Smear“ […]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.