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 :)
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)
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.
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.
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.
Your instance. Assuming no federation issues, your instance will have a complete copy of the content.
Thanks for your answer and your time :)
I assume an account getting banned is the same as an account getting deleted?
I’ve already seen some federation issues such as votes on posts/comments not matching between instances, or some comments not appearching
Only if the administrator of the instance chooses to delete the content as well.
If they did, it will be the same as deleting the account with “Delete content” option set to true.
https://github.com/LemmyNet/lemmy/blob/1a299ba6284edc4cefb7507d84d01cd30649a28c/crates/api/src/local_user/ban_person.rs#L25
https://github.com/LemmyNet/lemmy/blob/1a299ba6284edc4cefb7507d84d01cd30649a28c/crates/api_common/src/utils.rs#L732
Banned on local instances, is the same as being deleted. Banned by another instance means you won’t show up on that instance.
Atop all this there’s defederation.
My instance for example won’t count votes or show comments from users with accounts on lemmynsfw, because we defederate porn. This happens even if I go look at posts in a community on another instance that does federate with lemmynsfw.