Second Internet Features and What to Know

Second Internet Features and What to Know

I sat down, was trying to get these concert tickets. staring at that clock waiting for EXACT TIME AND HOW'S IT POSSIBLE hundreds of thousands people clicked before did?

This Extra Second Keeps Crashing the Internet. | Transcript:

Time betrayed me the other day. I sat down, I was trying to get these concert tickets. I was staring at that clock waiting for the EXACT TIME AND HOW'S IT POSSIBLE that hundreds of thousands of people clicked before I did? Isn't the clock in my computer supposed to be in sync with, I don't know, with the internet time? The truth is your computer, every one of your devices, could very well be way off from the universal time. But what even is the real time and who says what time it is? It's not my Mac, it's not my ISP, it's not Apple, it's not even the literal atomic clocks in military bunkers. All of those guys are looking back to this all-seeing overlord of time. And Wall Street, air traffic, GPS,

the entire internet, the entire world relies on our clocks being in sync with that universal time. Even a 1-second discrepancy can crash the internet. The leap second brought down Reddit, Yelp, LinkedIn, Foursquare. For computer systems, they could get confused by the sudden addition of a second. Machines at Qantas Airways went dark causing flight delays in Australia. But as crazy as it sounds, our devices really suck at keeping exact time cuz the fundamental way we estimate time has this decades-long flaw. So, since I'm

probably not going to make it to that concert, I've spent the last few weeks figuring out why Ticketmaster screwed me over besides, you know, being Ticketmaster. And for that we have to look at this invisible, terribly fragile chain of trust that tells your devices what time it is. So, YouTube, let's untangle time together today. So, why was my laptop so off sync with time? If you were to pull an old iPhone from a drawer and booted it, you might catch a glimpse of what's actually happening in the background cuz the moment you boot it up, there's a good chance that it's going to be a few minutes off from real time, aka universal time. We'll get to that universal time overlord soon, but for now let's say

it might be a couple minutes off from your current phone. This old phone is able to keep time because there's a clock inside it that runs even if the phone itself is out of battery. Practically, every electronic device in the world has a chip inside dedicated to keeping time. Sometimes it's called a real-time clock. It's tiny. It actually uses nanoamperes of power, so it'll work. It'll work on even with the absolute last bit of charge left on the phone battery. Desktop computers, not laptops, have an actual little battery inside, which is also there to help keep that clock running.

It actually blows my mind that they haven't put these things on kitchens and microwaves and those RADIO ALARM CLOCKS. PETER! WHERE'S MY THING? BUT ANYWAY, THOSE DEVICES' clocks are far from perfect. They will drift up to 20 seconds a month, which does not sound like a lot, but hold your horses. That drifting is not because of the little battery, it's because of this fundamental problem with the design of the clocks in these devices. Your device knows this, so the moment you get a decent charge and the moment the device gets back online, it'll start desperately trying to connect to that source to get the real universal time.

The ring has awoken. It's [clears throat] heard its master's call. And phones are really good at finding that time. Even if there's no cell phone plan or SIM card, the phone can get time from the cell phone towers around you. And even if you're in the middle of the desert, you'd still be able to get the time from the signal coming from GPS satellites. Okay, great. So, why doesn't it do that regularly to make sure that my devices are accurate? Why is my laptop screwing me over? Now, the primary source for most internet devices is what's called an internet time server, which uses this thing called NTP. When a device is powered on and online, like abandoned in a drawer, it's

going to fetch time from those servers. Those checks have to be periodic and in theory often regular, but for my concert tickets, apparently not often enough. Now, a typical electronic device will usually sync time on some key actions, like when it boots up or when it joins a new Wi-Fi network. And if none of those happen on some regular background schedule. Now, Mac computers tend to check with Apple's time servers every 20 minutes or so. Apple has their own server dedicated to this thing and it's the default on any Apple device. When Apple bragged about their Apple Watch accuracy, It's accurate within plus or minus 50 milliseconds.

What Tim Cook was actually bragging about was not the watch itself, just the watch's ability to sync with those servers, which is not very different from what any other smart device does. It's the same 15-20 second monthly drift. But 20 minutes syncs on a clock that drifts what? Half a second a day? That should be enough, right? The problem is that not all devices care about time that much. A modern Windows computer, for example, might only check with Microsoft with their time server once a week. There are dozens of forums, threads of people struggling with this insane 7-day refresh window. But aside from missing out on concert tickets, why is this time

syncing so important? Let's say that your computer is trying to connect to Google, to your Gmail account. Probably have or you should have two-factor authentication enabled. You know, where you get this key that changes every 30 seconds. But for two-factor authentication to work, both the device and the server need this key that says what the code should be at any given time. But if your laptop clock has drifted and it's saying that it's 1 minute ahead of universal time, two-factor authentication is not going to work. And that's just the tip of the iceberg. Imagine the chaos if an ATM's clock drifts from the bank's central server. Or if a stock trading server drifts just a few milliseconds, algorithms could buy and sell millions of dollars of shares in the wrong

chronological order. Our modern world requires perfectly synced internet time. But these clocks in our devices are just too inaccurate. When you have millions of dollars on the line, you can't afford this thing to freeze up. That's true for trading algorithms and it's true for your team, which brings us to today's sponsor, Synthesia. There is a massive gap between knowing how to do something and actually be able to do it. You can memorize every sales framework, read every playbook, but the first time you get on a cold call with a hostile prospect, you haven't actually practiced. You're still going to freeze. And that's what Synthesia does.

Synthesia is an AI video platform already used by over 90% of the Fortune 100 companies. And they just launched a new product called Roleplay Sessions to fix that exact gap. Roleplays let your team practice real-world conversations with AI video agents. And look, I mean, I get it. This idea of doing roleplay with an AI, maybe it's a little weird at first. You know what's worse? You know, fumbling your words during a massive negotiation or freezing up during a tough employee review because you never actually practiced saying those words out loud. Practicing with an AI works because it gets you over that

initial anxiety spike. It's realistic, it's a back-and-forth conversation. And when you're done, the AI gives you instant coaching and feedback so you can try again. It basically turns workplace learning into sports learning, getting your reps in before game day. Plus, if you manage a team, Roleplays completely closes the loop. You can track performance, spot skill gaps, and prove training is actually working before you put your team in front of the real clients. Stop just informing your team and start letting them practice. You can check out the link in the description to see Synthesia Roleplays in action or just scan this QR code here. Now, back to syncing our internet time and our world. That's what gave birth to this central entity,

a timekeeper that everybody can trust. But also, if everybody checks with this entity at the same time every day, every second, you would just crash it. No server can handle that. So, it needs to create these middlemen. Wait, no, wait. Come on. Isn't it easy to just like keep track of time ourselves instead of, I don't know, relying on this like one entity? How hard can it be to keep track of a second ourselves, you know, build better clocks? I have been dying to answer that on a YouTube video because I've been nerding about this for too long without anybody I to share it with. So, that real-time clock chip inside the computer uses one of the most clever tricks in timekeeping that the humans

have ever come up with. But, like I said, it's only accurate to plus minus 20 seconds a month, about 1 second every couple of days. So, why can't we break this barrier of accuracy, even those fancy $1,000 watches? Rolex. Omega. Beautiful. Ever since the ancient Egyptians divided the day in 24 hours, we've gone a long way from these into these, which were still off by 15-30 minutes a day, finally into these. Pendulum clocks were the first clocks that we invented that only drifted seconds, not minutes, per day. And this is the 1600s. I mean, this is an incredible engineering feat, but still, not great if you want to snatch concert tickets in the 1600s.

Definitely not good enough for two-factor authentication, and more importantly, no way to shrink them. So, the only solution was to somehow find a way to improve on those mechanical watches. And we did. Swiss watchmakers by the 1700s miniaturized those old mechanical watches and made them much more exact. They also figured they could very well monetize this thing. The one and only Philippe Dufour, and there won't be any others. 1 million 9. Now, the engineering on these things is nothing short of amazing, cuz in a Swiss mechanical watch, there is no battery. What powers this whole thing is a coil that gets tightened to hold a charge.

Now, the originals, or originals, you had to wind by hand. They were still not very exact. But, over the next couple of centuries, they got better, as in insanely better. By the 20th century, mechanical watches had evolved only drift about 5 seconds a day. And as of 1926, you no longer had to wind them anymore, cuz now they have this weighted rotor that winds the watch with your wrist movement. This was an arms race, basically. Like, the decades of watchmakers designing new movements Movement is the name of the machinery inside. Trying to outdo themselves. Remember, these watches are made with hundreds of miniaturized moving parts, even some synthetic rubies and sapphires to keep the metal gears from grinding.

And the best mechanical watch today drifts about 1 second per day. It's like $100,000, so we obviously don't have one here. But 1 second a day, as much of an engineering feat as it is, it's not good enough to run the internet. So, we reached the limits of mechanics. We needed something more exact. We needed to look elsewhere. We tried electric watches in the '50s, and this was This is the actual first one. You might have seen it in movies. I make this look good. This watch used an electromagnet to simulate a sort of pendulum, but using a battery. But also, it was not good enough. Soon after this one, though, came a technology that almost destroyed

the watch industry. Quartz. A watch so accurate, you may have to reset it only once this year. Pretty much every clock manufactured today uses quartz because it's easy and it's cheap. It's what's inside your laptop, what's inside your smartphone, what's inside the Apple Watch, and pretty much every device out there. All those real-time clocks in our devices everywhere are probably using quartz. Even this watch is a quartz watch. Hamilton kept the design cuz it was kind of iconic, but the electric version sucked. They would corrode. They were super fragile. They just converted it to quartz. But with quartz, suddenly, you

didn't need hundreds of mechanical parts or the watchmaker or the rubies. All you really needed was this piece of rock. Quartz is an awesome piece of rock because you can send an electrical charge to the tiniest quartz crystal, and it's going to vibrate 32,768 times per second. That number is an incredible coincidence because if you divide that number by 2 to the power of 15, you will get exactly 1 second. So, all you do in a quartz watch is put the simplest chip next to the quartz to run that operation and you get incredibly exact one second ticks. By the way, a good way to tell those apart, if you're curious, is with the second hand cuz in mechanical watches it moves fast multiple times a second. In a quartz

watch each beat is actually literally a second. And that's what the real time clock inside your computer does. That's how pretty much every other device out there keeps time. They're just vibrating pieces of quartz. Compared to this timeline, a half a second drift per day for a clock that you can make for cents is incredible. But heat, for example, can slightly affect how fast quartz vibrates and for the accuracy that we need in the internet, 15 seconds a month is an eternity. Certainly enough to leave me without concert tickets. So, to solve that, we need to talk about this other watch.

One for you. One for me. Times are going to change And they're going to run more slowly. Despite Interstellar being my crash course on relativity, scientists have been dealing with relativity for decades. They solved it and it runs our world. We brought ourselves. Now, remember we established that our devices can't talk to Sauron. I'm going to call him Sauron from now on. But we can't talk to him directly because we would crash the server. So, we need other servers that we can ask about time and get a semi decent exact response. And that's what Apple and Microsoft have with their own timekeeping servers. But where do they get their time? Even those big companies with their billion-dollar budgets, they don't trust themselves to keep time. Keeping

time is just too dangerous. It's too important and honestly too hard to just keep track of yourself. So, big tech companies, Apple, Microsoft, AWS, Google, they'll install these antennas on the roof of their data centers and they will get time from GPS satellites. But why would you use GPS satellites for time? I mean, they're thousands of miles away in space. Can't we just get the time from Earth? It's lonely in space. GPS satellites are actually key to keeping time, in part because they're just there. And unlike what people think, like devices here on Earth, they don't talk to GPS satellites. All a GPS satellite really

does is just send signals, and these devices catch it. It's very much a one-way situation. And what they're sending is a small packet of data that says what time it is and where they are. So, as long as your phone can catch the same signal from four of those satellites, it can take the position, the time it took for each signal to arrive, as in actually considering the speed of light for the delay, they can bake that into a formula and figure out where you are. But, for that whole contraption to work, time in those GPS satellites needs to be exact to the millisecond. And so, each one of those satellites carries a piece of tech called an atomic clock.

This is not an atomic clock, so I'm sorry. It actually fits here. It sounds like state-of-the-art stuff, but we've actually had it since the 1940s. Now, atomic clocks are by far the most exact approach to time tracking that humans have ever invented. An atomic clock takes the same principle as a quartz clock, but instead of vibrating a quartz crystal, they're looking at the oscillation of a cesium 133 atom, which happens to be exactly 9 billion 192 million 631,770 Hz. So, if you run that number through some math, just like with the quartz, you end up with a clock that will still drift 1 second every 100 to 300 million years.

We don't have one for our little watch history diagram, but before you go looking for one, don't fall for this trap cuz many of those watches first are room-sized. You can miniaturize them, and then there are some rare atomic wristwatches that you can buy and actually wear on your wrist, but most atomic watches in the market, they're just a marketing gimmick. They're just standard quartz watches that sync with time from a source every night. Now, going back to the internet though, because those big tech companies, they're sourcing time from the actual atomic clock that's inside the GPS satellite. Those time servers are considered stratum one. It's a prime category in timekeeping street cred. Means that they're connected to a stratum zero device, the GPS satellites,

which are basically primary sources of time. But again, why use a time source in space? How about relativity? Those satellites are traveling what? At 10,000 mi an hour? They might have atomic watches, but time for them literally moves at a different speed, really like 38 microseconds faster per day. That's relativity, folks. Wait, wait, but if they're drifting, and we know that they drift compared to Earth, there has to be a reference point to sync them, right? What is it? Are they really stratum zero? Are they the ultimate source of time? Or is there someone else above them? Rumors grew of a shadow in the east, whispers of a nameless fear.

Now, because the satellites are already stratum zero, it's not exactly clear how to call these. But GPS satellites, they do have an overlord, actually two. One is the US Naval Observatory alternative master clock, which is in Schriever Air Force Base in Colorado. They have like this insane facility. They have like 17 different clocks with cesium and hydrogen and rubidium. I'm not getting into those. My team told me like this was already getting far too nerd, maybe for another YouTube video in the future. But that's just the alternate, cuz the main US clock is the master clock in the US Naval Observatory in DC. That is the official time standard for the United States. That is the reference

that defines time for GPS satellites, for the big servers, and by extension, to most of the world. No, no, no, wait, wait. So, the US is the timekeeper for the world? No, that's got to be like a geopolitical nightmare. No. Did you ever hear the Wise? No. I thought not. It's not a story the Jedi would tell you. So, dozens of countries, they run their own network of atomic clocks, and they all agree on what time it is. And they report their homework back to one final boss. If there's one true Sauron in this story, it's this high security physics lab in Paris, the Bureau International de Poids et Mesures.

BIPM. The BIPM, they collect the data from about 400 atomic clocks spread across 80 different countries. They average them all out and they officially declare what coordinated universal time is. They are the absolute top of the pyramid. But again, you can't just ping the French physics lab for your smart thermostat. Like you're you're not allowed to talk to Sauron directly. So, if you aren't using an Apple or Microsoft device, your gadget needs another middleman to fetch that time. So, what about everybody else? There's this massive volunteer army of internet nerds called the NTP Pool Project. It is this cluster of thousands of time servers that are maintained around the world entirely by volunteers. But

absolutely every one of those services, they struggle with one extra curveball. It's a curveball that has crashed the internet far too many times in the last few years and it's kind of our fault. It's my fault. Obviously not, it's my fault. Please, it's my fault. It's It's my fault. The problem is that we designed the perfect clock for a remarkably imperfect planet. Cuz we have atomic clocks and they define the perfectly accurate second. The definition of a second is literally based on the cesium clock. But the Earth kind of wobbles. We get pulled from the moon, we get ocean tides, earthquakes, even melting ice caps physically alter how long it takes for Earth to complete

one full rotation, which in theory should define what a day lasts and what a second lasts. Now, most of these are off just by a few milliseconds, but over the years, they add up. The green line in this chart is the actual discrepancy of how long it took Earth for a rotation versus what we estimated it should. And notice how it changes every day. But that leaves us with two entirely different clocks, the UTC, which is the perfect mathematical atomic time, and then there's the UT1. And in theory, that is like real time. Again, based on the actual physical rotation of Earth. So, what do we do if they drift apart? Which one do we follow? We've been trying for decades to follow both with some duct tape system

called the leap second. When Earth time, UT1, drifts apart more than 0.9 seconds, they force atomic clocks on Earth to wait for 1 second to catch up. So, every few years, usually on December 31st or June 30th, they will inject one extra second into the end of the day. The clock will tick from 23:59:59 to 23:59:60 and then to midnight. Okay. So, solved, right? Cloudflare has experienced issues with its global network causing chaos at Australian airports. Leap seconds love to crash computers. In 2012, Qantas Airlines lost millions of dollars. They had to ground 400 flights because of this thing. Scientists did a thing, they added the leap second to the calendar, but many servers around the

world they just weren't ready to take a leap second. Processors got stuck in loops trying to figure out what time it was. Reddit crashed, ticketing software crashed, tens of thousands of passengers stranded while they figured this thing out. A few years later, by 2015, people started fearing leap seconds. The Nasdaq, for example, shut down trading early in the last leap second change just to be extra sure. In 2016, Cloudflare crashed. Their software was trying to calculate the network speed by subtracting start time from end time. But because the leap second literally rolled the clock backwards, the math created like a negative time, which took the DNS down. What Google does is another trick. Instead of trying to add a second,

when they know that a leap second change is coming, they just lie to their computers. For the 24 hours surrounding a leap second, Google just runs their servers slightly slower than reality. They take that one extra second and they smear it across an entire day, so the software doesn't really notice the jump. These are all patches. They're They're patches to much bigger problem. And the leap second mess has gotten so bad that in 2022, the international community voted to abolish leap seconds entirely. So, this is how liberty dies. With thunderous applause.

The final leap second adjustment will happen in 2035. And after that, the UTC and the UT1 clocks will run independently forever. Now, without leap seconds to fix this gap, these clocks are going to keep drifting. Eventually, atomic time and Earth's actual rotation will be off by an entire hour. Now, that's going to happen around the year 3000, and by that time I expect it'll probably be my turn to buy those tickets. In the meantime though, you should make sure that you're subscribed and check out our video on how smart homes got stuck in 2014.

Catch you on the next one.

More Tech Transcript