I only know of two FOSS federated alternatives to reddit which is lemmy or kbin.

I think lemmy will scalebmore being written in rust were kbin is written in PHP.

And by scaling I am refering to high user count, high traffic, server resoures, server cost.

  • Max-P@lemmy.max-p.me
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    They both hit the same challenges. The bottleneck with any web application is pretty much always the database, especially SQL ones where replication and sharding is not as easy as some other tech like MongoDB and ElasticSearch.

    Both kbin and Lemmy use PostgreSQL, so they’ll both hit similar bottlenecks.

    Lemmy has the advantage of processing much faster thanks to its Rust backend, requiring less CPU, but PHP is also very easy to scale up to add more server and more compute to it. PHP has some advantages despite its reputation, in that it’s pretty hard to have memory leaks like Lemmy experienced recently, because the whole process resets at a configurable amount of requests, and on the PHP side, each request is independent and starts over from scratch, making it hard to accumulate in-process state that doesn’t get wiped out after each request. It also indirectly forces you to rely on external cache and queue services for synchronization, which can help prevent some gotchas that long running servers in Rust/C#/Go/NodeJS would. In a single process it’s easy to turn to global state and hit gotchas when you have it running on two different servers.

    But functionally, they’re all capable of roughly the same, as the bottleneck will still be the database. Scaling databases is not easy, although not necessarily that crazy hard either.

    • maegul (he/they)
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Scaling databases, particularly the most used one, PostgreSQL, also seems to be an expertise somewhat lacking across the platforms.

      Which I say only to highlight that anyone with experience and expertise on scaling and optimising PostgreSQL is likely to have something rather valuable to contribute to the fediverse if they are willing.

      • Max-P@lemmy.max-p.me
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Yep, there’s a reason database admin is a career of its own. We use MySQL at work but same deal everytime: monitoring goes crazy and we poke the devs to fix their queries.

        Been meaning to get familiar with Lemmy’s code soon, just need to find some free time 😅