HUYGENS time sync

242 views
Skip to first unread message

ivan.va...@gmail.com

unread,
Jul 11, 2018, 1:30:09 PM7/11/18
to CockroachDB
Hey guys,

A meta-question here. Does HUYGENS (https://www.usenix.org/system/files/conference/nsdi18/nsdi18-geng.pdf) change the game for cockroach? Any plans for strict serializability?

Thanks,
Ivan

Ben Darnell

unread,
Jul 11, 2018, 4:53:11 PM7/11/18
to ivan.va...@gmail.com, cockroach-db
Huygens is pretty cool, and we're still digesting it, but I'm not sure yet it's a game-changer. NTP is enough to synchronize clocks to sub-millisecond levels in most cases (both in our experience and in the comparisons in the Huygens paper), and that's enough for strict serializability. The problem is that what matters for CockroachDB is not the typical clock offset, but the worst case. Multi-millisecond spikes can still happen in all but the most carefully-tended environments (especially when virtualization is involved), and as far as I can tell Huygens doesn't do anything to avoid those. (TrueTime's innovation was in making the margin of error explicit, not just in tighter GPS-based clock synchronization)

Where Huygens is potentially a big deal for us is that in contrast to NTP, it is non-hierarchical: it is designed for nodes in a cluster to synchronize as a group instead of with an external authority (NTP is not exclusively hierarchical but that's how it's typically deployed). This could form the basis for a zero-configuration synchronization network within a cockroach cluster, more or less independent from the system clock.

-Ben

--
You received this message because you are subscribed to the Google Groups "CockroachDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cockroach-db...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cockroach-db/64cb717d-7191-4b69-a79b-32ff5cf337cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ivan Vaskevych

unread,
Jul 17, 2018, 3:21:45 PM7/17/18
to b...@cockroachlabs.com, cockro...@googlegroups.com
Hi Ben, 

Great answer, thanks!

I have long wanted to contribute to cockroach. This sounds like a nice sub-system to create, isolated enough, not trivial though :)
What do you think?
--
Best Regards,
 Ivan

Ben Darnell

unread,
Jul 17, 2018, 11:04:22 PM7/17/18
to ivan.va...@gmail.com, cockroach-db
I think it would probably be best to start developing this outside of CockroachDB. Once there is an open-source (preferably apache-licensed) Go implementation of Huygens, we can look into integrating it into CockroachDB (in the same way we have integrated the raft implementation from etcd). You'll be able to move faster when you're not waiting for us to merge PRs or dealing with the baggage of a long-lived branch/fork. 

-Ben
Reply all
Reply to author
Forward
0 new messages