• Chozo@fedia.io
    link
    fedilink
    arrow-up
    46
    arrow-down
    1
    ·
    2 days ago

    The real reason is boring: CDN logistics.

    This will be a grossly oversimplified explanation. Streaming platforms mirror their files across dozens - sometimes hundreds - of server farms. However, it’s not efficient to mirror everything in every location. For instance, if a YouTube channel has a viewer base that is 99% located in the UK, it wouldn’t make sense to waste the bandwidth to transfer those files and the storage to keep them on servers in the US, in the off-chance an American clicks on that channel’s video. So when you try to play a video that isn’t already cached on your regional server, you have to fetch it from a farther-away server, which results in degraded stream quality as you’re literally accessing a file from a physically farther location. But a larger channel with a more widespread audience is more likely to have viewers in farther regions, so those files are more likely to get mirrored to other server locations.

    Ads, however, are smaller files, and are generally going to be locale-specific, so it makes sense to keep those cached in all the local servers. So you never have to reach far to pull an ad, but you may have to reach far to pull the content you actually want to see.

    • tyler@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      19
      ·
      2 days ago

      Wut. Quality has absolutely nothing to do with distance to the cdn server. That makes no sense whatsoever.

      • Capt. Wolf@lemmy.world
        link
        fedilink
        arrow-up
        20
        arrow-down
        1
        ·
        edit-2
        2 days ago

        It absolutely does…

        It’s called latency or ping. There’s relays and routers that pass data where it needs to go. Everything in between the request device and the supply device adds to it. Furthermore, data is still a physical object that requires time to travel. The longer the distance, the more time it takes to get where it’s going. That’s simple physics.

        • tyler@programming.dev
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          1 day ago

          latency and ping has absolutely nothing to do with video quality. the quality as it’s received by the client is going to be the exact same. You’re not losing data in the process. it’s not like a container ship that’s traveling across the ocean and for every 100 miles it travels it loses a container. If you’re getting buffering then sure, maybe you’re calling that ‘quality’ but it absolutely is not what anyone else means when they say quality.

      • spooky2092@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        16
        arrow-down
        1
        ·
        edit-2
        2 days ago

        It absolutely can. If you are accessing a server that is farther away, it has to traverse more distance on the wire and it takes more routers to pass the packets. The more hops you have, the more latency you have, especially if you get routed through a slower or overly congested link. All of that factors into the tcp window size, which can affect the transcode quality you receive.

        • tyler@programming.dev
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          1 day ago

          absolutely not… you can travel literally a thousand miles without hitting a router if you’re traveling transcontinental, whereas if you’re in a dorm in college and you live right next to an T1 node you can be hitting 15 different routers because your college actually uses a virtual network provider from the other side of town.

          Hops absolutely does not correspond to distance in any reasonable sense. Youtube also buffers to avoid that transcode quality issue, so no you’re getting the quality you ask for, but the bitrate might be different depending on your physical internet speed. The distance has jack shit to do with it.

      • ayyy
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        How did you come to that conclusion?