CDN warmup streams on Edge¶
Overview¶
Usually, a CDN stream starts longer for the first subscriber on Edge because it needs time to establish a media connections between nodes. Since build 5.3.295, a CDN streams may be warmed up, or pre-pulled from Origin to Edge (via Transcoder if needed).
CDN warmup configuration¶
Streams warming up should be enabled by the following parameter on Edge server
By default, no streams are pulled. A special configuration file /usr/local/FlashphonerWebCallServer/conf/cdn_warmup_trap.json is needed to pull anything. This prevents a possible inner CDN channels and server overload.
A simplest configuration to allow all the CDN streams pulling to the Edge (this is not recommended for production use)
And more complex filter example:
- streams named
abrStreamare pulled in two profiles and in original quality; - streams named
sourceStreamare pulled in in original quality only - all the rest streams are pulled in 360p quality
{
"streams" :
[
{
"streamName" : "abrStream.*",
"serverIps" : [ "192.168.88.0/24" ],
"abr": true,
"profiles" : [ "SOURCE", "-720p", "-360p" ]
},
{
"streamName" : "sourceStream.*",
"serverIps" : [ "192.168.88.0/24" ],
"profiles" : [ "SOURCE" ]
},
{
"streamName" : ".*",
"serverIps" : [ "192.168.88.0/24" ]
}
],
"defaultProfile" : "-360p"
}
Where:
streamName- stream name mask to pullserverNames- a list of Origin server domain names to pull a streams published on themserverIps- a list of Origin server IP addresses or masks to pull a streams published on themprofile- a profile to transcode streams while pulling, should be described incdn_profiles.ymlfileSOURCE- a special keyword for original quality (no any video transcoding)defaultProfile- a default transcoding profile to use if profile is not defined for the filter
The stream conforming to filter will be pulled from Origin, and will never be stopped until its publishing stop.
CDN warmup REST API¶
CDN streams may be warmed up via REST API /rest-api/v3/cdn/warmup