Live stream ingested on Azion
Push a live stream to Live Ingest and deliver it as HLS through an application that applies the live cache policy.
This design serves teams that stream live events without a streaming origin of their own. The encoder pushes the stream over RTMP to Live Ingest in the region the team chooses, and Live Ingest produces the HLS output. An application delivers the stream to viewers under the live cache policy that Azion applies automatically, so one cached copy of each file answers every viewer. The design implements the use case Stream live events to large audiences.
Architecture diagram
Read the diagram as two flows that meet at the connector. The ingest flow starts at the encoder, not at an origin: ingestion and packaging happen on Azion, so no server of the team sits in the path. The request flow starts at the viewer’s player and ends in Cache whenever a valid copy exists. Only an expired or missing copy travels through the connector to Live Ingest.
Dataflow
- The encoder pushes the stream over RTMP to Live Ingest, in the region of a connector of type
live_ingest. - Live Ingest converts the stream to HLS: a playlist,
.m3u8, and the segments it lists,.ts. - A viewer’s player resolves the stream’s hostname through Edge DNS and requests the playlist from the application.
- A rule of the application names the connector with Set Connector, and Azion adds the Enforce HLS cache behavior, which caches playlists for 5 seconds and segments for 60 seconds.
- Cache answers every viewer from a valid copy, and an expired or missing copy is fetched through the connector.
- Real-Time Metrics counts the connected users of the stream and the requests the application answered.
Components
- Live Ingest: the Product that receives the encoder’s RTMP stream in one region and converts it to HLS. The region is the attribute of a connector of type
live_ingest, and it decides where the stream enters Azion, not where viewers connect. - application: the Platform Resource that delivers the stream. Its rule with Set Connector sends viewers’ requests to the Live Ingest connector, and it is reached through the hostname of a workload.
- Cache: keeps the playlist and the segments under the live cache policy of Enforce HLS cache, which bypasses the application’s own cache settings. The playlist changes as the stream advances, so its copy lives for seconds; a segment never changes, so its copy lives longer.
- Edge DNS: resolves the stream’s hostname to the workload, including an apex domain through an
ANAMErecord. - Real-Time Metrics: carries the audience in the
connectedUsersMetricsdataset and the share of requests answered from cache in thehttpMetricsdataset.
Implementation
- Stream live events to large audiences - builds this design end to end: the Live Ingest connector, the delivery rule, the encoder settings, and the checks for each.
- Applications quickstart - creates the application and the workload that serve the stream.
- Point a domain to a workload - creates the record that sends the stream’s hostname to the workload, in Edge DNS or at another DNS provider.
- Query Live Ingest connected users - reads the audience of the stream from the GraphQL API.