
Cloudflare Time Services - mahnouel
https://www.cloudflare.com/time/
======
redm
It seems to me that CloudFlare should just sponsor servers for inclusion in
the long-standing global NTP pools.

[https://www.ntppool.org/en/](https://www.ntppool.org/en/)

~~~
diggan
pool.ntp.org is a open source project (under Apache License) with a open group
of contributors (volunteers). Basically the opposite of what Cloudflare is and
stands for.

Sponsoring servers in pool.ntp.org wouldn't support Cloudflare's goal(s).

~~~
giancarlostoro
I don't think they were implying it would support Cloudflares goals, but it
would be nice to see big companies helping to fund public services, especially
when many companies profit from open source tech.

~~~
diggan
I agree with what you say but if a person sets up a for-profit company, their
goal will always be to generate profits, not to be/do good. That's why we
don't see Cloudflare supporting things like pool.ntp.org

------
amclennon
I'm a huge fan of Cloudflare in general, but sometimes I'm a bit uncomfortable
with how much critical infrastructure is increasingly consolidated into a few
single entities.

~~~
nullbyte
Couldn't agree more. They offer an amazing service for free; however, we
shouldn't forget that they control millions of websites at a DNS level.

That's a lot of power, and a lot of responsibility. If there was an internal
breach at CloudFlare, a sizeable chunk of the modern web would be in danger.

------
maxclark
So frustrated that Cloudflare didn't just add resources/support the existing
NTP Pool. Hard to even pretend their motives are altruistic at this point.

~~~
privateSFacct
Disgusting that supposed "hackers" and experts on hackernews advocate for
single point of failures in the internet infrastructure.

The internet is supposed to be distributed. If the NTP pool admins go nuts,
have a fight etc, I'm glad there is an alternative. You can generally specify
multiple sources, this would be a new source.

And it's always the BS "they're evil" argument - when the posters contribute
nothing themselves to progress.

Frustrating indeed.

~~~
michaelmior
Isn't the whole point of the NTP _pool_ that there isn't a single point of
failure? (Assuming of course you're using multiple servers from the pool.)

~~~
jerf
In a technical sense, yes. But privateSFacct is referring to non-technical
single points of failure.

Another example would be governmental capture of some chunk of the current NTP
admins or something.

An organization, by its nature, is vulnerable to some potential single point
of failure. Low probability, sure, but having a competing organization ready
to step in can actually help keep that probability low by keeping the focus
on.

------
jrockway
Are the local time servers stratum 1, or do they have some central stratum 1
source that they then distribute out to the edge datacenters?

What's the value over just building your own stratum 1 source? (Shameless
plug: [https://github.com/jrockway/beaglebone-gps-
clock/blob/master...](https://github.com/jrockway/beaglebone-gps-
clock/blob/master/README.md))

~~~
apeace
Many folks these days are deploying in the cloud, where it's difficult to
deploy your own hardware. Many would see it as too costly to maintain the
hardware in a separate datacenter with a fast connection to their cloud
provider.

The advantage of this is that it runs on Cloudflare's network, where your
cloud provider surely has a fast connection to the nearest edge.

~~~
wmf
If you're in the cloud you should get time from the cloud provider, not from
Cloudflare.

~~~
makomk
That does seem like the obvious problem with this. For example AWS apparently
have GPS time sync to all their datacenters in order to provide accurate NTP
time to the instances in them: [https://aws.amazon.com/blogs/aws/keeping-time-
with-amazon-ti...](https://aws.amazon.com/blogs/aws/keeping-time-with-amazon-
time-sync-service/) It seems like it'd be hard to beat the connection speed
and all-around performance of that, especially since there's a cross-internet
trip from the third party stratum 1 servers to Cloudflare as well as the one
from their servers to you.

------
SEJeff
I think it would be super interesting if they started offering IEEE 1588 v2
aka Precision Time Protocol, but it would be much harder to offer compared to
ntp. What they're almost certainly doing here is just running a cable to the
roof where they have a GPS antenna and then run it into their datacenters into
a time appliance (less likely) or a GPS pci card in one of their servers (more
likely) that they then send out to those who want access.

~~~
ixf
You really can't do PTP over the internet, at least not meaningfully. Anyone
who needs PTP is going to have their own grandmasters, reference sources, etc
- and then a distribution network.

Most telecoms applications use an ePRTC source which tends to be implemented
as a GPS/GLONASS/Galileo redundant frequency source, plus a local rubidium
source or cesium reference. High-end telecoms applications use a hydrogen
maser.

You can't stuff that over an unmanaged network and get the performance you
need. Hardware needs to support it hop-to-hop.

~~~
SEJeff
Yeah I agree, but ptpv2 does support unicast and you can set offsets. It would
be very challenging, but not impossible sans the very high res stuff where you
need oscillators on the switches and routers, as you alluded to. It wouldn't
get down to the sub-10 nanosecond sync you get with a proper stratum 1
timesource (such as the rubidium decay ones), but you could get faster than
the guaranteed 1 second of accuracy which is what I believe ntp used to
guarantee from a protocol level.

That was my point. Also if you're inside one of Cloudflare's many POPs, this
could, in theory, be provided.

~~~
mlichvar
PTP over Internet doesn't make much sense. PTP requires hardware support in
all network devices on the path between the (grand)master and slave. Without
this support it will generally perform worse than NTP. Of course, it depends
also on the implementation.

PTP does support unicast messaging, but it is not meant to be used as a public
service. There are two major problems: It's not stateless and it has a huge
traffic amplification, which could be easily exploited for DoS attacks.

~~~
SEJeff
Yeah this is the most sensible reason against it. NTP is also responsible for
some of the biggest traffic amplification DDoS events.

~~~
mlichvar
Yes, but NTP as a time service (client/server mode) is safe. A request has a
single response and their lengths are symmetric (that's actually a requirement
for accurate synchronization). The problem with amplification is in the
optional monitoring/control modes of the protocol (modes 6 and 7 as used by
the ntpq and ntpdc utilities respectively), which should be disabled on public
servers. Unfortunately, there are still some old misconfigured servers causing
problems for a lot of people.

In PTP the problem is in the synchronization protocol itself. A master in the
unicast mode is basically a programmable packet generator. It sends
sync/announce messages at a rate and duration specified by its slaves, and the
address can be spoofed.

------
cbgonz
Hmm, tried it out just now (Win10) and I´m getting a ... timeout! Go figure...
(location is Brazil btw)

------
wbl
Hello, I'm one of the engineers that worked on it. Feel free to ask me
questions.

~~~
legohead
Can we telnet? Trying to telnet roughtime.cloudflare.com 2002 and getting
nothing...

~~~
wbl
You have to use a roughtime client. It's a UDP protocol and we don't respond
to malformed packets.

------
jjoergensen
I assume Cloudflare does not serve leap-smeared time? In regards to rough-
time, does anyone know what the result would be when both Cloudflare and
Google are used at the same time, and Google serves leap-smeared time?

~~~
dsp
Leap smear is how true time is defined in the roughtime spec.

~~~
jjoergensen
Thanks! I guess that answers my question. So the timing of both sources should
match each other.

------
mobilemidget
“For many applications, accurate network time isn’t essential: it suffices to
be within 10 seconds of real time”

I can’t imagine any application where the more accurate isn’t preferred. And
10 secs seems like quite a bit imho

~~~
wolfgang42
That's for their roughtime servers, which is a different service than the NTP
servers they offer on the same page (though it could be clearer that they're
distinct). The advantage of roughtime is that it's cryptographically signed
and auditable, so you can be confident about using it to check things like TLS
cert expirations (for which 10 seconds is plenty accurate).

------
yingw787
This link on the site takes me to a 404 (not sure why, I'm presuming it's a
static site?): [https://developers.cloudflare.com/time-
services](https://developers.cloudflare.com/time-services)

I think it'd be nice to have some middleware hooking into the build process
that curls every link at a depth of 1 to ensure that HTTP 400/500 error codes
aren't returned.

------
Otnix
Cloudflare most problem with cname for RSS

------
techslave
as usual where CF is involved, no one here gets it. this is TTL information
for CF, at the expense of everyone else.

------
aquabeagle
[https://www.cloudflare.com/resources/images/slt3lc6tev37/5SB...](https://www.cloudflare.com/resources/images/slt3lc6tev37/5SBj8VBjfRHi89ixodi5Fb/c0909c4f3f237dfac63303c402cec8d1/sad_clock_2x.png)

Has this designer never seen an actual clock?

~~~
e1ven
What's your objection?

It has 12 evenly distributed lines, which are commonly used to represent the
numbers on an analog clock.

It has an hour hand, a minute hand, and a second hand.

The only thing I can see that seems even a little off is that the hour hand
seems slightly past the 1 mark, whereas the minute hand being on ~54 suggests
it might want to be slightly before.

It seems very clock-like to me..

What gives you such a visceral reaction to it?

~~~
nstart
Only looking at this because I saw this reply. I don't have a visceral
reaction to it, but I do believe that the design of the clock is rather
ambiguous. From my perspective, the minute hand is actually at ~24 hence the
hour hand being a little past 1.

Given that it's so easy to mix up (I had to stare at it to be sure), I'm
guessing the parent commenter got frustrated with it. ️

~~~
e1ven
Good point. I always learned to read it as the longest hand being the seconds,
but your way works too. Thanks!

------
johnklos
Personally, I don't trust Cloudflare. There's just something a bit shady about
a company that defends web sites which pretend to have Adobe Flash updaters or
pretend to be bankofamerica.com as free speech.

That said, I don't imagine they could screw up NTP too badly, except, of
course, logging and tracking users.

I hope they don't smear leap seconds like Google, or do any of a number of
other dumb things simply because they're big enough to get away with it:

[https://www.theregister.co.uk/2016/12/02/google_public_ntp_s...](https://www.theregister.co.uk/2016/12/02/google_public_ntp_servers/)

~~~
xmichael999
No idea why your comment got flagged. You made a legit point here. CloudFlare
is a highly over rated service that shouldn't be trusted.

Not to mention their bait-and-switch billing practice should be the only thing
anyone is talking about when it comes to CloudFlare.

