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

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.


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.


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).