0

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.

  • 2
    [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. – Nikita Kipriyanov Dec 23 '21 at 09:58
  • this looks like it will work can you post it as an answer please – Professor of programming Dec 23 '21 at 10:10

2 Answers2

1

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.

vidarlo
  • 6,654
  • 2
  • 18
  • 31
0

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

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • 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. – John Mahowald Dec 23 '21 at 18:02