2

According to the wikipedia NTP article, NTP is accurate within 10ms over public internet.

I would like to maintain accuracy of logs/events across different AWS regions and my question is how accurately are the AWS clocks synced between the different regions?

  • 1
    Are you talking about AWS's clocks on their internal systems? Or your own managed EC2 instances? If the former, you'll need to ask AWS. If the latter, well, dig into your own NTP metrics. – EEAA Sep 22 '17 at 14:13
  • @EEAA EC2 instances. How can you measure the deviation in time between two different AWS regions? The jitter would make it too inaccurate would it not? – Darthtrader Sep 22 '17 at 14:15
  • Is the worst-case tens-of-milliseconds not enough for you? – ceejayoz Sep 22 '17 at 14:22
  • @ceejayoz No, especially for file synchronization, where collisions are costly to fix. – Darthtrader Sep 22 '17 at 14:26
  • 1
    Remember that: The n.amazon.pool.ntp.org DNS records are intended to load balance NTP traffic from AWS. However, these are public NTP servers in the pool.ntp.org project, and they are not owned or managed by AWS.(docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html) – Clayton Sep 22 '17 at 14:33
1

Check out this link: Configuring Network Time Protocol (NTP) I would expect to see very accurate clocks in EC2, as the instance network interfaces are very stable for latency. That said, we're talking about NTP synced system clocks, which are notoriously inaccurate. I don't think you should safely rely on NTP and system clocks for anything timing sensitive.

You've responded that you're worried about "file synchronization, where collisions are costly to fix". Perhaps you should be looking into a synchronous solution like NFS/EFS.

1

AWS doesn't sync clocks across regions.

AWS doesn't run an NTP service / server, external NTP servers are used. NTP accounts for latency.

I imagine AWS runs fairly standard servers. Their internal clocks should be as accurate as any server.

So long as you have NTP configured to run, and you've allowed access to NTP servers in your security groups / NACLs, all regions should have accurate time. To actually test it would take some work.

1

Configure ntpd to point to the usual sources, but also peer with the ntpd you are running in other regions. Enable statistics. You now can record the offset of instances in different regions.

Do not expect sub 10 ms error or so between regions. The latency between regions, or to distant public NTP servers, makes that difficult.

Your requirements are probably not as extreme as one of the most distributed databases, Google Spanner. They developed a time service just for inter-datacenter databases, added hardware atomic clocks, and still I think ε was in the single digit ms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.