this post was submitted on 20 Feb 2024
70 points (97.3% liked)

Fediverse

28396 readers
136 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 1 year ago
MODERATORS
 

cross-posted from: https://discuss.online/post/5391072

February 20, 2024 piefedadmin writes:

For a very small instance with only a couple of concurrent users a CDN might not make much difference. But if you take a look at your web server logs you’ll quickly notice that every post / like / vote triggers a storm of requests from other instances to yours, looking up lots of different things. It’s easy to imagine how quickly this would overwhelm an instance once it gets even a little busy.

One of the first web performance tools people reach for is to use a CDN, like Cloudflare. But how much difference will it make? In this video I show you my web server logs before and after and compare them.

Read How much difference does a CDN make to a fediverse instance?

top 18 comments
sorted by: hot top controversial new old
[–] rezz@lemmy.world 38 points 9 months ago* (last edited 8 months ago) (1 children)

We need an encyclopedia of posts/content like this that is the masterbook of Fediverse ops and scaling "how-to."

[–] Fudoshin@feddit.uk 14 points 9 months ago (1 children)

Go on then sailor. Be the change you want to see!

[–] haui_lemmy@lemmy.giftedmc.com 6 points 9 months ago

This should be paragraph one

[–] Blaze@reddthat.com 19 points 9 months ago (3 children)

Thank you for sharing, interesting topic!

On a side-note, I just had a look at Piefed, I like their topics list: https://piefed.social/topics

[–] freamon@endlesstalk.org 9 points 9 months ago (3 children)

Flippin' eck. Seeing a familiar Lemmy post on there, clicking it and seeing the whole thing render instantly was a bit of a shock after getting used to Lemmy's more pedestrian loading of stuff.

[–] rglullis@communick.news 13 points 9 months ago (2 children)

Using a CDN does not come without downsides, though. Cloudflare itself is becoming another "too big to fail" entity of a system that is not supposed to depend on the resilience/capacity/budget of any single actor.

Personally, I'd rather see a tiered architecture for data, where servers are only responsible for guaranteeing the data from actors on their own servers, but everything else stored in a distributed, append-only stream of data. This would make a lot cheaper to run individual instances and would allow clients to obtain the data from multiple sources.

[–] poVoq@slrpnk.net 10 points 9 months ago (1 children)

Some kind of shared object storage would help for images at least. But for that to work Lemmy would need a way to redirect clients directly to the storage bucket instead of proxying all the pict-rs traffic like it is currently implemented.

[–] rglullis@communick.news 2 points 9 months ago (1 children)
[–] poVoq@slrpnk.net 3 points 9 months ago (1 children)

No that is something else. Currently Lemmy does not cache all remote media (other than thumbnails and some non-Lemmy images AFAIK), but I think this is currently being implemented and once that is added, a separate media storage like mentioned in that Mastodon issue might be useful.

What I mean is that currently all image data has to flow though your Lemmy backend, even though object storage usually provides static image hosting and the Lemmy backend could just tell the clients to load the images directly from there, similar to how an CDN would do it.

[–] rglullis@communick.news 2 points 9 months ago

Yeah, my response was a bit tongue-in-cheek because one of the things that I don't like about Lemmy is this coupling to a specific storage backend. Maybe it was just immaturity of actix that led the devs to take this approach, but most mature web frameworks already allow pluggable storage backends, so in the end it seems that Lemmy will reinvent a bunch of wheels.

[–] didnt_readit@lemmy.world 1 points 9 months ago

That’s true but there are a bunch of CDNs you can choose from and you can switch from one to another fairly easily. Cloudflare just happens to be the most popular at the moment but they’re not the only big player, not to mention smaller players.

FWIW I totally agree with the sentiment that Cloudflare (and AWS for that matter) is creating a too-centralized web. I just don’t see an issue with using CDNs for fediverse servers in general.

[–] rimu@piefed.social 5 points 9 months ago* (last edited 9 months ago) (1 children)
[–] freamon@endlesstalk.org 2 points 9 months ago (1 children)

Oh wow. That really illustrates it. Your approach to a social media site is very admirable (so much modern stuff assumes that just throwing more CPU cycles / RAM / bandwidth at the problem is a solution).

[–] rimu@piefed.social 3 points 9 months ago
[–] Blaze@reddthat.com 4 points 9 months ago

It is indeed a nice change

[–] MBM@lemmings.world 3 points 9 months ago

Oh I love the topics list. It already helped me discover a new community. I assume right now it's curated by someone, would be cool if there was a way for communities to just apply tags to themselves. They could even be turned into hashtags, whenever someone posts to that community, as a kind of link to Mastodon.

[–] poVoq@slrpnk.net 3 points 9 months ago (1 children)

On a side-note, I just had a look at Piefed, I like their topics list: https://piefed.social/topics

Ugh, that is a total anti-feature that hides away the unique characteristics of communities and increases moderation work-load significantly :(

[–] Blaze@reddthat.com 2 points 9 months ago

As someone else commented, they could work as tags that communities could apply to themselves