Hi! Does anyone have a ressource to explain how Lemmy works in terms of the more complicated stuff, as:

  • If a community is hosted on instance A and a user that’s on instance B creates a post in this community, is the post hosted on A, B? Or are individual comments hosted on the instance of their respective authors?
  • what happens when your account gets deleted? Are all my messages deleted? Does this happen to all instances (it syncs the deletion?)
  • do instances cache posts and comments posted on other instances? If so, RAM or disk?
  • will having too many instances increase the load of all instances? (If they all have to sync?)
  • if I want to check the comments of a post, does my client ask this to my instance of to the instance of the author or to the community’s instance?

Questions like this. I guess most will be answered by explaining deeply how ActivityPub works but if anyone has that info, please share :)

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

    If a community is hosted on instance A and a user that’s on instance B creates a post in this community, is the post hosted on A, B? Or are individual comments hosted on the instance of their respective authors?

    Both, but the instance the community is on is the one that forwards it to all the other instances will get it from.

    what happens when your account gets deleted? Are all my messages deleted? Does this happen to all instances (it syncs the deletion?)

    It does delete everything, but it’s a bit buggt and cannot be guaranteed (because I can just restore from backup and undelete everything if I want).

    do instances cache posts and comments posted on other instances? If so, RAM or disk?

    Everything is pushed to all interested instances and host their own copy.

    will having too many instances increase the load of all instances? (If they all have to sync?)

    Only the ones that you subscribe to. But yes generally it would increase load on the big ones like lemmy.ml and lemmy.world since they’re popular.

    But also in a way, it’s no different than one user viewing the post, and your instance have a copy of it and can serve many more users. And the remote instance gets to push it to you when it’s convenient. So not really a problem.

    if I want to check the comments of a post, does my client ask this to my instance of to the instance of the author or to the community’s instance?

    Your instance already have a copy of it all. You always go through your instance (except media, depending on your instance’s settings if the media cache/proxy is enabled).


    Roughly, how ActivityPub works is that instance A subscribes to B (by sending it a subscription request to a given community), and then B just sends A everything that happens from that point on. If you post, then A goes to B to inform it of the post, and then B broadcasts it it to everyone else. A owns the user, B owns the community.

    Most questions can then be answered by thinking of what would happen. What would happen if B bans a user from A? Well A doesn’t care, neither does C, B will just ignore everything from that user. What happens if A bans the user? Well, that user can’t post at all so indirectly also banned from B and C. What happens if A bans a user from C but C posts to B? A will ignore it, while B and C sees it. And so on.

    Each instance is independent and makes its own decisions, so the view is slightly different from instance to instance.

    And yes the fact everyone basically have a fully copy of everything does have some considerable privacy implications. A rogue instance can just ignore deletes and keep full edit histories. Every post, every comment and every vote is public information. It’s entirely an honor system when it comes to deleting stuff.

    • sugar_in_your_tea
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      the fact everyone basically have a fully copy of everything does have some considerable privacy implications

      And I assume some cost concerns as well as posts start to pile up, especially images and whatnot. But the benefit is that it distributes the read load across instances, since you only need to send new content and serve content for your direct users (people on your instance). It’s a tradeoff, and I guess we’ll see how that works out over the next few years.

    • azalty@jlai.luOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      Nope, but that might indeed be a good way to start! I’ll start reading but I’m not sure I can find the exact information I want in an easy to understand way

  • asudox@lemmy.asudox.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    2 days ago

    The best way is to read the docs, read code and experiment yourself.

    I’ll try to answer them, though:

    • It’s hosted on instance A and B. Every instance creates a local copy.
    • Your account gets deleted. If you want, you also can select to delete your content (images, posts, comments, etc.). But since this is the Fediverse, it is not guaranteed that your account and content is deleted everywhere.
    • Iirc they do
    • The existence of the instance itself won’t increase load, but the users on it can.
    • Your client asks your instance.
  • MentalEdge@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    2 days ago

    •If a community is hosted on instance A and a user that’s on instance B creates a post in this community, is the post hosted on A, B? Or are individual comments hosted on the instance of their respective authors?

    Content is controlled by the instance on which a community was created (through the instance admin, local and off-instance mod accounts, as well as individual content authors). Posts and comments get mirrored to other instances with subscribers, and kept in sync by federation events. (Every time someone comments, votes, posts)

    •what happens when your account gets deleted? Are all my messages deleted? Does this happen to all instances (it syncs the deletion?)

    Your instance will delete all local content, and attempt to delete all content from other instances, as well. This may fail, for example if an instance has gone offline.

    •do instances cache posts and comments posted on other instances? If so, RAM or disk?

    All content in a community is mirrored to every instance with subscribers. Images may be cached, but are hosted primarily by the instance they were posted from.

    •will having too many instances increase the load of all instances? (If they all have to sync?)

    No. Instances only mirror content from off-instance communities which have at least one local subscriber. Instances do not need to host everything from every other instance.

    •if I want to check the comments of a post, does my client ask this to my instance of to the instance of the author or to the community’s instance?

    Your instance. Assuming no federation issues, your instance will have a complete copy of the content.