Facebook organized its own time service

Time servers and services play a significant role in the modern IT industry, as they ensure the synchronization and correct operation of many millions of devices in a single time space.

Facebook, the owner of a huge IT infrastructure, when starting its own similar service, refused to use the traditional ntpd daemon in favor of a more modern and better integrated with the hardware infrastructure development called chrony.

As a rule, government organizations, such as the National Institute of Standards and Technology (NIST), which have high-precision atomic clocks, deal with the sources of accurate time. Data from the exact time servers can be obtained via the Internet using the standard NTP (Network Time Protocol).

However, in large data centers, they often use a local source of accurate time, taking data from navigation satellites or atomic clocks. The most important nodes and racks are equipped with separate adapters for synchronization, and many modern network cards have separate connectors for the same purpose.

There are also private NTP services - for example, Apple and Google have such services, and now Facebook has joined them. Her NTP services are available at time.facebook.com, they are free. However, a public service is more likely a byproduct of internal development.

Facebook owns a huge army of servers and other devices, moreover, the company is actively introducing distributed services and databases. In this case, time synchronization is especially important. The source of Facebook’s time itself is classic, it’s an atomic clock (usually cesium, but Facebook uses the rubidium version). But the software part is different from the usual one.

Usually, ntpd (Network Time Protocol Daemon) is used as the exact time daemon, but with the announcement of its own source, Facebook switched to using a more advanced chrony. More optimized chrony code allows you to use less RAM and CPU time, which means less power consumption, which is very sensitive on a Facebook scale.

In addition to cost-effectiveness and better integration with hardware that allows chrony to use timestamps generated by network adapters, this software has an increased level of security. The accuracy in comparison with ntpd also increased, and, very significantly, from 10 to 100 times.

The performance of the new Facebook service, at least, is not inferior to the performance of similar services of Apple and Google. In it, the leaping second is “blurred” instead of “freezing”: additional time, compensating for the difference between universal and average solar time, is added or subtracted in small portions over several hours.

However, there is one “but” - none of the time services owned by private companies, such as Google, Apple or Facebook, have Coordinated Universal Time (UTC) certification, and this is the standard used by large providers and banking networks. But Facebook engineers are already considering introducing the Precision Time Protocol (PTP), which is significantly more accurate than NTP.

Post a Comment