SS Sachin Singh On Software Engineering Radio - the podcast for professional software developers

“You can just add one second in one go, which is what Cloudflare did. At 23:59:59 the clock goes back, and the last second runs two times. Many software applications do not like time going back, because they are not anticipating that. At Cloudflare, the DNS was not equipped to handle this leap second, and that's what broke their DNS applications, which brings down most of the internet if your DNS is down.”

Software Engineering Radio - the podcast for professional software developers · Hands-On Engineering Podcasts · December 2026

“You can just add one second in one go, which is what Cloudflare did. At 23:59:59 the clock goes back, and the last second runs two times. Many software applications do not like time going back, because they are not anticipating that. At Cloudflare, the DNS was not equipped to handle this leap second, and that's what broke their DNS applications, which brings down most of the internet if your DNS is down.” — Sachin Singh, Software Engineering Radio - the podcast for professional software developers

Context

Asked how a leap second once caused an outage at Cloudflare, Sachin Singh explains the two ways a leap second can be added. He says many systems have since moved to smearing the extra second across the day.

Transcript

Software Engineering Radio - the podcast for professional software developers Around 12:16 into the episode
Sachin Singh

…stays the same after one second. So technically it has gone back like at 59.59 you're back to 590. So an application would not be ready to accept that how come the time has gone backwards and they would just start behaving in unpredictable ways and fail and then that can bring down your system.

Jason Davey

I see. Can you get a little bit more into detail about how that manifested in Cloudflare?

Sachin Singh

Yeah, so to understand this, I would get into what we call as leap smearing and leap seconds. Let's take a step back and take a second to like just explain why we need leap seconds or why do we use it in the first place. We use it for the reason that I described earlier that the Earth's rotation is not very even, but the atomic clocks are super even. So they never oscillate outside of one second. So one second is always one second, but the Earth's rotation is not. And what happens over time is Earth's rotation either is slowing down or speeding up. And we try to compensate for that. The reason we compensate for that is if you do not do this over several hundreds of years, like we talked about earlier, your noon would not be at 12 o'clock and it would be at like 2 p.m. or 3 p.m. So we don't want that. So to address that, what we do is I think the institute is called IERS, International Earth Rotation System Service. They measure the difference between how much time the UTC is off from the Earth's rotation and then they say, hey, let's add a second to the clock. And the way we do that is there are two different techniques to do it. So when you say you're adding a second to the clock…

Jason Davey

I see. Do you have any other real world examples of where inaccurate or desynchronized time caused or manifested in an issue from your own experience?

Sachin Singh

This is a major one that I can recall. The current systems do a good job of keeping the time accurate. And since then, many of them have moved to a leap smearing, where they don't move the time back by one second. Instead, what they do is you make each second slightly bit longer so that your 24…

Jason Davey

Okay, so we've established what can happen if the time is not synced correctly. So naively, we might assume that we can just make a request to some service or API over the internet, have it respond with the current time, and set our clock accordingly. There's a glaring problem with this in terms of…

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.

More from Software Engineering Radio - the podcast for professional software developers