Skip to content

Twitch / Live Streaming — Notes#

Functional#

  • Live ingest from streamers; transcode + ABR delivery.
  • Real-time chat with mods + bot ecosystem.
  • VOD recording and clips.
  • Subscriptions, bits, ads.
  • Channel discovery + recommendations.

Non-functional#

  • Glass-to-glass latency 2–5 s (LL-HLS) or sub-second (WebRTC paths).
  • Concurrent streams: 100k+ live.
  • Concurrent viewers: 10M+ on big events.
  • 99.9% ingest availability.

Capacity#

  • Each streamer ingest: 6–10 Mbps × 100k streams = 1 Tbps ingest.
  • Egress at peak: tens of Tbps.
  • VOD storage: hundreds of PB.

Schema#

  • streams(channel_id, started_at, ingest_node, encodes[], status)
  • chat_messages(channel_id, user_id, ts, text, flags) (transient + archive)
  • vods(id, channel_id, started_at, duration, segments[])
  • clips(id, vod_id, start, end, creator_id)

Trade-offs#

  • Cloud + own POPs: own POPs near gaming PoPs reduce streamer latency.
  • Latency vs reliability: lower latency = smaller buffers = more rebuffering.
  • Per-stream transcoding is the dominant cost; not every stream gets full ladder (low-viewer streams stay source-only).

Refs#

  • Twitch engineering blog (Mixer, live transcoding, chat at scale), Amazon Interactive Video Service (IVS) docs, YouTube Live papers, "Low-Latency HLS" Apple spec, ByteByteGo "Design live streaming".