Summary by TwinMind · 12m 10s
Summary by TwinMind · 12m 10s

How Discord Broke YouTube

How Discord Broke YouTube

Theo - t3․gg

Theo - t3․gg

Discord's April Fools Loot Box Video Incident

  • Discord uploaded April Fools loot box video as joke about worthless paid content
  • Embedded video in Discord app with hover-to-play feature
  • Video generated 1.4 billion views in 2 days through YouTube iframe embed
  • Discord tweeted "oops" acknowledging the mistake

Why Discord Used YouTube Embed Instead of Self-Hosting

  • Video hosting extremely expensive at scale
  • MX pricing example: $0.09-0.1 cents per minute delivery
    • 1 million users × 1 minute = hundreds of thousands of dollars
    • Live video costs 3x more at 3 cents per minute encoding
  • Calculated cost: 1.4 billion views would have cost $1.3 million via MX
  • YouTube hosting is free, making it logical choice for public content
  • Discord effectively made YouTube cover their video hosting costs

YouTube View Tracking Complexity

  • YouTube tracks views based on "would viewer say they watched it" principle
  • 2-hour video watched for 15 seconds = no view
  • 30-second video watched for 25 seconds = likely view
  • View tracking algorithm not documented, constantly changing
  • Not simple "hit play = view" system

The Embed Problem

  • Every Discord user had video playing in background on April 1st
  • Video downloaded, decoded using GPU/CPU resources
  • Massive bandwidth, CPU, energy costs across all Discord users
  • Video was looping (loops shouldn't count but likely did with these numbers)
  • View count comparison: #10 most-viewed YouTube video has 5 billion views over 6 years
  • Discord got 1/5th that amount in 2 days

Viewbotting and Platform Challenges

  • Platforms struggle to detect legitimate vs fake views
  • Historical Twitch embed issues:
    • Fandom/Wiki sites embedded random streamers
    • Views jumped from 20 to 2,000 when embedded on Stardew Valley wiki
    • Hidden embeds still counted as views
  • Twitch had to overhaul embed detection systems
  • Viewbotting still exists with $5 services offering 10x view increases

Infrastructure Costs of Fake Views

  • Each fake view requires video feed distribution
  • Millions of fake views = millions in costs
  • Makes platforms less trustworthy
  • Ad blocker example: uBlock Origin would spam Twitch video endpoints hundreds of times to bypass ads
  • Effectively DDoS'd Twitch infrastructure

YouTube's View Count Throttling

  • Similar to classic "301 views" bug
  • High view velocity triggers analysis queue
  • Database writes become expensive at scale (millions per second)
  • Views get locked, analyzed, then batch-updated
  • Chart showed multiple lock/unlock cycles during incident

Technical Analysis and Blame

  • Discord engineer expressed surprise at view count
  • Bug not intuitive even for experienced developers
  • YouTube iframe embeds counting all mounts as views unexpected
  • Potential fixes:
    • Detect if iframe actually in viewport
    • Don't count short videos in iframes
    • Don't count iframe views at all
  • Author admits would have made same mistake
  • Autoplay videos questionable for chat applications