1. 22

  2. 8

    NTP has really good best-case time, but essentially no worst case bound. So thinking about computer code: why am I supposed to care that my computer clock is any more accurate than my watch that I set manually? Even CockroachDB, which is based on a Google database deployed with atomic clocks for transaction semantics, needs only 250ms precision… I have 11ms roundtrip ping time to my VPS!

    What other programs are so sensitive to clock skew that +/- 1 second time isn’t good enough? Why is anyone outside a highly specialized scientific setting running any NTP protocol at all?

    I could be running a CockroachDB cluster between my home and my datacenter with the following protocol: my laptop is the time source, set manually from time.gov. My database nodes request ISO8601 formatted UDP packets, and are then about -15ms relative to my laptop. Good enough, no?

    1. 5

      What other programs are so sensitive to clock skew that +/- 1 second time isn’t good enough? Why is anyone outside a highly specialized scientific setting running any NTP protocol at all?

      Game network programming, for one obvious example, though they end up doing weird versions of NTP. When I worked on medical software streaming vital signs, I implemented a simple version of NTP for syncing browser displays. Any display of realtime data.

      The use cases exist and aren’t that absurd

      1. 2

        Do you think if NTP was a more stable project, specialized game/medical software projects would feel confident relying on the system NTP instead of implementing their own protocol?

        1. 2

          So, there’s NTP-the-project-and-service and NTP-the-concept. The former is what sysadmins and other folks worry about to have sane networks and deployments, and the latter is what application devs who can’t trust their operating environments use.

          Implementing NTP at an application layer helps deal with things like bad routers, stupid firewall rules, and dumb configurations. We ended up doing it ourselves specifically because we couldn’t rely on enterprise deployments to do their job properly–or at least not without fighting entrenched IS folks. For things like games, it’s hard to guarantee that operating environment too,even if it would benefit from NTP.

          Part of the problem too is that to get 80% of the benefit of NTP you need only like 1% of the code…maybe less depending on language. So, it can be hard to justify bringing in all the NTP stuff when you can (somewhat) just bodge something together in a day or two to address clock skew.

    2. [Comment removed by author]

      1. 11

        Please try to post more substantive comments here–throwaway personal attacks and namecalling don’t elevate our discussion and don’t make you look particularly pleasant or informed.

        1. 6

          True, but there’s some detailed history about esr’s involvement with a previous project that doesn’t paint a pretty picture.

          1. 8

            Sure, but that wasn’t linked–just a throwaway insult with zero effort put into it.

            Also, we’re all better off upvoting @ec who is actually saying something relevant to the article about ntp.

            1. -2

              Doesn’t make it less true

              1. [Comment removed by author]

                1. -4

                  Do all discussions need to be elevated? Isn’t sometimes a 7 word comment just what is needed? I find it refreshing and not mis-informed or unpleasant.

                  1. 7

                    Do all discussions need to be elevated?

                    No, and those discussions belong on HN and Reddit.

                    Your account is 33 hours old, so this may be news to you. Now, please, let this subthread die.

                    1. -1

                      How is my account lifetime relevant?

                      1. 8

                        Your account lifetime is relevant because it demonstrates you have not had sufficient time to acculturate. We have norms on this website you will need to learn in order to participate.

                        1. -4

                          So it’s not ok to agree with someone whose account is 1 year old. Ok, duly noted.

                    2. 3

                      Yes, they do.

                      1. -1

                        Why? Not trying to be annoying here.

                        1. 2

                          How you live your days is how you live your life.

                          1. -1