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.

  • FundMECFS@piefed.zip
    link
    fedilink
    English
    arrow-up
    16
    ·
    2 小时前

    Thanks for bringing this up. I think in general we need to work on optimisation of Activitypub and Threadiverse implementations of it.

  • GenosseFlosse@feddit.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 小时前

    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
      5
      ·
      1 小时前

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

      Seems abusable though

  • cybervegan@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 小时前

    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).

  • dropdrip@lemmy.ml
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    3
    ·
    4 小时前

    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.

    • milbyte@lemmy.ml
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      1 小时前

      is there something that makes this different to 17 other proposals for a new internet or is it just a case of https://xkcd.com/927/

    • sem@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 小时前

      GNUnet helps building a new Internet

      GNUnet is a network protocol stack for building secure, distributed, and privacy-preserving applications.

      With strong roots in academic research, our goal is to replace the old insecure Internet protocol stack.

      GNUnet provides privacy-by design

      It provides [improving addressing, routing, naming and content distribution](https://www.w3.org/2014/strint/papers/65.pdf) in a technically robust manner - as opposed to ad-hoc designs in place today.

  • ByteJunk@lemmy.world
    link
    fedilink
    English
    arrow-up
    33
    ·
    6 小时前

    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…

      • 1984@lemmy.today
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        2 小时前

        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.

  • Pamasich@kbin.earth
    link
    fedilink
    arrow-up
    8
    ·
    6 小时前

    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.

      • Pamasich@kbin.earth
        link
        fedilink
        arrow-up
        4
        ·
        4 小时前

        Tl;dr: Lemmy and Mbin attach an image, Piefed seems not to. Though some Lemmy instances seem to only proxy the image, not host anything themselves.


        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.

      • Ghoelian@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 小时前

        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
            3
            ·
            4 小时前

            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
            ·
            1 小时前

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

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

  • wjs018@piefed.wjs018.xyz
    link
    fedilink
    English
    arrow-up
    154
    ·
    12 小时前

    There are two proposed solutions I have seen. I do not claim that this is exhaustive, just only limited to the proposals that I have stumbled across.

    FASP - Fediverse Auxiliary Service Provider

    The idea that mastodon has is to have a third-party service that does something like generate a link preview once and then share that to fediverse instances that need it. They have a whole spec they wrote up about these kinds of services that can be run to help out fediverse instances with different things like this, search, or discoverability. They call these FASPs - the repo with the spec is here.

    I don’t yet know of any FASP that is live and running, so it is kind of a paper spec at the moment. I don’t do too much on the microblogging side of the fediverse though, so I very well could be wrong.

    Federate link metadata and the post at the same time

    This comes from an issue on PieFed’s repo. It is basically just an idea at this point, but it is a pretty basic one; have the originating instance fetch the link preview information and simply federate it out alongside the post itself.

    • panos@catodon.rocks
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 小时前

      But what happens when a link target changes? For example, I’ve seen news articles change as the author gets new information. Might be an edge case, but a solution like this would always show the preview at the time of the initial post.

    • Pamasich@kbin.earth
      link
      fedilink
      arrow-up
      1
      ·
      3 小时前

      Both Lemmy and Mbin already attach the preview image to the post via the image property, which is of type Image with a URL pointed at the hosting instance. Receiving instances can then fetch that URL instead of the article.

      Is there a reason why Piefed doesn’t use this already established approach?

    • tuckerm@feddit.online
      link
      fedilink
      English
      arrow-up
      53
      ·
      11 小时前

      I’m a fan of the second one. My thought is, if you trust a server enough to accept messages from it, then you should also trust it enough to let it scrape the page title, article image, etc. for you, too.

      • timochka@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 小时前

        The great thing about this if you run a server, as soon as a user posts a link to some kiddy porn, you not only download it automatically, you distribute it as well. Go-go-gadget-jailtime.

        (Actually already a problem with Mastodon federation of image posts, and why I would strongly encourage against anyone in a strict liability jurisdiction from running their own Mastodon server tbh.)

        • Wildmimic@anarchist.nexus
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 小时前

          There’s no reason to believe that this mechanism doesn’t check for CSAM (I am also pretty stumped that this is actually a problem with Mastodon according to your comment?) . Lemmy had a phase where messed up stuff got federated, which led to @db0@lemmy.dbzer0.com’s implementation of an anti-CSAM tool: https://github.com/db0/fedi-safety, which is based on the CSAM detection tool for the AI Horde: https://dbzer0.com/blog/ai-powered-anti-csam-filter-for-stable-diffusion/ - it’s probably not so hard to adapt for Mastodon too.

          • timochka@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 小时前

            If you want to trust a hypothetical “detects CSAM honest” feature with something like this, well, you go ahead.

            I mean; just imagine for one moment that lemmy.ml actually is the hotbed of revolutionaries that is going to usher in the Glorious Revolution that it thinks it is; it starts actually moving mountains, politically speaking.

            And, some bright spark has implemented the “automatically download and distribute content from unverified sources, protected only by the open-source Kiddy-Porno-Matic Verifier v0.1.23” feature.

            If I were Peter Thiel it would take me 5 minutes to start posting links that caused lemmy.ml’s servers to start downloading and then distributing kiddy porn, about 20 minutes to get some tame journalists parked outside the owners’ houses and lemmy.ml’s datacentre, and another 10 minutes to call up the friendly neighbourhood goons in wherever they are located for the photogenic armed raid. And once the “revolutionary leaders in court for making and distributing child pornography” headlines had finished writing themselves, I wouldn’t even worry about whether the court would accept the “but we ran the Kiddy-Porno-Matic Verifier v0.1.23!” defence, because their lives would be over already. No smoke without fire, after all…

            Nah. “Automatically download and distribute content” features need rather more thinking through than historically Mastodon et al have given them. They certainly don’t need to create any more.

            (And to be clear - maybe Mastodon has fixed some of their underlying problems - I ran an instance a few years ago, and the constant whack-a-mole of blocking actual-Nazi and actual-Pedo instances, and the risk that it could just go ahead and download something to my servers because a user followed the wrong person had me shutting it down not long after. As I say, maybe they fixed that - but this mooted feature would be bringing back the same problem.)

            Of course, maybe Lemmy.ml is (a) hosted in a jurisdiction where they don’t give a fuck, and (b) can afford to defend themselves. But this kind of feature will actively work against people who otherwise might host a small instance, and I thought that is what we wanted, not just a few massive instances that can afford to lawyer up.

            All, I should say, IMHO of course.

      • shrek_is_love@lemmy.ml
        link
        fedilink
        English
        arrow-up
        11
        ·
        10 小时前

        Seems like a no-brainer! They could even leave the old behavior as an option for instance admins to re-enable, but if they default it to not DDoSing, that would make a huge difference.

    • jaybone@lemmy.zip
      link
      fedilink
      English
      arrow-up
      93
      ·
      12 小时前

      That second solution is what I thought of as doing as I read this. It doesn’t rely on a third party service being up. And that instance has to do that work anyway. So why not just share the results with others?

      • khannie@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        7 小时前

        It was my first thought too but there are downsides to it. Trust is a small one given the nature of the system but compute and bandwidth costs could be an issue also, especially for larger instances.

        The first solution is more fragile but could be CDN’d and those are cheap.

        • Ghoelian@piefed.social
          link
          fedilink
          English
          arrow-up
          4
          ·
          5 小时前

          I don’t think compute resources should be an issue, if anything it saves other instances resources.

          As far as I understand, right now, all instances are fetching this data individually, so they all have the same compute load from this. Doing it on one and sending it along with federation should keep resource useage pretty much the same on the originating instance, and less for all others.

          This would still increase bandwidth of course, but at least with all VPS providers I have used, bandwith is pretty cheap.

        • 4am@lemmy.zip
          link
          fedilink
          English
          arrow-up
          91
          ·
          11 小时前

          The same way you know the rest of the data hasn’t been tampered with - you don’t. And when you find untrustworthy instances, you defederate from them.

          • SorteKanin@feddit.dk
            link
            fedilink
            English
            arrow-up
            9
            arrow-down
            1
            ·
            4 小时前

            That’s not true, you know the data hasn’t been tampered with because of HTTP signatures. The fediverse isn’t just “yolo, just trust me bro”. There are some parts that are a bit more towards that side (particularly with groups on Lemmy) but I don’t think this should be.

        • jaybone@lemmy.zip
          link
          fedilink
          English
          arrow-up
          35
          ·
          11 小时前

          I’m trusting the user who submitted the link and/or the instance that user is on. I’m doing that anyway by clicking on their link right?

        • rako@tarte.nuage-libre.fr
          link
          fedilink
          Français
          arrow-up
          2
          ·
          6 小时前

          So I receive a post from someone presumably with some comment, along with a preview of a link, and I’m supposed to trust one but not the other ?

    • Rimu@piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 小时前

      Really the only metadata we are interested in is the thumbnail image url. Afaik PieFed already retrieves this from the og:image meta tag before sending the URL along with the other post content to the instance hosting the community.

      Another idea - those meta tags are also retrieved during post composition in an ajax call, in order to prepopulate the title and body fields so the image url could be stashed in a hidden field at that point…

  • Rimu@piefed.social
    link
    fedilink
    English
    arrow-up
    68
    ·
    12 小时前

    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
      3
      ·
      5 小时前

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

      • The_Decryptor@aussie.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 小时前

        It’s an access control method, called “authorized fetch”. Rather than broadcasting the data you just announce the source of it, and then any client that wants to show it needs to negotiate with the originating server to request the data (And then blocklists and such come into play)

        Say you’ve got 3 users, A, B, and C. A has blocked C, B follows A, and C follows B. Now A makes a post, B sees it in their feed and reboosts it, what does C see?

        If B’s server sends the full response along, then C can see the contents of A’s post even though they’ve been blocked by A. But if all it sends is the URL of the post, C’s server needs to make a request for it (providing authentication), and then A’s server can reject it, so C sees nothing.

    • SorteKanin@feddit.dk
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 小时前

      How else can you be sure the content is valid though? Lemmy posts are sent as Announces from the community, not from the actor posting the post. The community could just fake a post if you just trust it.

  • Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    7 小时前

    I remember reading the same thing about reddit, slashdot, fark, and other sites. But I like the FASP idea as a way to relieve this.

    • artyom@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      3
      ·
      7 小时前

      Why is that? Those are centralized platforms, they should only need to retrieve the preview once each?

        • artyom@piefed.socialOP
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          3
          ·
          5 小时前

          That’s not at all the same thing. That’s just the inability to handle large amounts of unexpected normal user traffic.

          This is essentially bot traffic driven by servers all independently but simultaneously fetching the same image, without even a single human necessarily looking at it.

          • INeedMana@piefed.zip
            link
            fedilink
            English
            arrow-up
            6
            ·
            5 小时前

            From server’s perspective the only difference between those is the user-agent. Traffic is the same

              • INeedMana@piefed.zip
                link
                fedilink
                English
                arrow-up
                2
                ·
                4 小时前

                Yes, but then a comment mentioned the “hug of death” - high spike of requests resulting from a link being shared on some site, and OP asked why centralized sites were also creating problems

                There was another post regarding previews some months/(knowing me probably a year) ago and personally I would go with federating previews. With a button for mods to refresh it from source for when something goes fucky

                But social networks have been creating random bursts of requests, this way or another, even in the times of centralized socials

            • artyom@piefed.socialOP
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              2
              ·
              5 小时前

              The origin and purpose of the traffic is not the same. That’s why they block one and not the other.