this post was submitted on 05 Jun 2023
13 points (100.0% liked)

Lemmy

12788 readers
74 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 5 years ago
MODERATORS
 

With forewarning about a huge influx of users, you know Lemmy.ml will go down. Even if people go to https://join-lemmy.org/instances and disperse among the great instances there, the servers will go down.

Ruqqus had this issue too. Every time there was a mass exodus from Reddit, Ruqqus would go down, and hardly reap the rewards.

Even if it's not sustainable, just for one month, I'd like to see Lemmy.ml drastically boost their server power. If we can raise money as a community, what kind of server could we get for 100$? 500$? 1,000$?

top 50 comments
sorted by: hot top controversial new old
[–] animist@lemmy.one 10 points 2 years ago (3 children)

It's a single server, Michael. What could it cost, $10?

load more comments (3 replies)
[–] RoundSparrow@lemmy.ml 4 points 2 years ago* (last edited 2 years ago) (1 children)

Based on looking at the code and the relatively small size of the data, I think there may be fundamental scaling issues with the site architecture. Software development may be far more critical than hardware at this point.

[–] OsrsNeedsF2P@lemmy.ml 1 points 2 years ago (1 children)

What are you seeing in the code that makes it hard do scale horizontally? I've never looked at Lemmy before, but I've done the steps of (monolithic app) -> docker -> make app stateless -> Kubernetes before and as a user, I don't necessarily see the complexity (not saying it's not there, but wondering what specifically in the site architecture prevents this transition)

[–] RoundSparrow@lemmy.ml 4 points 2 years ago* (last edited 2 years ago) (2 children)

Right now it looks to me like Lemmy is built all around live real-time data queries of the SQL database. This may work when there are 100 postings a day and an active posting gets 80 comments... but it likely doesn't scale very well. You tend to have to evolve to a queue system where things like comments and votes are merged into the main database in more of a batch process (Reddit does this, you will see on their status page that comments and votes have different uptime tracking than the main website).

On the output side, it seems ideal to have all data live and up to the very instant, but it can fall over under load surges (which may be a popular topic, not just an influx from the decline of Twitter or Reddit). To scale, you tend to have to make some compromises and reuse output. Some kind of intermediate layer such as every 10 seconds only regenerate the output page if there has been a new write (vote or comment change).

don’t necessarily see the complexity (not saying it’s not there

It's the lack of complexity that's kind of the problem. Doing direct SQL queries gets you the latest data, but it becomes a big bottleneck. Again, what might have seemed to work fine when there were only 5000 postings and 100,000 total comments in the database can start to seriously fall over when you have reached the point of accumulating 1000 times that.

[–] sam_uk@slrpnk.net 3 points 2 years ago (2 children)

Out of curiosity how would https://kbin.social/ source: https://codeberg.org/Kbin/kbin-core stand up to this kind of analysis? Is it better placed to scale?

[–] poVoq@slrpnk.net 3 points 2 years ago (5 children)

The advantage kbin has is that it is build on a pretty well known and tested php Symphony stack. In theory Lemmy is faster due to being built in Rust, but it is much more home-grown and not as optimized yet.

That said, kbin is also still a pretty new project that hasn't seen much actual load, so likely some dragons linger in its codebase as well.

load more comments (5 replies)
load more comments (1 replies)
load more comments (1 replies)
[–] EyesOfTheWatcher@lemmy.ml 3 points 2 years ago (1 children)

I'm a Reddit refugee (new number who dis?)

I'm in the processing of closing on a house/moving so i don't have a ton of extra money or time laying around, but I work in tech as a junior Linux admin with some experience with some big data tech (HDFS, some Spark, Python, etc).

How can I help?

[–] tmpod@lemmy.pt 3 points 2 years ago (1 children)

Good question. Seeing as your set of skills don't quite align with Lemmy's core componentes (Rust backend and Inferno frontend), your best bet would probably be on helping new people settle in, improving documentation, translations, discussing new ideas (like for onboarding), etc.

Any form of help is highly appreciated!

[–] paulie420@beehaw.org 3 points 2 years ago (1 children)

I only know enough code to break things, but I wouldn't mind working on some documentation - I'll go read what Lemmy needs; thanks for reminding me that anyone can chip in.

[–] tmpod@lemmy.pt 3 points 2 years ago

Thank you for considering helping out :D

[–] kinther@lemmy.ml 2 points 2 years ago

I'm in the process of setting up a raspberry pi to host an instance, but the documentation is not super helpful. I'll slog through it and issue a PR once co.plete so others may not have the same issues.

[–] nutomic@lemmy.ml 1 points 2 years ago (32 children)

The site currently runs on the biggest VPS which is available on OVH. Upgrading further would probably require migrating to a dedicated server, which would mean some downtime. Im not sure if its worth the trouble, anyway the site will go down sooner or later if millions of Reddit users try to join.

[–] Pisck@lemmy.ml 3 points 2 years ago

There will either be an hour of downtime to migrate and grow or days of downtime to fizzle.

I love that there's an influx of volunteers, including SQL experts, to mitigate scaling issues for the entire fediverse but those improvements won't be ready in time. Things are overloading already and there's less than a week before things increase 1,000-fold, maybe more.

[–] Lobstronomosity@lemmy.ml 2 points 2 years ago* (last edited 2 years ago) (1 children)

I'm sure you know this, but getting progressively larger servers is not the only way, why not scale horizontally?

I say this as someone with next to no idea how Lemmy works.

[–] nutomic@lemmy.ml 4 points 2 years ago (5 children)

Its better to optimize the code so that all instances benefit.

load more comments (5 replies)
[–] OsrsNeedsF2P@lemmy.ml 2 points 2 years ago (9 children)
8 vCore
32 GB RAM

😬

2 follow-ups:

  • Can we replace Lemmy.ml with Join-lemmy.org when Lemmy.ml is overloaded/down?
  • Does LemmyNet have any plans on being Kubernetes (or similar horizontal scaling techniques) compatible?
[–] poVoq@slrpnk.net 1 points 2 years ago (1 children)

Maybe some dns fail-over for lemmy.ml to point to join-lemmy.org might be cool indeed 🤔

[–] tmpod@lemmy.pt 1 points 2 years ago

Yeah, was thinking of a DNS based solution as well. Probably the easiest and most effective way to do it?

load more comments (8 replies)
load more comments (29 replies)
[–] OsrsNeedsF2P@lemmy.ml 1 points 2 years ago (1 children)

I'm also willing to donate to other instances too - Beehaw, Sopuli, Lemmygrad, Lemmyone - Anything so we can have better shock absorption. If you run one of those instances, please reply and let us know how much you think you need

[–] ruud@lemmy.world 1 points 2 years ago (1 children)

At the moment, I run lemmy.world using the funding of mastodon.world. If Lemmy.world might grow and need a dedicated server, I'll try to raise funds for it separately (or create a larger .world fundraiser as I have other instances as well)

[–] HKayn@lemmy.ml 1 points 2 years ago (1 children)

What kind of server and which specs is lemmy.world running on? I'm planning on setting up my own instance for a small community, but I have no idea what to brace for.

[–] ruud@lemmy.world 2 points 2 years ago (1 children)

Currently a 2 cpu 4GB VPS at Hetzner, costing 5 EUR per month. With a storage volume of also 5 per month. I am monitoring this and will scale when needed. For mastodon.world we scaled it to a dedicated server with 32 cores and 256GB so we can go a long way.

[–] molo@beehaw.org 1 points 2 years ago (2 children)

Can you provide any info about the number of pageviews/month or pageviews/hr that setup can support for lemmy?

load more comments (2 replies)
load more comments
view more: next ›