https://grafana.lem.rocks/d/bdid38k9p0t1cf/federation-health-single-instance-overview?orgId=1&var-instance=lemmy.world&var-remote_instance=aussie.zone

Parallel sending of federated activities to other instances. This can be especially useful for instances on the other side of the world, where latency introduces serious bottlenecks when only sending one activity at a time. A few instances have already been using intermediate software to batch activities together, which is not standard ActivityPub behavior, but it allows them to eliminate most of the delays introduced by latency. This mostly affects instances in Australia and New Zealand, but we’ve also seen federation delays with instances in US from time to time. This will likely not be enabled immediately after the upgrade, but we’re planning to enable this shortly after.

https://lemmy.world/post/23471887

    • Zagorath@aussie.zone
      link
      fedilink
      English
      arrow-up
      21
      ·
      2 days ago

      Basically, the way Lemmy is designed, each instance has to tell each other instance what its users did (where relevant—no need to send to aussie.zone a post made in a community that there are 0 aussie.zone subscribers, for example). That includes posts, comments, and upvotes. And the way it’s designed, the originating server (in this case, LW) has to send it to the receiving server (AZ), then the receiving server sends a confirmation back, and then the originating server can send the next one.

      Because LW is hosted in Germany, and AZ in Australia, there’s a minimum amount of time thanks to the physical constraints of sending signals over that long distance. And double that because it’s a return trip, and a small amount more for processing time. It ends up measuring in the hundreds of milliseconds. Which leaves you with a maximum of a few hundred thousand actions sent from LW to AZ per day. If LW users are doing more than this, then the delay will slowly grow. If they send less, the delay will shrink, or remain at near 0.

      Now, the most recent version of Lemmy actually lets you set it so that instead of sending just one at a time, you can have multiple threads, so you’re sending multiple at a time. But LW only upgraded to this version a few days ago, and they didn’t turn on this feature when they did so.

      • Alphane Moon@lemmy.world
        link
        fedilink
        English
        arrow-up
        23
        ·
        2 days ago

        Wait, every single action is sent individually and the next action is sent upon confirmation of successful delivery?

        This is is wild.

          • Alphane Moon@lemmy.world
            link
            fedilink
            English
            arrow-up
            6
            ·
            2 days ago

            I guess it’s good that this issue is in the process of being resolved while the network is small and primarily consists of technically minded users.

            • Kichae@lemmy.ca
              link
              fedilink
              English
              arrow-up
              4
              arrow-down
              1
              ·
              2 days ago

              I mean, it’s not being resolved, since the issue is that LW is too big to effectively federate, and LW is refusing to take the steps to improve the situation. Weirdly enough, this is less of an issue if the network scales horizontally, with a large number of small nodes.

              But also, this is a symptom of the current attitude of “it shouldn’t matter where the community is hosted”. The fediverse is a simulacrum of centralized social media, and a poor one at that. The more we try and beat it into that shape, the more it’s going to get all weird on us.

              Like, a significant issue here is the insistence people have had that up/down-votes be synchronized. People want to know what the global passive-aggressive opinion on a post or comment is, rather than the local one, which requires every single button press to be sent to each and every subscribing website. And people expect stuff to be sent out as a live stream, rather than being held back for batching, too.

              There’s a significant cultural issue to be sorted out here. Better mechanical features aren’t going to solve it in the long run.

              • Alphane Moon@lemmy.world
                link
                fedilink
                English
                arrow-up
                6
                ·
                2 days ago

                LW is too big to effectively federate

                LW is like ~35% of Lemmy’s 55K MAU, right? So around ~19K MAU. For the Threadiverse to be viable on a mass scale, support for an instance with ~20K MAUs is a must. I would argue it’s a must for an instance with 2 million MAUs.

                This includes graceful support for up/down votes.

              • Die4Ever
                link
                fedilink
                English
                arrow-up
                4
                ·
                edit-2
                2 days ago

                Like, a significant issue here is the insistence people have had that up/down-votes be synchronized. People want to know what the global passive-aggressive opinion on a post or comment is, rather than the local one, which requires every single button press to be sent to each and every subscribing website. And people expect stuff to be sent out as a live stream, rather than being held back for batching, too.

                I figure this could be reduced a lot if even just 1 minute worth of votes were batched together, although I don’t think the ActivityPub standard technically includes batched activities currently

    • mormund@feddit.org
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 days ago

      Afaik only one item (post/comment) is synced at a time. So if there is a lot of latency between the instances, new content is produced faster than can be synced. But I’m sure someone will link the GH issue if I’m wrong

    • Die4Ever
      link
      fedilink
      English
      arrow-up
      8
      ·
      edit-2
      2 days ago

      if the requests are all serialized, if the ping time is like 300ms, and if each request takes like 100ms of CPU time

      that means you only need 648,000 actions in queue to equal 3 days

      when you consider that even upvotes/downvotes of posts/comments count as actions, I could see it happening

      but the queue isn’t completely serialized anymore, so maybe this number is still a bit unbelievable (EDIT: seems like LW has not yet enabled the feature for parallel sending)

      • Alphane Moon@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 days ago

        A single action cannot take 100 ms of CPU time. This does not sound realistic.

        And why is this with aussie.zone only? This would be all instances, no?

        • Otter@lemmy.ca
          link
          fedilink
          English
          arrow-up
          5
          ·
          2 days ago

          Aussie.zone might be the most extreme case, since its physical location is the farthest away from the largest Lemmy instance

        • Rimu@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          2 days ago

          Recording a vote from an already-known account is way less than 100 ms, yes. Usually it’s less than 100 ms but sometimes it can be several seconds.

          When an activity is received the cryptographic signature on it needs to be checked and that means sending a network request to the creator’s instance to retrieve the creator’s public key (and profile pic, and cover pic each of which are more network requests. Then resize and store those images).

          Images in posts need to be downloaded, resized, scanned for objectionable material, etc.

          Every network request is quite unpredictable as many instances are overloaded or poorly configured.

    • Zagorath@aussie.zone
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      Yup, exactly so. I’ll often notice a reply to one of my comments from a LW user will only show up in my inbox about 3 days later.

    • ikt@aussie.zone
      link
      fedilink
      English
      arrow-up
      6
      ·
      2 days ago

      i don’t know if there’s any prioritising of types of actions, eg. posts are given higher priority than comments which is higher than up/down votes but when I made posts on lemmy.world I’d get an initial wave of upvotes from other instances and then like 12 hours later a lot of upvotes from lemmy.world users

  • veroxii@aussie.zone
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    2 days ago

    And you know what? I don’t feel like I’m missing anything. Lots of posts and comments to keep me busy for hours.

    • db0@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      14
      ·
      2 days ago

      It should have. The backend added parallel syncing since a few versions back. By all accounts it should be going down.

          • OpenStars@piefed.social
            link
            fedilink
            English
            arrow-up
            6
            ·
            2 days ago

            Perhaps they wanted to assess as few changes as possible simultaneously before turning on any optional features. I would imagine they will get to it fairly quickly.

      • Blaze (he/him) @lemmy.dbzer0.comOP
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        Parallel sending of federated activities to other instances. This can be especially useful for instances on the other side of the world, where latency introduces serious bottlenecks when only sending one activity at a time. A few instances have already been using intermediate software to batch activities together, which is not standard ActivityPub behavior, but it allows them to eliminate most of the delays introduced by latency. This mostly affects instances in Australia and New Zealand, but we’ve also seen federation delays with instances in US from time to time. This will likely not be enabled immediately after the upgrade, but we’re planning to enable this shortly after.

        https://lemmy.world/post/23471887

  • FrostyTrichs@crazypeople.online
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    2 days ago

    Any idea how aussie.zone is hosted? Syncing can become bottlenecked as instances grow and discover more communities. If they’re using a remote host they may need to upgrade or adjust their setup to hold sync with the larger instances.