posted in Fediverse

TIL the fediverse basically DDOS's sites when you share a link.

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.

Jeff SikesUnderstanding Mastodon Preview Card Display LogicEver wondered why some links you post to Mastodon show a nicely formatted preview card, but others don’t? It can seem random, even showing differently from app to app.
Edited ⁨⁨Oct⁩ ⁨22⁩, ⁨2026⁩, ⁨01:13⁩⁩enPage

Replying to an earlier post

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.

Replying to @⁨SorteKanin@feddit.dk⁩

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.

Replying to an earlier post

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.

Replying to @⁨tuckerm@feddit.online⁩

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

Replying to an earlier post

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.

Replying to an earlier post

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…

Replying to @⁨rimu@piefed.social⁩

Sorry, I think I'm just blind. I tried a non piefed.social post earlier today and didn't see it in the JSON, but checking a piefed.social post now, the property is there. So either I just didn't see it the first time around, or the instance I tried it with wasn't the best example to use.

Anyway, deleted my comment. But then OP's post confuses me again, because there really shouldn't be a DDoS happening toward the small site. The instance hosting the thumbnail sure, but not the site that's being linked to.

Replying to an earlier post

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.

Replying to @⁨Ghoelian@piefed.social⁩

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.

Replying to an earlier post

Okay, what you explained does make sense, but not in the context of a federation event (as far as I understand, which could very well be wrong).

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.

Sure, but this would only be needed if a user needs permission or something to view a post. They don’t, a post is (always, afaik?) public.

Besides, federation is not on a user level, but on an instance level. It doesn’t matter if user A has blocked user B. As long as just one person on user A’s instance does not have user B blocked, events and metadata will need to be federated. So, for public federated services, I don’t think it makes any sense to use this kind of access control.

Replying to an earlier post

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.

Replying to an earlier post

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.

Replying to an earlier post

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

Replying to @⁨mcv@lemmy.zip⁩

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.

Replying to @⁨1984@lemmy.today⁩

I think so. I’ve worked at bad, average and good places, but the bad places tend to be larger and far less efficient, so they have to hire more engineers to make up for the inefficiency.

And they don’t necessarily pay well either. They see engineers as powerless cogs who have to do what they’re told, so they get paid like that too. And then they complain they can’t find seniors.

Replying to @⁨artyom@piefed.social⁩

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

Replying to an earlier post

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

Replying to @⁨artyom@piefed.social⁩

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.

sh.itjust.worksStratospheric airship flew from US to Japan and back - sh.itjust.worksIt seems with an unmanned airship they should be using hydrogen for the ~8% increased payload capacity.

Replying to @⁨dropdrip@lemmy.ml⁩

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.

Replying to @⁨artyom@piefed.social⁩

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

Replying to @⁨iglou@programming.dev⁩

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.

Replying to @⁨artyom@piefed.social⁩

I’m not exactly sure why a web server can’t handle legit web traffic, just because it’s a lot? I agree that smaller actors should be given a little breastfeeding but solving it on the other side is bad architecture. A legit request can never be compared to a a ddos attack, the overloaded net has to throttle and then the instances need to retry with a generous enough delay.

Options for solutions to another systems problems are all going to introduce more problems. Sure, the requests could honestly be routed to a cache and it would help this problem, att least until it breaks or is exploited. But it would never be truly solved that way.

Replying to an earlier post

I’m not exactly sure why a web server can’t handle legit web traffic, just because it’s a lot?

Its not because it’s a lot, it’s because it all happens in the same instant, which does not resemble any sort of normal web traffic.

but solving it on the other side is bad architecture

Solving it on the side that’s creating the problem is bad architecture? 🤔

But it would never be truly solved that way.

Several potential solutions have been posited, if you just look through the comments.

Replying to an earlier post

Lots of normal traffic is instant

Not instant from a thousand different servers. That’s what a botnet looks like. AKA DDOS. That’s why I explained that. Why are you acting like you don’t understand this?

Throttling must be handled by for in this instance NPR

No. It mustn’t. AP servers can fix it on their end.

Yes that’s why I included a solution

Which you then went on to explain wasn’t a solution…?

Replying to @⁨artyom@piefed.social⁩

If I just drop a link into IRC, Jabber, Matrix, and possibly Discord, every client will go to the server and request a preview. The only difference is how many clients are online. On sufficiently large servers, this can also cause a DDoS. The problem lies in server-side caching, not in the architecture of all messengers.

UPD: of course, this can be solved on the Lemmy side, but what will you do when the network grows even larger? A million servers will cause a DDoS even with random requests. You could of course send the preview with the post, but it seems that would permanently and strictly limit the type of preview, and it’s unclear how to handle custom servers.

Replying to @⁨Blackmist@feddit.uk⁩

Another option could be to have the originating Mastodon server provide the preview image in content-adressable way, and have a standard allowing websites to provide the same: if the hash of the file(s) provided by the first / a Mastodon server to another matches the one from the target website, no need to download from the target website. Only if they differ then you’d actual download the data from the target website.

Each Mastodon server from the federation could quickly decide whether to trust that preview data from the peer it gets the rest of the post from or not.

This is basically taking ideas from IPFS but applying it to just the preview data that ends up being downloaded over and over again. You could also make that part a blob of data stored directly in IPFS. But IPFS was pretty slow to resolve content, when I last tested.