Precision Time Protocol (PTP)
Quick definition
Precision Time Protocol (PTP) is a network protocol used to synchronize clocks across devices with high precision, defined by the IEEE 1588 standard.
What is Precision Time Protocol (PTP)?
PTP is used especially on latency-sensitive systems that need to synchronize market data and order events across different trading venues. Market data and order messaging events happen at such high frequency that it's very difficult to properly sequence events with only millisecond-scale accuracy.
A typical PTP implementation can achieve sub-microsecond accuracy against UTC across devices in different data centers. This is unlike the more commonplace NTP protocol, found on mainstream devices and systems, which usually achieves millisecond-scale accuracy and requires a specialized client (such as FSMLabs's TimeKeeper client) and more engineering effort to achieve sub-microsecond accuracy and parity with PTP.
PTP has also become more popular due to compliance requirements. Under the MiFID II regulatory framework, electronic trading firms must adhere to strict timestamping requirements and recordkeeping requirements, and broker-dealers must demonstrate "best execution" of orders, making accurate timestamping even more critical for regulatory compliance.
On the other hand, PTP is more expensive to implement than NTP:
It requires a specialized grandmaster clock to disseminate time to slave devices, whereas NTP follows a simpler client-server model that requires less clock hierarchy management. PTP also requires PTP-capable network switches that support boundary clock or transparent clock modes, and more detailed configuration of such network switches in the path. Network interface cards (NICs) that support PTP are also generally more expensive.
Moreover, PTP is a newer and less mainstream standard than NTP. Network switches and NICs that support PTP are more prone to PTP-specific software issues that require more expertise to assess and debug.
Popular PTP clients include ptp4l (often used in conjunction with phc2sys), chrony, TimeKeeper, and sfptpd.