• cbarrick@lemmy.world
    link
    fedilink
    English
    arrow-up
    46
    arrow-down
    2
    ·
    edit-2
    2 months ago

    Just put the site behind a cache, like Cloudflare, and set your cache control headers properly?

    They mention that they are already using Cloudflare. I’m confused about what is actually causing the load. They don’t mention any technical details, but it does kinda sound like their cache control headers are not set properly. I’m too lazy to check for myself though…

    • Max-P@lemmy.max-p.me
      link
      fedilink
      English
      arrow-up
      21
      ·
      2 months ago

      Even without Cloudflare, simple NGINX microcaching would help a ton there.

      It’s a blog, it doesn’t need to regenerate a new page every single time for anonymous users. There’s no reason it shouldn’t be able to sustain 20k requests per second on a single server. Even a one second cache on the backend for anonymous users would help a ton there.

      They have Cloudflare in front, the site should be up with the server being turned off entirely.

    • Rimu@piefed.social
      link
      fedilink
      arrow-up
      17
      ·
      edit-2
      2 months ago

      I’ve found that if left on default settings, CloudFlare is not that great at caching. It requires a bit of configuration to really make it sing. itsfoss.com thought they were “using CloudFlare” but probably not to it’s fullest potential.

      • cbarrick@lemmy.world
        link
        fedilink
        English
        arrow-up
        10
        ·
        2 months ago

        If caching is properly configured, the cache (Cloudflare) will see thousands of requests, but the VPS should only see one request.

      • tacofox@lemm.ee
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        5
        ·
        2 months ago

        This should be front and center, caching won’t be able to make up for that…

        • breakingcups@lemmy.world
          link
          fedilink
          English
          arrow-up
          20
          ·
          edit-2
          2 months ago

          Of course it will, cloudflare is in front of it, they can definitely handje this traffic as long as itsfoss bothers to set correct caching headers for cloudflare to use. That’s the entire point of cloudflare…

  • tedu@azorius.net
    link
    fedilink
    arrow-up
    28
    arrow-down
    1
    ·
    2 months ago

    Real talk, the mastodon traffic stampede isn’t that bad for a properly configured website.

  • Handles@leminal.space
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    2
    ·
    2 months ago

    There’s another reason I don’t share “It’s FOSS” links anywhere: this should have been a github issue but it’s turned into a clickbaity headline. Every othe article coming out of “It’s FOSS” is either low effort, sensationalist, or both.

  • parpol@programming.dev
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    3
    ·
    2 months ago

    Their website isn’t properly caching pages which is the real reason they’re having problems.

  • SatyrSack@lemmy.one
    link
    fedilink
    English
    arrow-up
    17
    ·
    2 months ago

    Direct link to article:

    https://news.itsfoss.com/mastodon-link-problem/

    TL;DR:

    When you share a link on Mastodon, a link preview is generated for it, right?

    With Mastodon being a federated platform (a part of the Fediverse), the request to generate a link preview is not generated by just one Mastodon instance. There are many instances connected to it who also initiate requests for the content almost immediately.

    And, this “fediverse effect” increases the load on the website’s server in a big way.

    Does Lemmy not cause this issue? Other federated software was not mentioned in the article at all.

    • chameleon@kbin.social
      link
      fedilink
      arrow-up
      5
      ·
      2 months ago

      Lemmy (and Kbin for that matter) very much do the same thing for posts. I don’t think they fetch URL previews for links in comments, but that doesn’t matter: posts and comments are both fairly likely to end up spreading to Mastodon/etc anyway, so even comments will trigger this cascade.

      Direct example: If you go to mastodon.social, stick @fediverse@lemmy.world in the search box at the topleft and click for the profile, you can end up browsing a large Mastodon server’s view of this community, and your very link has a preview. (Unfortunately, links to federated communities just result in a redirect, so you have to navigate through Mastodon’s UI.)

    • iltg@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      19
      arrow-down
      1
      ·
      2 months ago

      thanks for saying this! i really don’t want to victim blame itsfoss for getting traffic spikes but if you cant handle ~20MB in one minute (~400kbps) of traffic you’re doing something really really wrong and you really should look into it, especially if you want to distribute content. crying “dont share our links on mastodon” also sounds like hunting windmills, block the mastodon UA and be done with it, or stop putting images in your link previews for mastodon, or drop link previews completely. a “100 mb DDOS” is laughable at best, nice amplification calculation but that’s still 100 megs

        • chiisana@lemmy.chiisana.net
          link
          fedilink
          English
          arrow-up
          4
          ·
          2 months ago

          AWS charges $0.09/GB. Even assuming zero caching and always dynamically requested content, you’d need 100x this “attack” to rack up $1 in bandwidth fees. There are way faster ways to rack up bandwidth fees. I remember the days where I paid $1/GB of egress on overage, and even then, this 100MB would’ve only set me back $0.15 at worst.

          Also worth noting that those who’d host on AWS isn’t going to blink at $1 in bandwidth fees; they’d be hosting else where that offers cheaper egress (I.e. billed by megabits or some generous fixed allocation); those that are more sane would be serving behind CDNs that’d be even cheaper.

          This is a non-issue written by someone who clearly doesn’t know what they’re talking about, likely intended to drum up traffic to their site.

            • chiisana@lemmy.chiisana.net
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              2 months ago

              Fortunately, you’d be very hard pressed to find bandwidth pricing from 18 years ago.

              The point is the claimed issue is really a non issue, and there are much more effective ways to stress websites without needing the intermediary of fediverse.

  • Sean Tilley@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    2
    ·
    2 months ago

    It’s an interesting and frustrating problem. I think there are three potential ways forward, but they’re both flawed:

    1. Quasi-Centralization: a project like Mastodon or a vetted Non-Profit entity operates a high-concurrency server whose sole purpose is to cache link metadata and Images. Servers initially pull preview data from that, instead of the direct page.

    2. We find a way to do this in some zero-trust peer-to-peer way, where multiple servers compare their copies of the same data. Whatever doesn’t match ends up not being used.

    3. Servers cache link metadata and previews locally with a minimal amount of requests; any boost or reshare only reflects a proxied local preview of that link. Instead of doing this on a per-view or per-user basis, it’s simply per-instance.

    I honestly think the third option might be the least destructive, even if it’s not as efficient as it could be.

    • Quacksalber@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 months ago

      As I understand it, 3) already happens. What causes the load is that each connected instance is also loading and caching the preview.

    • chiisana@lemmy.chiisana.net
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 months ago

      Or 4) Ignore noise and do nothing; this is a case of user talking about things they don’t understand at best, or a blog intentionally misleading others to drum up traffic for themselves at worst. This is literally not a problem. Serving that kind of traffic can be done on a single server without any CDN and they’ve got a CDN already.

  • katy ✨@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    2 months ago

    i mean it’s solid training but they do realise it’s not limited to mastodon, right?

    the slashdot effect has been around for years