this post was submitted on 20 Aug 2023
91 points (96.9% liked)
Fediverse
28489 readers
764 users here now
A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).
If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!
Rules
- Posts must be on topic.
- Be respectful of others.
- Cite the sources used for graphs and other statistics.
- Follow the general Lemmy.world rules.
Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Pretty good answer but there's no periodic sync. From the moment a community is subscribed to, the instance that is home to the community will send all activities in that community to the subscribed instances as they happen.
That's why you don't see old content all being synced. Just new content (and some old content if it is liked or replied to after subscribed)
Is there a single source of truth? It really sounds like split brain is possible?
All instances may have their own copy but I imagine the community the instance was posted on is important and need to be up?
Well, the answer is "it depends"
For the community as a whole, I would say that the instance that hosts the community must be up to federate any new posts to other instances. Because it works a bit like:
Instance A hosts Community 01.
Instance B user posts to Community 01.
Instance B federates the post to Instance A
Instance A federates the post to Instances C, and D.
So, if instance A is down, the post will exist only on instance B.
But, federating the posts and comments themselves is not the only way an instance will get posts and comments. Consider the following situation. The post above exists on instances A-D. But after it is posted, Instance E subscribes to the community. Instance E will not have the above post. They will only start getting new federation events.
However, say for example someone on instance C likes the post? The like event will be sent to Instance E. Instance E will see the like, try to find the post (the post/comment URL is included in the like event) and fail. So, it will then look up the original post. Here's where it gets interesting. That URL will not be on Instance A where the community lives, but on Instance B where it was posted. So, in this case, if Instance B is down, Instance E will not be able to fetch the post.
However, if all the instances are up, Instance E will get the post add the like and add to database. This is why when subscribing to instances you will get some old content appear but not all. Because if the old content is interacted with, it will be fetched to render the interactions.
This understanding is based on my understanding of kbin federation. But, I would be very surprised if lemmy did not work the same.
EDIT:
To be clear, to see what already is federated no other instances except the one you're visiting need to be up. For federation of live events happening to a community, the instance hosting the community must be up and to fetch content needed for a federation event (for which the referenced object was not received via federation), the instance the content was created must be up.
Very well written! Seems easy enough, thank you!