So I have been reading a bit about networking, and I am a bit confused about what exactly happens after domain name resolutions.
Lets say I do a get request to
"some.website.com". First, my request goes to my
ISP then checks in their
cached DNS; The request goes all the way to the
root server; the name server, the A records ... (I may have messed up some steps in the
DNS, I am still learning, but I got the general idea their). Finally, the name is resolved. We have found the
IP for the site to be
x.x.x.x. What happens then? How does my computer and x.x.x.x know how to talk to each other? If I use a human messengers analogy, I would tell a person to go get me a package, and I would give him the address of the location and a map (he probably already have one).
When it comes to the computers, the address would be the
IP. Knowing the
IP, however, doesn't exactly tell me where to find that computer (how to get to it?) or does it? So my question is after the
IP is found, how do the two computers find a route to communicate to each other? what is the analogy for the map?
I have a guess, so what I would imagine is, my computer would ask my
ISP, if he knows anyone with x.x.x.x
ISP does the same with other connected devices and then the devices do the same until they are an ending node (have no more connection except the one they are talking to) or x.x.x.x themselves. If they are an ending node, the path taken to reach their would be considered a failure, but if they lead to x.x.x.x then they will be considered as a possible way to communicate with my computer. Out of those possible paths the shortest would be the one that found x.x.x.x first and that would be used until a node in between breaks.But this sounds a very slow algorithm and one that would get even get slower as more nodes are added to the system. (Is this close to the right way or very far?)