Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cdn [2025/02/06 01:15] ischluffcdn [2025/05/22 11:22] (current) ischluff
Line 2: Line 2:
  
 <bootnote> <bootnote>
-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:voctoweb]]. The File-CDN for media.ccc.de is described on [[software:voctoweb]].
Line 13: Line 13:
  
 == Architecture == Architecture
-The CDN-Cascade has stages: Master-Encoder, Ingest, Transcoder, Master-Relays and finally Edge-Relays.+The CDN-Cascade has stages: Master-Encoder, Ingest, Transcoder, Master-RelaysEdge-Relays and finally Load-balancers.
  
 {{:cdn_overview.png?1200|}} {{:cdn_overview.png?1200|}}
Line 62: 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 +=== 6Loadbalancer
- +
-The resulting stream URLs are as follows: +
- +
-HLS (H.264 multi-quality + multi-language) +
-* http://cdn.c3voc.de/hls/sX/native_hd.m3u8 +
- +
-MPEG-DASH (VPx multi-quality + multi-language) +
-* http://cdn.c3voc.de/dash/sX/manifest.mpd +
- +
-Moar HLS +
-* http://cdn.c3voc.de/hls/sX/translated_hd.m3u8 (also multi-language, just a different default language) +
-* http://cdn.c3voc.de/hls/sX/translated-2_hd.m3u8 +
-* http://cdn.c3voc.de/hls/sX/native_sd.m3u8 (only SD, but still multi-language) +
-* http://cdn.c3voc.de/hls/sX/translated_sd.m3u8 +
-* http://cdn.c3voc.de/hls/sX/translated-2_sd.m3u8 +
- +
-Audio-MP3: +
-* http://cdn.c3voc.de/sX_native.mp3 +
-* http://cdn.c3voc.de/sX_translated.mp3 +
-* http://cdn.c3voc.de/sX_translated-2.mp3 +
- +
-Audio-Opus: +
-* http://cdn.c3voc.de/sX_native.opus +
-* http://cdn.c3voc.de/sX_translated.opus +
-* http://cdn.c3voc.de/sX_translated-2.opus +
- +
-== Loadbalancers+
 The end-user facing domains ''streaming.media.ccc.de'' as well as ''cdn.c3voc.de'' are served by the load-balancers using DNS round robin. The end-user facing domains ''streaming.media.ccc.de'' as well as ''cdn.c3voc.de'' are served by the load-balancers using DNS round robin.
  
-=== streaming.media.ccc.de+==== streaming.media.ccc.de
 The load-balancers serve the [[:software:streamingwebsite|Streaming-Webseite]] under this domain. The sites run completely independent and are just kept in sync by the deployment script. With this procedure one or more load-balancers can easily be taken out of the DNS rotation if necessary. The load-balancers serve the [[:software:streamingwebsite|Streaming-Webseite]] under this domain. The sites run completely independent and are just kept in sync by the deployment script. With this procedure one or more load-balancers can easily be taken out of the DNS rotation if necessary.
  
-=== cdn.c3voc.de+==== cdn.c3voc.de
 Requests to ''cdn.c3voc.de'' are handled by haproxy on the load-balancers with redirects to one of the edge relays. The redirects are performed following a preconfigured weight distribution. Requests to ''cdn.c3voc.de'' are handled by haproxy on the load-balancers with redirects to one of the edge relays. The redirects are performed following a preconfigured weight distribution.
  
Line 102: Line 75:
 ``` ```
 # Get the current weight distribution, if not explicitly set the default is 100 # Get the current weight distribution, if not explicitly set the default is 100
-consul kv get -recurse /services/haproxy/backends/                                                                                                                                                                                                                                                         2025-02-06 0:54:27+consul kv get -recurse /services/haproxy/backends/
 services/haproxy/backends/live.event.c3voc.de/weight:1 services/haproxy/backends/live.event.c3voc.de/weight:1
 services/haproxy/backends/relive.c3voc.de/weight:1 services/haproxy/backends/relive.c3voc.de/weight:1
Line 109: 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://cdn.c3voc.de/hls/@slug/native_hd.m3u8 
 + 
 +Moar HLS 
 +  * http://cdn.c3voc.de/hls/@slug/translated_hd.m3u8 - also multi-language, just a different default language 
 +  * http://cdn.c3voc.de/hls/@slug/translated-2_hd.m3u8 
 +  * http://cdn.c3voc.de/hls/@slug/native_sd.m3u8 - only SD, but still multi-language 
 +  * http://cdn.c3voc.de/hls/@slug/translated_sd.m3u8 
 +  * http://cdn.c3voc.de/hls/@slug/translated-2_sd.m3u8 
 + 
 +**Currently not active:** 
 + 
 +MPEG-DASH (VPx multi-quality + multi-language) 
 +* http://cdn.c3voc.de/dash/@slug/manifest.mpd 
 + 
 +Audio-MP3: 
 +* http://cdn.c3voc.de/@slug_native.mp3 
 +* http://cdn.c3voc.de/@slug_translated.mp3 
 +* http://cdn.c3voc.de/@slug_translated-2.mp3 
 + 
 +Audio-Opus: 
 +* http://cdn.c3voc.de/@slug_native.opus 
 +* http://cdn.c3voc.de/@slug_translated.opus 
 +* http://cdn.c3voc.de/@slug_translated-2.opus 
 +== Dynamic SRT/RTMP endpoints with RTMP Auth
 SRT and RTMP Endpoints can be created under https://ingest.c3voc.de/backend/ (Password in keepass under ansible/stream-api/htpasswd). After creating the endpoint the stream can be pushed to any ingest machine. SRT and RTMP Endpoints can be created under https://ingest.c3voc.de/backend/ (Password in keepass under ansible/stream-api/htpasswd). After creating the endpoint the stream can be pushed to any ingest machine.
  
Line 127: Line 128:
  * Finalize srtrelay meshing to allow pushed streams to be pulled from any ingest machine.  * Finalize srtrelay meshing to allow pushed streams to be pulled from any ingest machine.
  
-=== Overview 
 {{drawio>diagram1.png}} {{drawio>diagram1.png}}
  
  
  
  • cdn.1738800936.txt.gz
  • Last modified: 2025/02/06 01:15
  • by ischluff