
Episode 29 · Season 1
#29: Time synchronization
About this episode
Clocks are important to computers. Computers need to order events in a way understandable to humans. Every computer has a bunch of internal counters, like CPU ticks. But they only work within one machine. We need a way to have a reliable, global clock, that is synchronized between many computers. Why, exactly? Well, imagine you are selling tickets to The Rolling Stones concert. They sometimes sell within a few seconds. First come, first served. But who was first, if selling happens asynchronously in multiple data centers? Fans shouldn’t be penalized for being routed to a server with higher latency. So, instead, we use timestamps. Late messages may still be treated as earlier ones if a transaction timestamp says so. Obviously we can’t rely on the client’s clock. It’s too easy to change your laptop’s time and see Mick Jagger from the front row. But how do we make sure servers aren’t lying the same way? Even unintentionally? This is where NTP, network time protocol, comes into play.
Read more: https://256.nurkiewicz.com/29
Get the new episode straight to your mailbox: https://256.nurkiewicz.com/newsletter
More from Around IT in 256 seconds
Yukihiro Matsumoto, the creator of Ruby programming language, famously said: “I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy.” Honest…
Border Gateway Protocol, BGP for short, is probably the most important protocols you might have never heard of. Well, you did at least once, in October 2021. When Facebook, WhatsApp, Instagram and Mes…
SQLite is by far the most common SQL database ever deployed. Are you lsitening to this on iPhone or Android device? It runs SQLite. Or maybe through a web browser? Chrome, Safari, Firefox, Opera and A…
Scala is a programming language running on the Java Virtual Machine. It’s statically typed, and you can use it both as functional and object-oriented language. Even at the same time. The functional si…
K-means clustering is an algorithm for partitioning data into multiple, non-overlapping buckets. For example, if you have a bunch of points in two-dimensional space, this algorithm can easily find con…