Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cdn [2025/02/06 01:04] – ischluff | cdn [2025/05/22 11:22] (current) – ischluff | ||
---|---|---|---|
Line 2: | Line 2: | ||
< | < | ||
- | This documentation describes our Livestreaming CDN as of 2024. | + | This documentation describes our Livestreaming CDN as of 2025. |
The File-CDN for media.ccc.de is described on [[software: | The File-CDN for media.ccc.de is described on [[software: | ||
Line 13: | Line 13: | ||
== Architecture | == Architecture | ||
- | The CDN-Cascade has 5 stages: Master-Encoder, | + | The CDN-Cascade has 6 stages: Master-Encoder, |
{{: | {{: | ||
Line 43: | Line 43: | ||
# consul kv get / | # consul kv get / | ||
myloc-transcoder3 | myloc-transcoder3 | ||
+ | |||
+ | # To reallocate a transcoder for a stuck stream | ||
+ | consul kv delete / | ||
``` | ``` | ||
Line 59: | Line 62: | ||
The edge relays run nginx with caching proxy config and upstream set to the master relay. | The edge relays run nginx with caching proxy config and upstream set to the master relay. | ||
- | == Stream-URLs | + | === 6. Loadbalancer |
- | + | ||
- | The resulting stream URLs are as follows: | + | |
- | + | ||
- | HLS (H.264 multi-quality + multi-language) | + | |
- | * http:// | + | |
- | + | ||
- | MPEG-DASH (VPx multi-quality + multi-language) | + | |
- | * http:// | + | |
- | + | ||
- | Moar HLS | + | |
- | * http:// | + | |
- | * http:// | + | |
- | * http:// | + | |
- | * http:// | + | |
- | * http:// | + | |
- | + | ||
- | Audio-MP3: | + | |
- | * http:// | + | |
- | * http:// | + | |
- | * http:// | + | |
- | + | ||
- | Audio-Opus: | + | |
- | * http:// | + | |
- | * http:// | + | |
- | * http:// | + | |
- | + | ||
- | == Loadbalancers | + | |
The end-user facing domains '' | The end-user facing domains '' | ||
- | === streaming.media.ccc.de | + | ==== streaming.media.ccc.de |
The load-balancers serve the [[: | The load-balancers serve the [[: | ||
- | === cdn.c3voc.de | + | ==== cdn.c3voc.de |
Requests to '' | Requests to '' | ||
Line 99: | Line 75: | ||
``` | ``` | ||
# Get the current weight distribution, | # Get the current weight distribution, | ||
- | consul kv get -recurse / | + | consul kv get -recurse / |
services/ | services/ | ||
services/ | services/ | ||
Line 106: | Line 82: | ||
Because of the behavior of HLS/DASH clients if a client fetches a playlist file and gets a redirect, all further requests go to the same origin. With this trick the clients stay persistently on one relay until they are redirected. | Because of the behavior of HLS/DASH clients if a client fetches a playlist file and gets a redirect, all further requests go to the same origin. With this trick the clients stay persistently on one relay until they are redirected. | ||
- | === Dynamic SRT/RTMP endpoints with RTMP Auth | + | == Stream-URLs |
+ | |||
+ | The resulting stream URLs are as follows (replace @slug with your actual stream slug): | ||
+ | |||
+ | HLS (H.264 multi-quality + multi-language) | ||
+ | * http:// | ||
+ | |||
+ | Moar HLS | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | **Currently not active:** | ||
+ | |||
+ | MPEG-DASH (VPx multi-quality + multi-language) | ||
+ | * http:// | ||
+ | |||
+ | Audio-MP3: | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | Audio-Opus: | ||
+ | * http:// | ||
+ | * http:// | ||
+ | * http:// | ||
+ | == Dynamic SRT/RTMP endpoints with RTMP Auth | ||
SRT and RTMP Endpoints can be created under https:// | SRT and RTMP Endpoints can be created under https:// | ||
Line 115: | Line 119: | ||
== Future improvements | == Future improvements | ||
- | The diagram below shows the planned | + | The diagram below shows the envisioned |
- | The main remaining items are as follows: | + | Some more potential improvements |
* Dynamically adapting the streaming-website to the existence/ | * Dynamically adapting the streaming-website to the existence/ | ||
- | | + | |
* To gracefully shutdown a relay it could be instructed via consul KV to redirect all clients back to a load balancer while taking it out of the haproxy redirects. That way all clients would be redistributed to different relays. | * To gracefully shutdown a relay it could be instructed via consul KV to redirect all clients back to a load balancer while taking it out of the haproxy redirects. That way all clients would be redistributed to different relays. | ||
+ | * Build master relay redundancy using dynamic upload client and relay upstream configuration. (Relay upstreams need to be sticky, because the HLS playlists generated on the master relay are not deterministic) | ||
+ | * Use DNS rotation on ingest | ||
+ | * Finalize srtrelay meshing to allow pushed streams to be pulled from any ingest machine. | ||
- | === Overview | ||
{{drawio> | {{drawio> | ||