Glossary For important terms and their usage:

• DNS request – Also known as DNS query stands for Domain Name System request. Involves DNS server and a DNS client communicating for IP address request for a particular domain.

• TCP/IP – Transmission Control Protocol Internet Protocol. This is an improvement of internet protocol which offers secure, error checked transmission of bytes inform of data packets between host and client over an IP address. Used mainly to serve static web pages

• Firewall – used for security purposes as a barrier between trusted and untrusted networks in internet. More on this its a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules.

• HTTPS/SSL – in full it’s Hypertext Transfer Protocol Secure which is a secure hyper text transfer protocol. The securing or encryption is achieved by Transport Layer Security which was formerly known as Secure Sockets Layer(SSL).

• Load-balancer – This is a device whose main purpose is to distribute traffic between servers. Used to increase reliability of applications by distributing loads from clients to available servers.

• Web server – This is a software with underlying hardware(computer) which is used to accept https or it’s secure variant https.

• Application server. This is a type of server that hosts applications. It’s a software that resides between the operating system and other external resources such as database management systems communication internet services and users applications on the other side.

• Database – is information that is set up for easy access, management and updating.

What happens

Step 1.

You begin by asking your computer to resolve a hostname, such as visiting ‘http://www.google.com’ in a web browser(most probably Chrome, Safari, Firefox etc). The first place your computer looks is its local DNS cache, which stores DNS information that the computer has recently retrieved.

Step 2: Request Recursive DNS servers.

If the records are not stored locally, your computer queries (or contacts) your ISP’s recursive DNS servers. These machines perform the legwork of DNS queries on behalf of their customers. The recursive DNS servers have their own caches, which they check before continuing with the query.

Step 3: Request Root DNS servers

If the recursive DNS servers do not have the record cached, they contact the root nameservers. These thirteen nameservers contain pointers for all of the Top-Level Domains (TLDs), such as ‘.com’, ‘.net’ and ‘.org’. If you are looking for ‘www.google.com.’, the root nameservers look at the TLD for the domain – ‘www.google.com’- and direct the query to the TLD DNS nameservers responsible for all ‘.com’ pointers.

Step 4: Ask the TLD DNS servers

The TLD DNS servers do not store the DNS records for individual domains; instead, they keep track of the authoritative nameservers for all the domains within their TLD. The TLD DNS servers look at the next part of the query from right to left – ‘www.google.com’ – then direct the query to the authoritative nameservers for ‘google.com’.

Step 5: Ask the Authoritative DNS servers.

Authoritative nameservers contain all of the DNS records for a given domain, such as host records (which store IP addresses), MX records (which identify nameservers for a domain), and so on. Since you are looking for the IP address of ‘www.google.com’, the recursive server queries the authoritative nameservers and asks for the host record for ‘www.google.com’.

Step 6: Retrieving the record.

The recursive DNS server receives the host record for ‘www.google.com’ from the authoritative nameservers, and stores the record in its local cache. If anyone else requests the host record for ‘www.google.com’, the recursive servers will already have the answer, and will not need to go through the lookup process again until the record expires from cache.

Step 7/8: The last steps(IP resolved and html page delivered for viewing)

Finally, the recursive server gives the host record back to your computer. Your computer stores the record in its cache. After the OS has the IP Address and gives it to the browser, it then makes a GET (a type of HTTP Method) to said IP Address. When the request is made the browser again makes the request to the OS which then, in turn, packs the request in the TCP traffic protocol we discussed earlier, and it is sent to the IP Address. On its way, it is checked by both the OS’ and the server’s firewall to make sure that there are no security violations. And upon receiving the request the server (usually a load balancer that directs traffic to all available server for that website) sends a response with the IP Address of the chosen server along with the SSL (Secure Sockets Layer) certificate to initiate a secure session (HTTPS). Finally, the chosen server then sends the HTML, CSS, and Javascript files (If any) from the servers database back to the OS who in turn gives it to the browser to interpret it. And then you get a display of Google.

All this happened within a matter of milliseconds! Fabolous!




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nicholas Muindi Mwanza

Nicholas Muindi Mwanza

Manufacturing Engineering and Technology Engineer,Software Engineer & Computer Scientist