How does google.com resolves over the Internet

Brief story

Rodrigo Zarate Algecira
3 min readJan 20, 2022

Step by step all the way down to the mistery behind google (or any other site)

Computers are very good using numbers, we don’t. So we invented a system to match numbers with word, something we are better about.

  • DNS request

The first step is the DNS request, you type google.com and all the gears start to roll, your computer have a file to search for a number written as a gruop of four, something like 00.00.00.00. If your computer have a match for google.com in that file it will return the matching number, if can’t find it, then will try to connect to a remote server to get that number.

Your DNS request will almost always have either HTTPS or HTTP as the SCHEME, next goes the DOMAINthe name something like google.com in this case, later comes the PATH in this case there’s no path, but you can have something like google.com/somefolder/anotherfolder as path, netx come the RESOURCE thats the name of the file, in this case is ommited so the server will respond with the default some kind of index.html or index.php or index. something that can varies a lot.

The full example of SCHEME + DOMAIN + PATH + RESOURCE will be in our case: https://google.com but for one of my sites can be: https://zarate.com.co/elrranas/ELRRANAS-tarde-ya.mp3

The DNS Lookup it’s complex and have to be blazingly fast, relies a lot on cache to avoid multiple requests or recursive DNS Lookup. The idea is that will get a match for your request with a number that represents the actual server that host the “files” youre looking for.

  • TCP/IP

In full, Transmission Control Protocol/Internet Protocol is a two part system developed for ARPANET in the 1970s. The TCP role is to break and reasemble information into small bits and the role of IP is asure that the packets reach the right destination.

As you have a server address thanks to the DNS lookup, you can now initiate a TCP connection with the server. Once stablished the browser can start making additional requests according to the rules of comunication of the protocol.

  • Firewall

The firewall block unauthorized connections to the server

  • HTTPS/SSL

If the SCHEME used is https the server have to do a “handshake” to verify the identity of the server.

  • Load-balancer

The load balancer split the requests into all available servers to allow more traffic to the resources.

  • Web server

The web server proceses the request and “serves” the pages it’s asked for, in case that the request ask for a dynamic resource the request is send to the Application server and in some cases to the Database trough it.

  • Application server

The application server is in charge of the delivery of dynamic content of the page youre looking for.

  • Database

The database holds info and serves it upon request

It take a LOT of steps to go to the server with a request and have a response back, thats nowadays amazingly fast, so you can now whatch movies or create cat memes.

Enjoy.

--

--

Rodrigo Zarate Algecira

In the path of Programming #AgriculturaUrbana $rodrigozarate Instagram: agromerlin