How One Second Can Crash the Internet

Published 2024-07-13
I've always found the concept of adding an extra second to our clocks so interesting. The fact that it's caused such chaos in the programming world even makes the concept more fascinating. Although I'm not an expert in this, I thought the solution to combat it was pretty cool as well!

Thanks for watching!

Timeline
00:33 Why the leap second is added
02:11 Time does not like developers!
03:40 When one second crashed the web
06:25 Is there even a solution?
07:26 Understanding the leap smear
10:26 Goodbye leap second

#developers #programming #tech

All Comments (21)
  • “Expect the unexpected” is the eleventh commandment for every developer.
  • @technodrome
    I’ve written GPS-derived clock syncing routines before. Accounting for max slew rate and doing adjtime for minor adjustments (< 300ms) with soft-slew, vs hard jumps when the delta is too big for soft/gradual adjustment. Rule of thumb is, if there are multiple time-sensitive programs or daemons running, in your system, yanking around the clock is a wonderful way to introduce non-deterministic errors that sometimes can never be replicated. You can imagine for scientific instruments, this can be a nightmare if relying on system clock. And who can forget about programming in leap seconds lol - I had the chance to actually put that 2016 leap into code and was pretty stoked about it. One way we get around this in time/safety critical systems is to send your current MCU/CPU clock count to other nodes so that they have a backup for actual real-time clock info on the other nodes. Alternatively, a PTP based system can fetch you sub microsecond (sometimes less than 10ns) sync. Time is fun when you’re a nerd. 😊 Personal story/opinion aside, excellent video. I like it when you cover these kinds of topics.
  • @ericlburch
    GPS itself does not use leap seconds, but the ephemeris does note the number of leap-seconds since 1980 (when the GPS clock started). So if you look at time as floating down from the sky vs. UTC, it is about 18 seconds off right now. (It's also neat to note that the GPS measurement of the Greenwich meridian is about 100 meters off since the earth is not a perfect sphere, and the only place in the world that the GPS lat/long exactly matches the world's lat/long is the Applied Physics Laboratory on Johns Hopkins Road in Scaggsville, Maryland, where they codified how GPS works.)
  • @SgtCrypto
    Scrum Master causing stress eating 😂😂
  • @wimve4719
    I am at awe regarding your content and the way you explain things. I used to be a DEV, now I'm an analyst Business/functional ... thin line. I am from the time when COBOL and RPG were the big thing 😀So yeah, I had a big transition going from Soap to REST to ... Anyway, ridiculing myself as it moves too fast. These vids help me a lot. Your channel should have all DEV's as subscribers. Nicely done (did I make that clear ...).
  • @davidgrisez
    It seems like leap seconds originally became an issue because atomic clocks kept time far more accurately than the rotation of the earth. It could be said that our measurements time became so accurate with atomic clocks that we noticed minor irregularities in the rotation of the earth.
  • @JoelRosenfeld
    Neat topic! I'll have to see what breaks next time a leap second is added. On the cosine description, I commend you for trying to explain that to your audience, but if they didn't get it from the equation at the start, I'm not sure they are going to get it after walking them through all the pre-calculus steps.
  • @Wolf_Avatar
    Thank you for triggering leap-second flashbacks. Dealing with those is a nightmare.
  • @Soupie62
    This reminds me of a HP Media Centre PC I had, around 2004. With a TV tuner card, it was SUPPOSED to record TV shows like a VCR. As a PC it worked well enough, but the record function would FAIL HARD twice a year. At the start, and end, of Daylight Savings Time.
  • @radornkeldam
    So, in leap second day, Google has increasingly inaccurate time the whole day, until it ends and then itś on time again...
  • @odieadog4086
    I wonder, if they could use a Smoothstep function like 3x^2-2x^3 (properly stretched) instead of a cosine one? It looks almost identical and has the same values and derivatives at it's ends.
  • @CreoThiasos
    Thanks for taking me back to school with the math lesson.
  • @renlog7755
    Amazing video as always! Its so fascinating how something do small can take down huge systems, lets hope datetime module in python handles it for me 😂
  • @tohafi
    Great video. When i saw the math equation, i didn't even try to read it. But the explanation was so good, even i understood it 😜
  • You're a nerd! ... and I'm a nerd, and everyone watching this video is a nerd. Nerd pride!
  • @xoddopaul
    This is niiice content. Just one second and kaboom, power surge
  • Isn't there a way to query the atomic clock and get an updated time daily weekly or even monthly? Then use this to adjust the program by resetting the current time?
  • @bosshog36
    Thus was precient, just Crowdstrike got their first