RetroFed Forum
Your home away from modern life.
TIL the fediverse basically DDOS's sites when you share a link.
Post Reply
AuthorMessage
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
(edited) Quote

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.

696   Original
Die4Ever retrolemmy.com Die4Ever@retrolemmy.com
Joined: 2024-05-06
#2 · Quote Reply

they could include the link preview data as part of the federation

20
TropicalDingdong lemmy.world TropicalDingdong@lemmy.world
Joined: 2023-07-29
#3 · Quote Reply

smaller sites like NPR

26
wjs018 piefed.wjs018.xyz wjs018@piefed.wjs018.xyz
Joined: 2025-07-15
#4 · Quote Reply

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.

223
jaybone lemmy.zip jaybone@lemmy.zip
Joined: 2025-02-08
#5 · Quote Reply

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

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?

131
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#6 · (edited) Quote Reply

smaller sites like NPR

For gargantuan sites like YT or Reddit

6
Rimu piefed.social rimu@piefed.social
Joined: 2024-01-04
#7 · Quote Reply

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.

77
TropicalDingdong lemmy.world TropicalDingdong@lemmy.world
Joined: 2023-07-29
#8 · Quote Reply

For gargantuan sites like YT or Reddit

the people have spoken

2
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#9 · Quote Reply

the people have spoken

Well they didn't seem to have much to say?

6
expatriado lemmy.world expatriado@lemmy.world
Joined: 2023-06-18
#10 · Quote Reply

smaller sites like NPR

Norwalk Public Radio. From Norwalk, Iowa.

20
TropicalDingdong lemmy.world TropicalDingdong@lemmy.world
Joined: 2023-07-29
#11 · Quote Reply

Well they didn't seem to have much to say?

smaller sites like NPR

0
frongt lemmy.zip frongt@lemmy.zip
Joined: 2025-07-31
#12 · Quote Reply

A slight delay would be perfectly sufficient.

12
yamper piefed.social yamper@piefed.social
Joined: 2025-06-30
#13 · Quote Reply

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?

how would you know the results havent been tampered with?

23
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#14 · Quote Reply

A slight delay would be perfectly sufficient.

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.

2
4am lemmy.zip 4am@lemmy.zip
Joined: 2025-06-23
#15 · Quote Reply

how would you know the results havent been tampered with?

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.

120
Orygin sh.itjust.works Orygin@sh.itjust.works
Joined: 2023-06-10
#16 · Quote Reply

Norwalk Public Radio. From Norwalk, Iowa.

They can't afford a $5 CDN?

0
jaybone lemmy.zip jaybone@lemmy.zip
Joined: 2025-02-08
#17 · Quote Reply

how would you know the results havent been tampered with?

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?

47
LibertyLizard slrpnk.net LibertyLizard@slrpnk.net
Joined: 2023-06-14
#18 · Quote Reply

Is this why the automated title retrieval never works for NPR?

11
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#19 · Quote Reply

Is this why the automated title retrieval never works for NPR?

Yep

5
anotherandrew lemmy.mixdown.ca anotherandrew@lemmy.mixdown.ca
Joined: 2023-06-11
#20 · Quote Reply

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.

Random back off is an ancient and very well understood algorithm. This is not exactly rocket science.

36
tyler programming.dev tyler@programming.dev
Joined: 2023-06-12
#21 · Quote Reply

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.

Random numbers exist.

10
tuckerm feddit.online tuckerm@feddit.online
Joined: 2025-03-06
#22 · (edited) Quote Reply

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

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.

72
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#23 · Quote Reply

Random back off is an ancient and very well understood algorithm. This is not exactly rocket science.

No one said anything about random.

-16
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#24 · Quote Reply

Random numbers exist.

Whoa!

-8
jumping redditor [they/them] sh.itjust.works jumping_redditor@sh.itjust.works
Joined: 2023-07-30
#25 · Quote Reply

Random numbers exist.

wait 3 //randomlydecidedby fair dice roll

4
ieightpi lemmy.world ieightpi@lemmy.world
Joined: 2023-06-26
#26 · Quote Reply

This probably why my place of work blocked it behind the firewall

4
Hegar fedia.io Hegar@fedia.io
Joined: 2024-06-26
#27 · Quote Reply

This probably why my place of work blocked it behind the firewall

This was my first thought too.

1
shrek_is_love lemmy.ml shrek_is_love@lemmy.ml
Joined: 2026-02-09
#28 · Quote Reply

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.

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.

18
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#29 · (edited) Quote Reply

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.

2
deadbeef79000 lemmy.nz deadbeef79000@lemmy.nz
Joined: 2023-06-17
#30 · Quote Reply

No one said anything about random.

"Random back off" is the name of a technique to avoid this exact problem.

Each instance generates a random number of (say) seconds between (say 15 to 120) and schedules the fetch for then. It is extremely unlikely that any two instances select the same second.

18
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#31 · Quote Reply

"Random back off" is the name of a technique to avoid this exact problem. Each instance generates a random number of (say) seconds between (say 15 to 120) and schedules the fetch for then. It is extremely unlikely that any two instances select the same second.

Yes I understand. I just don't appreciate the demeaning tone this information was delivered in.

-20
khannie lemmy.world khannie@lemmy.world
Joined: 2023-06-21
#32 · Quote Reply

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?

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.

10
Lovable Sidekick lemmy.world LovableSidekick@lemmy.world
Joined: 2024-10-19
#33 · Quote Reply

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.

4
ace_garp lemmy.world ace_garp@lemmy.world
Joined: 2023-06-09
#34 · (edited) Quote Reply

Randomly stagger the times of each instance's request.

+1-300 seconds

20
docus lemmy.dbzer0.com docus@lemmy.dbzer0.com
Joined: 2024-03-27
#35 · Quote Reply

No one said anything about random.

Nobody said the delay had to be fixed instead of random either…

7
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#36 · Quote Reply

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?

1
ByteJunk lemmy.world ByteJunk@lemmy.world
Joined: 2023-07-04
#37 · Quote Reply

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

45
SkaveRat discuss.tchncs.de SkaveRat@discuss.tchncs.de
Joined: 2023-07-09
#38 · Quote Reply

Randomly stagger the times of each instance's request. +1-300 seconds

That's basically what's now implemented, iirc. At least in masto

13
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#39 · Quote Reply

Nobody said the delay had to be fixed instead of random either…

Yes that's the problem...?

-2
rako tarte.nuage-libre.fr rako@tarte.nuage-libre.fr
Joined: 2026-01-07
#40 · Quote Reply

how would you know the results havent been tampered with?

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 ?

4
Pamasich kbin.earth Pamasich@kbin.earth
Joined: 2024-03-11
#41 · (edited) Quote Reply

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

10
INeedMana piefed.zip INeedMana@piefed.zip
Joined: 2025-07-03
#42 · Quote Reply

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

3
INeedMana piefed.zip INeedMana@piefed.zip
Joined: 2025-07-03
#43 · Quote Reply

Also https:// itsfoss.com/news/mastodon-link-problem/

8
Rimu piefed.social rimu@piefed.social
Joined: 2024-01-04
#44 · Quote Reply

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

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

3
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#45 · Quote Reply

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

The image is not federated.

-2
artyom piefed.social artyom@piefed.social
Joined: 2025-06-08
#46 · Quote Reply

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.

3
INeedMana piefed.zip INeedMana@piefed.zip
Joined: 2025-07-03
#47 · Quote Reply

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

5
Goodlucksil lemmy.dbzer0.com Goodlucksil@lemmy.dbzer0.com
Joined: 2025-08-15
#48 · Quote Reply

The image is not federated.

the image should be federated

2
HereIAm lemmy.world HereIAm@lemmy.world
Joined: 2024-02-19
#49 · Quote Reply

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.

5
Ghoelian piefed.social Ghoelian@piefed.social
Joined: 2025-03-19
#50 · Quote Reply

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.

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.

6
Ghoelian piefed.social Ghoelian@piefed.social
Joined: 2025-03-19
#51 · Quote Reply

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

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

6
Post Reply Page 1 of 4   Goto page 1, 2, 3, 4 Last »
Back to top