What it is:
Real Time Messaging Protocol (RTMP) is a popular media streaming protocol that uses Transmission Control Protocol (TCP) persistent connections. When a connection between a live-streaming client and the platform is interrupted, data from the live event is lost until the client can reconnect to a new server. RTMP Go Away is a new mechanism that allows the live server to send a signal to the client indicating that it needs to terminate the existing connection. This allows the client to create a new connection at a logical media boundary, incurring zero data loss.
What it does:
RTMP Go Away builds on top of the RTMP specification to enable live streaming clients and servers to communicate about the Go Away feature and provides a reference client implementation.
Spec updates: Adds a new field to the RTMP connect packet to announce feature support and creates a new protocol message type representing the go away signal.
Reference algorithm: Provides a reference implementation in FFmpeg that, upon receiving a go away signal, enables the client to reconnect at the next keyframe and incur zero data loss.
Safe rollout: Live servers should send the new go away message only to clients that indicated support of the new feature, ensuring that only clients properly handling the new signal will receive it.
Why it matters:
When RTMP connections are terminated by live servers, it can take streaming clients up to 20 seconds to detect the disconnection and reconnect. During that time, valuable live content is lost, sometimes forever. RTMP Go Away provides a framework for live servers to communicate that a known interruption (e.g., host maintenance) is coming and enables streaming clients to gracefully reconnect while incurring zero data loss.
Get it on GitHub:
The post RTMP Go Away: Lossless reconnections for live streaming appeared first on Facebook Engineering.
Read MoreFacebook Engineering