Let’s say we have lemmy instances A, B, C.

alice from A makes a post “Hello, world” to B. What happens? How is it processed on servers A, B, C and how do users from A, B, C receive her post?

  • Illecors@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    17 days ago
    • A makes a post to B
    • B federates that post to all instances that have at least 1 user subbed to the community of the post

    All users from all instances get the post from their home instance.

    • akkajdh999@programming.devOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      17 days ago

      Thanks but this is quite high-level.

      Okay, so Alice makes a request to A. A makes a request to B. B makes requests to all other instances.

      If you get posts from your home instance, does it mean that all instances duplicate the same database?

      • Zak@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        17 days ago

        They don’t duplicate the database in a technical sense, but when things go right, they each have a copy of the same post and comment text, and the same votes.

        • akkajdh999@programming.devOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          17 days ago

          Do you mean that the database is not identical, but still duplicates all data, basically? (you said “they each have a copy”, I assume it’s persistent on disk). So if we have 100 lemmy instances, they all save the same post.

          • Zak@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            17 days ago

            Correct. Each server that shows the post to its users stores a copy of the post. It does not necessarily store attached media (IIRC Mastodon usually does and Lemmy usually hotlinks media).