Score:0

Is there a way to keep server times in sync to the millisecond, globally?

et flag

I'm working on a project where I need to keep server times in sync, to the millisecond.

There are servers in the UK, US and Asia amongst other countries, and at the moment someone is manually having to sync the times to ensure they all match, which is difficult and doesn't always get the ms to match exactly.

There are also code fixes in place to accommodate the differences in times across all our servers.

Is there a better way to do this?

We are using a Windows stack currently.

Nikita Kipriyanov avatar
za flag
[PTP](https://en.wikipedia.org/wiki/Precision_Time_Protocol) is designed specifically for such precision. [Windows Server 2019](https://docs.microsoft.com/en-us/answers/questions/182261/ptp-in-windows-server-2019.html) and some update of Windows 10 should support it out of the box. You'll need a precision time source though.
Professor of programming avatar
et flag
this looks like it will work can you post it as an answer please
Score:1
ar flag

When you're down to the millisecond range, you can't do it with things like NTP. That is generally only accurate in the tens of milliseconds-range over the internet.

You probably have to go with accurate clocks attached to the servers themself, or in the same LAN.

Note that accurate clocks include GPS receivers, with a Pulse Per Second output.

If you've set clocks manually you've probably been off by hundreds of milliseconds.

As you have a large geographic spread, I'd contact a company such as Meinberg and get a turn-key solution from them - both due to the large geographic spread of the systems, and the extreme requirements for correct time.

If you're adventurous you can probably set up your own solution with a GPS on each location, using Pulse-Per-Second output to the servers. If this will be accurate enough? I have no idea.

Score:1
cn flag

Ah, JUST DO IT?

Seriously. Windows 2019 is IIRC accurate to 0.5ms out of the box assuming stable latencies.

There are big articles by MS on how they reworked time sync to allow that accuracy, even in virtualization (assuming Hyper-V on the host).

John Mahowald avatar
cn flag
What configuration does Windows Server have by default such that it gets sub 1 ms across the globe? Note that the question is asking for time across different continents, not only low latency of one metro area LAN.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.