I shared a link from NPR Tiny Desk but there was no image preview or video embed. After investigating this I learned that when you do that, each instance picks up the link and individually retrieves the link preview nearly simultaneously. For gargantuan sites like YT or Reddit, this is a trivial amount of traffic and not a problem, but for smaller sites like NPR this results in a sort of botnet DDOS attack on the site’s servers. More here. Another example here . For that reason, NPR has blocked Fediverse servers like Mastodon.

I have experienced this on my personal server as well (DDOS), but at the time didn’t know why, exactly.

This isn’t the end of the world, but certainly is not great and hurts engagement with the content. Is there a solution for this? Perhaps using some sort of webtorrent service like PeerTube where they just fetch the information from another fediverse server instead of the source server? Maybe fetching embeds client-side? At least that would stagger the requests.

E: Many people have replied comparing this to the Reddit “hug of death” or “The Slashdot effect”. This is not the same at all. Those are legitimate site visits from humans that happen over the course of several hours. This is the result of several thousand servers all automatically fetching the same image simultaneously , and without any human involvement, and potentially next to zero human traffic to the site, which is why I compared it to a botnet or DDOS attack.

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    15
    ·
    3 days ago

    Sounds like every instance is doing the preview generation. Maybe it could grab the preview data it needs on the original instance, and pass that around with the post…

    • boonhet@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      Well you can’t really trust the original instance to be truthful with its preview.

  • ipkpjersi@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    Same thing used to happen with reddit giving sites the hug of death lol

    It’s unfortunate but kind of expected.

      • ipkpjersi@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        1 day ago

        You’re right, it’s not like… thousands of network connections are happening to the same site in both cases resulting in resource exhaustion.

        Oh, wait…

        • artyom@piefed.socialOP
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          2
          ·
          1 day ago

          Having things in common does not make them the same thing. I explained this in the OP.

          • ipkpjersi@lemmy.ml
            link
            fedilink
            English
            arrow-up
            1
            arrow-down
            2
            ·
            1 day ago

            You’re right, neither of them are known for providing thousands and thousands of distributed network connections to the same destination resulting in that same destination server running out of resources. They’re clearly not the same thing at all, no, definitely not at all.

  • GenosseFlosse@feddit.org
    link
    fedilink
    English
    arrow-up
    41
    ·
    4 days ago

    Is there a reason why the publishing instance is not downloading the preview image, and then submits it with the post to the other instances? This way they would not have to fetch it themselves.

    • Funkt4st1c@lemmy.world
      link
      fedilink
      English
      arrow-up
      35
      ·
      4 days ago

      Yeah, thats how it should be: one download, everyone else downloads from that server, not the original source.

      Seems abusable though

      • _haha_oh_wow_@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        17
        arrow-down
        1
        ·
        3 days ago

        It is, but that’s what defederation is for: If there are instances that are being sketchy, they are supposed to get cut off from the rest of the Fediverse.

      • Gibibit@lemmy.world
        link
        fedilink
        English
        arrow-up
        23
        arrow-down
        3
        ·
        3 days ago

        Seems abusable though

        If one instance doesn’t trust another, they shouldn’t federate in the first place.

      • a4ng3l@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 days ago

        Add metadata with a checksum of the og one with signature and let each client check that up.

        • inzen@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          edit-2
          3 days ago

          If it’s a signed checksum then maybe. But if the og instance is doing the abusing then it won’t help.

          • a4ng3l@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            3 days ago

            Yeah there must be some trust indeed of the og instance. A scoring system could help with that.

            • prenatal_confusion@feddit.org
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 days ago

              Or … Or we could stagger the requests of the different instances so that they don’t overload the linked site. Why reinvent the wheel?

              • a4ng3l@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                3 days ago

                Eventually that leaves the load to the source event if it’s differed. And the load would still grow along the growth of the fediverse. So this would likely be pushing the issue to tomorrow. Signing content checksum isn’t exactly like reinventing a wheel, it’s something done in many contexts. And it removes the load from the source entirely.

  • AdrianTheFrog@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    3 days ago

    it seems like ideally it shouldn’t attempt to preview the link before a user tries to view the content. i guess that would increase latency for users though

  • cybervegan@lemmy.world
    link
    fedilink
    English
    arrow-up
    35
    ·
    4 days ago

    I have my blog address (which goes to my home server) in my Mastodon profile, and every time I post on Masto, my server gets a request from every Mastodon site that federates with my instance - i.e. hundreds of requests. It’s no problem for my server, because my blog is a static site, but for anything that dynamically generates every single page impression (like worpress or joomla), it could be a problem. Caching settings might help, I suppose.

    Truth is, though, I get far more traffic from vulnerability scanners and AI crawlers that don’t honour robots.txt (or aren’t yet listed).

    • 0x0@lemmy.zip
      link
      fedilink
      English
      arrow-up
      11
      ·
      3 days ago

      that don’t honour robots.txt (or aren’t yet listed).

      Throw’em in the tar pit.

      • cybervegan@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 days ago

        Limited mental capacity these days, so I don’t have the spoons to properly research and implement a solution at the moment. I installed Nepenthes last year, but I’ve never managed to get round to integrating it into my site. It’s low priority at the moment.

    • iglou@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      To be honest, if a website has no caching of their server-rendered parts, they are also doing something wrong! Very little sites really need to re-render a public page on every view.

      • cybervegan@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        3 days ago

        Around 2010, I used to work at an MSP, and once had a customer that ran a custom LAMP stack website for local radio UK stations web presence. It was a bit slow, running on a dedicated physical server, but every time it snowed, the website would 500 out - because of too many requests to the “School Closures” page. The site had no caching other than Apache’s internal cache, but PHP pages could not be cached because “reasons”, and the original developer was “not available”. I optimised their MySQL indexes, increased the number of Apache workers, and it improved the render time per page and number of concurrent connections. Stress testing looked good.

        Anyway, some months later, 2AM one snowy morning, I was on call, and it went down again. This was when I discovered the school closures problem. After diagnosing, and then liaising with the customer to discuss the options, I was told “just make it work”. I ended up modifying the PHP script to add some “on spec” caching that saved the HTML to a temp file in ramdisk, and only re-ran the query-and-render code if the cached copy was more than 5 minutes old. It was hacky, but it did the trick, and I was finished by about 4 AM. This hack was later applied at their request to a number of trouble-points in the source tree, as and when things broke.

        We recommended adding a Varnish cache, and found a more generalised caching library but they wouldn’t/couldn’t authorise engineering work for this - they were running on a shoestring - and they already had the tech break-fix contract with us, and decided it was sufficient to just spot fix things as they broke rather than fix the root cause.

        I left that MSP in 2012, so I don’t know what happened after that, but as far as I know, the site could still be running… unlikely, but possible.

  • Rimu@piefed.social
    link
    fedilink
    English
    arrow-up
    61
    ·
    4 days ago

    Lemmy does this to itself, too - when you create a post it federates out and then every Lemmy instance that receives it makes a GET request to retrieve the post from the original server. Even though it just received the exact same data. Some other fedi software is even worse - Akkoma does a GET of the id of every activity it receives, not just for posts but for Likes too.

    It’s insane.

    Anyway, proper caching at the reverse proxy / Cloudflare level solves it. The same kind of caching setup would do the same for sites serving HTML, like NPR too.

    • Ghoelian@piefed.social
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 days ago

      That’s weird. Is that how it’s supposed to work, or did they just implement it in a bad way?

      • Rimu@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        3 days ago

        I’m not sure but my guess it’s an attempt to deal with the problem where sometimes federation activities arrive in the wrong order (especially after an instance has been offline for a while) - by making a GET to the origin server you can be sure you’ve got the latest version of the content. There are probably better ways to achieve that, though.

        PieFed prioritises efficiency over correctness so it just accepts whatever is sent to it. In 3 years no one has complained about seeing stale content although I’m sure it happens occasionally.

  • trebach@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I added a rule in my .htaccess for their user agents to direct all requests to a static page on my domain.

  • ByteJunk@lemmy.world
    link
    fedilink
    English
    arrow-up
    39
    ·
    4 days ago

    I mean, just how many instances are gonna ping the URL? Several hundred, low thousands at worst?

    Unless it happens to be some very large media content or a dynamic page with no caching, I’d think the automated federation hits shouldn’t be too bad.

    The influx of users that might come after a viral post though, that’s rough…

    • dreamkeeper@lemmy.world
      link
      fedilink
      English
      arrow-up
      16
      arrow-down
      1
      ·
      4 days ago

      It’s just bad design. What happens when/if the fediverse scales up to many more instances?

      • 1984@lemmy.today
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        4 days ago

        I liked writing efficient code but every place I worked didn’t care at all about it. All they wanted was a finished feature and a kanban note moved to finished.

        • mcv@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          The many pointless presentations I’ve given about tech debt and code quality. Argued for redesigning poorly designed systems. They don’t care. Just churn out more features to cross off the list, and why do those features take so long?

          • 1984@lemmy.today
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            3 days ago

            Yeah I think a lot of us share this experience. All the stuff we are tought in our educations about clean code and architecture… Once we come out and work, management don’t want that stuff if it takes extra time. They want features shipped as soon as possible, and every meeting is about “how fast can you do this feature”.

            And now of course embracing AI since it’s so fast. When things break, engineers will have to figure out the problem when the entire system is down, not management. :)

            And then they can have a post mortem where they say that engineering must have better routines…lol.

            I no longer work in tech but I quit at the top I think, before Ai was a requirement. And when consulting salaries was still good. Now they are awful.

    • Doom@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      3 days ago

      Yeah but we can’t say we want to encourage people to have/build/share independent smaller websites then beat them up when they are linked. That’s a huge mismatch of morality. Either we want to encourage people off the big platforms and should make it easier for the little guys or we are blowing magic smoke.

  • dropdrip@lemmy.ml
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    4
    ·
    4 days ago

    It’s almost like the software that powers the internet was designed for a different time and is only still used because there’s monied interest in keeping it around. We need GNUnet.

  • Pamasich@kbin.earth
    link
    fedilink
    arrow-up
    9
    ·
    4 days ago

    I don’t really get it. The image is federated, there’s no need for instances to refetch it. Just checked out some posts and indeed it’s there, in the image property. With the URL pointing to the Lemmy instance.

    So if this is actually an issue, that’s just bad programming and needs to be fixed.

    Edit: didn’t notice OP uses Piefed. Unlike Lemmy and Mbin, it seems like Piefed doesn’t federate it.

    Edit: actually I’m blind, Piefed does federate it too, sorry piefed

      • Pamasich@kbin.earth
        link
        fedilink
        arrow-up
        9
        ·
        4 days ago

        I just took this random post from my frontpage: https://sh.itjust.works/post/68605733 and made a manual request for the federated JSON-LD.

        {
          "@context": [
            "https://join-lemmy.org/context.json",
            "https://www.w3.org/ns/activitystreams"
          ],
          "type": "Page",
          "id": "https://sh.itjust.works/post/68605733",
          "attributedTo": "https://sh.itjust.works/u/derrickoswald",
          "to": [
            "https://lemmy.world/c/technology",
            "https://www.w3.org/ns/activitystreams#Public"
          ],
          "name": "Stratospheric airship flew from US to Japan and back",
          "cc": [],
          "content": "<p>It seems with an unmanned airship they should be using hydrogen for the ~8% increased payload capacity.</p>\n",
          "mediaType": "text/html",
          "source": {
            "content": "It seems with an unmanned airship they should be using hydrogen for the ~8% increased payload capacity.",
            "mediaType": "text/markdown"
          },
          "attachment": [
            {
              "href": "https://arstechnica.com/gadgets/2026/10/trans-pacific-journey-tested-stratospheric-cell-tower-concept-in-japan/",
              "mediaType": "text/html; charset=utf-8",
              "type": "Link"
            }
          ],
          "image": {
            "type": "Image",
            "url": "https://sh.itjust.works/pictrs/image/df608ab3-b644-489d-b217-9224aa09e203.jpeg"
          },
          "sensitive": false,
          "published": "2026-10-19T20:16:37.383385Z",
          "language": {
            "identifier": "en",
            "name": "English"
          },
          "audience": "https://lemmy.world/c/technology",
          "tag": [
            {
              "href": "https://sh.itjust.works/post/68605733",
              "name": "#technology",
              "type": "Hashtag"
            }
          ]
        }
        

        Notice the

        "image": {
            "type": "Image",
            "url": "https://sh.itjust.works/pictrs/image/df608ab3-b644-489d-b217-9224aa09e203.jpeg"
          }
        

        Yes the image itself isn’t sent over (iirc they never are?), but it’s stored on sh.itjust.works. Other instances grab it from there, not the website the post links to.

        I did notice just now though that some Lemmy instances seem to just proxy the image through their servers, which I assume is to avoid CORS. But that’s an instance choice, not a general fediverse issue.

        Mbin does the same as Lemmy, but it also includes the image in the attachment property. Probably for compatibility with some other platform.

        One thing I didn’t notice before was that you’re using Piefed. That’s the one software I didn’t check before writing my previous comment. It does seem like Piefed is the outlier here. I tried a post from piefed.ca and the image is nowhere to be seen. The image property is not present, it’s not in the attachment array, and I can’t see any other property that contains it.

        Edit: A piefed.social post I just tried did have an image, so I assume I’m just blind.

      • Ghoelian@piefed.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        4 days ago

        Are you sure? In your post you’re talking about fetching an image for a link preview, not an image post.

        Usually, when I see an image post, the source is actually the pictrs of the source instance, so in that case I think it is federated.

          • Ghoelian@piefed.social
            link
            fedilink
            English
            arrow-up
            4
            ·
            edit-2
            4 days ago

            I figured a post with a link with preview image wouldn’t be the same in terms of event as an image post. Turns out it pretty much is, but also, I checked a few posts and cross-posts across instances, all of them have an image url of the original instance, not the one I’m viewing on. So if they are individually fetching this image, they’re not using it.

            Edit: I was wrong, two of the crossposts just didn’t respond to the request for activity, so I was looking at the wrong response data

          • Goodlucksil@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            4 days ago

            The image isn’t federated, but [I believe] it should be.

            But I am already thinking it shouldn’t be because of hosting concerns.