So like, how does Lemmy work?
When I click on a post, let’s say Lemmy.World, that server sends me the page over the Internet. I get that part. But how does it do comments? Does it tell my phone to go ask lemm.ee and blahaj servers, etc, and fetch the comments?
And why does a post on lemmy.world have have a blahaj URL when I look at it? Is my server making a copy?
Here’s the basics:
Pretend that there’s only three lemmy servers in the world, lemmy1/lemmy2/lemmy3.
At first they will be completely isolated and they won’t talk. Until a user of lemmy1 searches for a community on lemmy2, for example !memes@lemmy2.com. lemmy1 will see that that community belongs to another server, reach out to it and ask for info. The user of lemmy1 will see that the community exists but not much else and unless they subscribe, not much else will happen.
But if they do subscribe, then the lemmy1 server will reach out to the other and tell them that the user subscribed. From then on out anytime anything happens on !memes@lemmy2.com the lemmy2 server will send a message to the lemmy1 server which will save a local copy. Any time a lemmy1 user comments or votes on content in !memes@lemmy2.com the lemmy1 server will similarly send a message to the other server.
So let’s say something similar happens with a user on lemmy3 subscribing to that community. Then a user on lemmy1 makes a post to the lemmy2 community. The lemmy1 server will send a message to lemmy2 which will record the post and display it to its users, and then it will send a message to lemmy3 that there’s a new post in the community so that their users can see it too.
So the size of the home server grows over time as it stores text comments from other places it federates with.
One thing I’m confused is if Lemmy1 and Lemmy3 aren’t subscribed to each other, but they both comment on a thread on Lemmy2, will they see each other’s comments?
The size of all involved instances grows since they all store a copy.
Yes, when lemmy2 receives a comment from an outside instance it will then send that comment to all subscribed instances.