this post was submitted on 14 Jun 2023
23 points (100.0% liked)

Selfhosted

40183 readers
597 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I just spun up Lemmy on my Kubernetes cluster with nginx-unprivileged and ingress-nginx. All is well so far! I’m thinking about posting the Kustomization manifests and continuing to maintain and publish OCI’s per version release of Lemmy.

you are viewing a single comment's thread
view the rest of the comments
[–] dudeami0@lemmy.dudeami.win 7 points 1 year ago (3 children)

I currently am running the instance I am responding from on kubernetes. I published a helm chart, and others are working on them too. I feel being able to quickly deploy a kubernetes instance will help a lot of smaller instances pop up, and eventually be a good method of handling larger instances once horizontal scaling is figured out.

[–] tj111@lemmy.fmhy.ml 4 points 1 year ago (2 children)

Is there a place I can read more about the horizontal scaling issues lemmy has?

[–] Andreas@feddit.dk 4 points 1 year ago (1 children)

Saved this comment. It claims that the Lemmy frontend and backend are stateless and can be scaled arbitrarily, as can the web server. The media server (pict-rs) and Postgres database are the limitations to scaling. I'm working to deploy Lemmy with external object storage to solve media storage scaling and there's probably some database experts figuring out Postgres optimization and scaling as well. None of the instances are big enough to run into serious issues with vertical scaling yet, so this won't be a problem for a while.

[–] blazarious@mylem.me 2 points 1 year ago

I’ve got my pictrs backed by an S3, so that should scale well.

I had some issues with the image server, though, and I had multiple of them running at the same time at some point, so that may have been the cause.

[–] dudeami0@lemmy.dudeami.win 2 points 1 year ago (1 children)

I'm not sure if there really is issues, I think it's just new ground since most lemmy instances have been able to run on a single node due to the low populations. It seems most large public instances are just adding bigger servers to deal with the problem short term.

From what I can tell (I am not an expert in this field), it seems most of the architecture would spread horizontally without much issue. I haven't seen anywhere this is done yet, but I could be missing the obvious.

The lemmy backend api just takes HTTP requests (and at the present websockets, but this is changing in 0.18 to only HTTP requests), and it uses postgres as the backend storage. Using a kubernetes postgres operator to scale the database and then running multiple lemmy backend api instances (and frontend as needed) seems like it would work, or would require minimal work to get running.

[–] tj111@lemmy.fmhy.ml 1 points 1 year ago

Thanks for the input, yeah just rest apis over a postgres db is pretty standard k8s setup, so unless there's something weird in the middle it would work fine. Curious why the OG design leaned into sockets over rest though, that's an interesting choice.

[–] anthr76@lemmy.kutara.io 3 points 1 year ago

Very neat! I also considering writing a helm-chart with my close friend's amazing helm library. In the end I decided against it since this is a pretty simple deployment as of today. Tomorrow I will clean up the Kustomize manifests and some CI with a non-federated config file and post it :)

[–] wiox@compuverse.uk 2 points 1 year ago

I tested your helm chart and it just worked :)