How much difference does a CDN make to a fediverse instance? - PieFed

2 years ago by ericjmorey to c/fediverse

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 […]

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?

rezz 39 points 2 years ago

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

path: 0 7731120, hotness: undefined, score: 39, children: 2
Fudoshin 14 points 2 years ago

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

path: 0 7731120 7732385, hotness: undefined, score: 14, children: 1
haui_lemmy 6 points 2 years ago

This should be paragraph one

path: 0 7731120 7732385 7733454, hotness: undefined, score: 6, children: 0
Blaze 19 points 2 years ago

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

path: 0 7730683, hotness: undefined, score: 19, children: 14
freamon 9 points 2 years ago

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.

path: 0 7730683 7731127, hotness: undefined, score: 9, children: 10
rglullis 13 points 2 years ago

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.

path: 0 7730683 7731127 7731557, hotness: undefined, score: 13, children: 5
poVoq 10 points 2 years ago

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.

path: 0 7730683 7731127 7731557 7731873, hotness: undefined, score: 10, children: 3
rglullis 2 points 2 years ago path: 0 7730683 7731127 7731557 7731873 7733786, hotness: undefined, score: 2, children: 2
didnt_readit 1 point 2 years 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.

path: 0 7730683 7731127 7731557 7735960, hotness: undefined, score: 1, children: 0
rimu 5 points 2 years ago path: 0 7730683 7731127 7736711, hotness: undefined, score: 5, children: 2
freamon 2 points 2 years ago

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

path: 0 7730683 7731127 7736711 7737200, hotness: undefined, score: 2, children: 1
rimu 3 points 2 years ago

Thanks :)

path: 0 7730683 7731127 7736711 7737200 7739151, hotness: undefined, score: 3, children: 0
Blaze 4 points 2 years ago

It is indeed a nice change

path: 0 7730683 7731127 7732477, hotness: undefined, score: 4, children: 0
poVoq 3 points 2 years ago

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 :(

path: 0 7730683 7735305, hotness: undefined, score: 3, children: 1
Blaze 2 points 2 years ago

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

path: 0 7730683 7735305 7737217, hotness: undefined, score: 2, children: 0
MBM 3 points 2 years 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.

path: 0 7730683 7733027, hotness: undefined, score: 3, children: 0
fediverse
fediverse

@lemmy.world

login for more options
42608
3243
2364

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

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

Rules

  • Posts must be on topic.
  • Be respectful of others.
  • Cite the sources used for graphs and other statistics.
  • Follow the general 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)

go to feed...