I'm very new to the fediverse, but I love the concept. I was really excited about the idea of setting up my own instance (because apparently I can't just wade into the shallow end first). As I started reading guides and thinking through how it would all work, a question popped into my mind: How does an instance A discover the existence of a new instance B?
I get that users can specifically search for resources on another instance (e.g. !fediverse@lemmy.world), and via WebFinger and ActivityPub that instance can be found, queried, and the content delivered to the user's home instance. But if I go to my home instance right now and just search for a keyword (e.g. silly dogs), I see results from other lemmy instances. That makes me think that my home instance somehow has knowledge of these other instances and is also searching for my keyword over there as well.
The only ways I can think of that this could happen is 1) there is some central service that keeps up with all of the instances (but that doesn't sound very fediverse-like), or 2) a given instance isn't discovered until either an admin specifically adds it to the allow list or at least one user specifically searches for a resource on that instance (but that seems like it's going to make keyword searches very hit-or-miss).
Is there something I'm missing, or are one of these options what is actually happening?