• 0 Posts
  • 2 Comments
Joined 1 year ago
cake
Cake day: June 9th, 2023

help-circle
  • Irisos@lemmy.umainfo.livetoasklemmy@lemmy.mlHow will lemmy scale?
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    The database isn’t really the problem in the current state of things. The server is because:

    • Until 0.18 there was no caching (for the UI) and the poorly implemented websockets
    • The developers have admited that they aren’t proficient in SQL, in which case, why not using an ORM instead? Sure, they aren’t perfect but they will do better than the average developer at scale.
    • There is no queue system for activityPub requests
    • Because there is no queue, user requests and federation have the same priority when it shouldn’t and one can bottleneck the other
    • Live inserts are used meaning that regardless of the DB used, performance is going to be killed since inserting data 1 at a time several times a second is a major waste of resource

    Tl;dr: It’s trying to do everything and not that well. So users suffer because they have to share resources with non-UI related tasks.

    The database suffer because it has to do an insert of 1 object X 50 times in a second when it could do it once for all 50 items.

    Federation suffers because you can’t offload it to a seperate machine farm whose job will be to receive and send ActivityPub requests and send/read data from the correct queues to do so.