this post was submitted on 12 Jun 2023
1266 points (98.9% liked)
Lemmy.World Announcements
29100 readers
5 users here now
This Community is intended for posts about the Lemmy.world server by the admins.
Follow us for server news π
Outages π₯
https://status.lemmy.world/
For support with issues at Lemmy.world, go to the Lemmy.world Support community.
Support e-mail
Any support requests are best sent to [email protected] e-mail.
Report contact
- DM https://lemmy.world/u/lwreport
- Email [email protected] (PGP Supported)
Donations π
If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.
If you can, please use / switch to Ko-Fi, it has the lowest fees for us
Join the team
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm not too familiar with Lemmy's codebase, but I am a devops engineer. Is the software written in any way to support horizontal scaling? If so, I'd be happy to consult/help to get the instance onto an autoscaling platform eventually.
Doesnβt support HA or horizontal scaling yet from what I read. Unsure if kbin does. Probably would have to add support for horizontal scaling to have that auto scaling do anything.
Yeah, that's what I was afraid of. Understandable though, since horizontal scaling/HA usually isn't a priority when developing a new application.
I think there are people working on adding support for pgbouncer and splitting out pg from the core server to avoid having a 1 box only setup.
The code is open source on GitHub and the backend is written in Rust.
I have no idea how it goes in terms of scalingβ¦
Apparently it's not ideal at Horizontal scaling (that's what I've picked up from reading stuff here, could be wrong)
I think they can horizontally scale the Postgres maybe? Postgres is probably the biggest performance bottleneck.
Have they implemented the postgres? Last I read they were still using websockets (I think I'm not a programmer and don't know what all that means lmfao)
Postgres is a database. Websockets is a communication method between the browser and the server.
So the infrastructure is like this:
So there's a couple problems here. First of all, websockets are very resource heavy so too many of them will slow down the server, that's why they are working on replacing websockets with something else. And second, the database (Postgres) is getting overloaded so they need to figure out how to scale it up or use it more efficiently.
Man, the place I work at has a single DB instance (with a read replica) serving millions of users. I'm not saying this should be true everywhere, but I don't understand how the postgres is buckling here. Does Lemmy have a bunch of horrifically unoptimized queries, or is the DB just on an underpowered machine?
Yes to both. Lemmy does have a few PRs to make the queries more efficient (and not just blind generic ORM calls) but most instances outside of lemmy.world are very underpowered (which makes federation synchronization slow).