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

  • Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    30 days ago

    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
      0
      ·
      30 days ago

      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
          0
          ·
          30 days ago

          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
            0
            ·
            30 days ago

            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
                0
                ·
                30 days ago

                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
              0
              ·
              30 days ago

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

    • artyom@piefed.socialOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      If they’re all delayed the same it would have the same effect. In order to prevent that it would require some form of coordination amongst them. And even then would have the same complaint about missing link previews. Better than nothing but not really a “solution”, per se.

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

        You’re talking about 2 different kinds of blocking here. NPR can’t block a URL, that concept doesn’t really exist at this level. They could block ip addresses, or user agents as you mentioned.

        A workplace can’t block by user agent (at least not on any website using TLS), as this header is not readable by any intermediary devices.

        • artyom@piefed.socialOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          30 days ago

          NPR can’t block a URL

          I wasn’t talking about NPR, I was talking about their employer…

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

            You mentioned both in the same comment…

            […] NPR apparently blocks the former

            I’m just saying, their employer can’t block like NPR does, because they are fundamentally different things. The one is a server receiving a request, the other is a firewall seeing encrypted packets.

            Edit: the other could also be a DNS resolver that just does not resolve certain domains.

  • cybervegan@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    30 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).

    • iglou@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 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
        0
        ·
        29 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.

    • 0x0@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      30 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
        0
        ·
        29 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.

  • Pamasich@kbin.earth
    link
    fedilink
    arrow-up
    0
    ·
    30 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.

      • Ghoelian@piefed.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        30 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
            0
            ·
            30 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

      • Pamasich@kbin.earth
        link
        fedilink
        arrow-up
        0
        ·
        30 days ago

        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.

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

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

  • AdrianTheFrog@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 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

  • dropdrip@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    30 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.

    • sem@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      30 days ago

      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.

    • milbyte@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      30 days ago

      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/

  • wjs018@piefed.wjs018.xyz
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 month ago

    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.

    • jaybone@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      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?

        • rako@tarte.nuage-libre.fr
          link
          fedilink
          Français
          arrow-up
          0
          ·
          30 days ago

          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 ?

        • jaybone@lemmy.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 month ago

          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?

        • 4am@lemmy.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          1 month ago

          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
            0
            ·
            30 days ago

            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.

            • Natanael@infosec.pub
              link
              fedilink
              English
              arrow-up
              0
              ·
              30 days ago

              HTTP signatures are not a default feature, the baseline is ECDHE key exchange with forward secrecy and deniability. Headers are not typically signed.

              There isn’t even an official standard for redistributable signed page metadata. There’s just prototypes. I absolutely hope one of those prototypes becomes official, but we’re not there yet.

              The activitypub fediverse is literally very extremely Yolo trust me bro, it works because you can see the originating server with everything and misbehaving ones gets banned.

      • khannie@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        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
          0
          ·
          30 days ago

          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.

        • Kangae_Hishiryo@scribe.disroot.org
          link
          fedilink
          English
          arrow-up
          0
          ·
          30 days ago

          WebTorrent kind of solution like PeerTube is the best, because it’s highly scalable yet not that resource-intensive, because everyone (even users) provides their bit; also, as it’s entirely P2P, it acts sort like a distributed and decentralized CDN, so it’s snappier for everyone because it’s more likely that you have a peer near to you like that.

          • khannie@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            30 days ago

            Absolutely LOVE this idea but I feel like a solid implementation would be a pain in the fanny (and it also requires other peers to be online). I dip in and out over the day myself but I don’t know what others use case is.

            Also it is far less trustworthy and harder to block bad actors (V’s removing a known bad actor from a relatively small peer group).

            • Kangae_Hishiryo@scribe.disroot.org
              link
              fedilink
              English
              arrow-up
              0
              ·
              30 days ago

              Idk, the part of uptime of peers is solved precisely by the fact that not every peer will be connected at the same moments that every other peer. If I’m connected at 10pm, it’s highly likely that there will be at least another single peer at that hour that has what I’m pulling.

              As for bad actors, that’s something that at the end of the day is unavoidable. Though with some automated systems could be possible to make it more hard for them, but it’s not that different from a centralised approach, and thus is better because is computationally more efficient.

    • Rimu@piefed.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      30 days ago

      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…

    • tuckerm@feddit.online
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 month ago

      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.

        • Wildmimic@anarchist.nexus
          link
          fedilink
          English
          arrow-up
          0
          ·
          30 days ago

          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 @[email protected]’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.

        • tuckerm@feddit.online
          link
          fedilink
          English
          arrow-up
          0
          ·
          30 days ago

          This is no different from how it is already, though. If a user posts a CSAM link, your server immediately visits that link to scrape it, and you suddenly have that content on your server.

          Of course, if you have a blocklist of forbidden sites, then your server will know not to scrape that site. And the same thing applies if we allow servers to send pre-scraped metadata. If the incoming message is for a blocked URL, just drop the message and don’t save any part of it.

          The only new threat here is for a malicious server operator to modify outgoing messages to include CSAM metadata on a harmless link. However, that possibility already exists with any other content posted on the fediverse. If a malicious server is modifying its own outgoing messages, the only fix is to defederate from it.

          Allowing servers to forward pre-scraped metadata to other servers does not introduce any new threats that do not already exist.

      • shrek_is_love@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 month ago

        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.

    • Pamasich@kbin.earth
      link
      fedilink
      arrow-up
      0
      ·
      30 days ago

      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?

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    29 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
      0
      ·
      28 days ago

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