My first experience with Lemmy was thinking that the UI was beautiful, and lemmy.ml (the first instance I looked at) was asking people not to join because they already had 1500 users and were struggling to scale.

1500 users just doesn’t seem like much, it seems like the type of load you could handle with a Raspberry Pi in a dusty corner.

Are the Lemmy servers struggling to scale because of the federation process / protocols?

Maybe I underestimate how much compute goes into hosting user generated content? Users generate very little text, but uploading pictures takes more space. Users are generating millions of bytes of content and it’s overloading computers that can handle billions of bytes with ease, what happened? Am I missing something here?

Or maybe the code is just inefficient?

Which brings me to the title’s question: Does Lemmy benefit from using Rust? None of the problems I can imagine are related to code execution speed.

If the federation process and protocols are inefficient, then everything is being built on sand. Popular protocols are hard to change. How often does the HTTP protocol change? Never. The language used for the code doesn’t matter in this case.

If the code is just inefficient, well, inefficient Rust is probably slower than efficient Python or JavaScript. Could the complexity of Rust have pushed the devs towards a simpler but less efficient solution that ends up being slower than garbage collected languages? I’m sure this has happened before, but I don’t know anything about the Lemmy code.

Or, again, maybe I’m just underestimating the amount of compute required to support 1500 users sharing a little bit of text and a few images?

  • dudeami0
    link
    fedilink
    English
    1411 months ago

    An old Chromebox G1 (i7-4600U and 8GB of ram) with a 128GB internal NGFF and external 1TB NVMe. It’s by no means powerful or expensive hardware. I’m also only receiving federated posts for my subscribed communities, and sending out these comments I write so it’s a lot lower workload than the larger instances.

    • jadero
      link
      fedilink
      English
      611 months ago

      Hosting a personal instance is the direction I want to go. That’ll be a winter project, though. It’s fishing/swimming/rowing/woodworking season now :)

      Are there any general tips or hidden dangers you can share? Or is it as straightforward as just putting my nose into documentation and playing around a bit?

      • dudeami0
        link
        fedilink
        English
        511 months ago

        Right now there appears to be no more danger than hosting anything else. I run my services behind a reverse proxy to insulate my home LAN from the wider internet, but hooking anything up to the internet comes with potential dangers.

        I personally wrote a helm chart for kubernetes to host the service, and a few more can be found here. I have some work to do yet on the helm chart but it closely mirrors the docker-compose file provided by the developers. Deployment of an instance should be a lot easier soon, with all the increased interest and contributions.