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.
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
imageproperty. 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.
The image is not federated.
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.
No one was talking about an image 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
the image should be federated
Did I say “shouldn’t be”? Could have sworn i said “is”…
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
attachmentproperty. 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
imageproperty is not present, it’s not in theattachmentarray, and I can’t see any other property that contains it.Rimu posted a parent comment elsewhere regarding PieFed and Lemmy.
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.
deleted by creator
Seems abusable though
Exactly
Seems abusable though
If one instance doesn’t trust another, they shouldn’t federate in the first place.
Add metadata with a checksum of the og one with signature and let each client check that up.
If it’s a signed checksum then maybe. But if the og instance is doing the abusing then it won’t help.
Yeah there must be some trust indeed of the og instance. A scoring system could help with that.
Or … Or we could stagger the requests of the different instances so that they don’t overload the linked site. Why reinvent the wheel?
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.
Why not have the users fetch the previews themselves. The user’s browser, that is.
For sure there is more users than instances. So the amount of requests would be grater but at least they wouldn’t happen at the same time.
But if fediverse ever grow to be as big as other social media, then a single post/link can be viewed by thousands of users at the same time causing the same effect.
Or get the preview on the first user seeing the post in that instance.
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.
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.
Lots of normal traffic is instant. Throttling must be handled by for in this instance NPR or its providers routers because even if hammering is a bad practice, we are participating in why it happens at all if we just build structures to mitigate it.
Yes that’s why I included a solution, and explained explicitly that it can be solved but only temporarily
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…?
You may suffer from irritation of your ego my friend. Know that you are not your ideas or projects, you are more than that. I feel like all of your questions were previously answered sorry.
You may suffer from the dumbs, my friend. My questions were answered. Before you showed up.
Stop with the “you may suffer from” nonsense (both of you). You’re being rude to each other and it’s generating reports.
I’m going to continue being rude to people who are rude to me. Sorry, not sorry.
This probably why my place of work blocked it behind the firewall
Do they block the useragent or the URL? NPR apparently blocks the former.
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.
NPR can’t block a URL
I wasn’t talking about NPR, I was talking about their employer…
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.
This was my first thought too.
Heh. Ever heard of the Slashdot effect?
For the fifth fucking time, this is not the same thing .
So we need people to just mass post links to bad websites, is what you’re saying.
i’m feeling less ambivalent about those reddit repost bots for a moment
Thanks for bringing this up. I think in general we need to work on optimisation of Activitypub and Threadiverse implementations of it.
Either publishing server should serve the metadata - although it would be prone to bad actors, so a refetch in the next 0-180 seconds would be appropriate. Or just add a random 0-60 second delay before fetching the data.
Same thing used to happen with reddit giving sites the hug of death lol
It’s unfortunate but kind of expected.
Its not at all the same thing
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…
Having things in common does not make them the same thing. I explained this in the OP.
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.
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).
that don’t honour robots.txt (or aren’t yet listed).
Throw’em in the tar pit.
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.
that don’t honour robots.txt
That’s essentially all of them in my experience.
At least anything “AI”
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.
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.
Also https:// itsfoss.com/news/mastodon-link-problem/
Randomly stagger the times of each instance’s request.
+1-300 seconds
300 seconds is a lot.
That’s basically what’s now implemented, iirc. At least in masto
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.
Why is that? Those are centralized platforms, they should only need to retrieve the preview once each?
https://en.wikipedia.org/wiki/Slashdot_effect but people were going in, looking at the link, sometimes overwhelming the server
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.
From server’s perspective the only difference between those is the user-agent. Traffic is the same
But what OP is talking about is a technical detail that can be fixed.
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
The origin and purpose of the traffic is not the same. That’s why they block one and not the other.
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…
It’s obviously bad enough that major news orgs are blocking it.
Is that really why they’re blocking it I wonder…
It’s just bad design. What happens when/if the fediverse scales up to many more instances?
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.
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?
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.
No, you just worked at bad places
Sure, but there are a lot of bad places. I bet the majority of engineers work in bad places like this.
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.
Thing is, Fediverse is not a product
It better fucking not
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.
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
Sure would.


















