What happened between requesting a website and showing back the page?

Typing the name of a web page and waiting a response back is our daily use of the internet and cover almost all our activities, between paying our bills asking for help and how to do this or that, reviewing our friends activities, and a lot more. But knowing what really happen behind the scene is still a matter of specialist. today i try to demystify the abstraction above the network so let’s begin.

What is a domain name?

According to RFC1035 “The goal of domain names is to provide a mechanism for naming resources in such a way that the names are usable in different hosts, networks, protocol families, Internets, and administrative organizations.”

So a domain name is a mechanism for naming webpage and hosts, entered in our browser’s address bar in order to reach information or hosts associated to this particular name. for most of users is the brand name like “Facebook”, “Netflix” or “Amazon” chosen for this particular reason to be memorable because the real address of each website is the IP ‘Internet Protocol’ address of the server where the website is hosted (we come back to TCP/IP later) is quite difficult to holding it on.

But the way that the resolver manage to find this IP address is quite long recursive process. in order to understand it let’s request the address of our honorable school www.holbertonschool.com and walk through the process of getting the IP address back.

First, you type www.holbertonschool.com into your web browser. However, your computer doesn’t know the IP address of the server for www.holbertonschool.com. So your computer starts by sending a query to its assigned recursive DNS nameserver. Your computer asks the recursive DNS server to locate the IP address of www.holbertonschool.com the DNS name-server is now assigned the task of finding the IP address of the website. If the recursive DNS nameserver did not already have a DNS record for www.holbertonschool.com cached in its system, it will need to ask for help from the authoritative DNS hierarchy to get the answer.

Each part of a domain like www.holbertonschool.com has a specific authoritative DNS name-server (or group of redundant authoritative name-servers).

At the top of the server tree are the root domain nameservers. Every website address has an implied “.” at the end, even if we don’t type it in. This “.” designates the DNS root nameservers at the top of the DNS hierarchy. The root domain name-servers will know the IP addresses of the authoritative nameservers that handle DNS queries for the Top Level Domains (TLD) like “.com”, “.net”, or “.org”. The recursive DNS server first asks the root domain name-server for the IP address of the .com TLD server, since www.holbertonschool.com is within the .com TLD.

The root domain nameserver responds with the address of the TLD server. Next, the recursive DNS server asks the TLD authoritative server where it can find the authoritative DNS server for www.holbertonschool.com The TLD authoritative server responds, and the process continues. The authoritative server for www.holbertonschool.com is asked where to find it and the server responds with the answer. Once the recursive DNS server knows the IP address for the website, it responds to your computer with the appropriate IP address. Your browser loads Holberton School, and you can starts define your future.

What is TCP/IP protocols

After getting the IP address of the destination computer. we need to guarantee that the to computer sender and receiver speak the same language for this reason we dive in protocols.

Each computer (including mine and the one where www.holbertonschool.com hosted) have a typical TCP/IP network node, which is the convention way that we connect to the internet. So my computer connected by an Ethernet cable plugged in the Network Interface Controller managed by an Ethernet driver which have 6-bytes address (MAC address) a unique identifier to the internet in case of an external request to my computer an Ethernet Frame comes to the Ethernet driver then based on the type of request will forwarded to the ARP (Address Resolution Protocol) or the IP module, again based on the protocol field on the header of the IP Packet will be forwarded either to UDP or TCP protocol.

According to RFC122The Transmission Control Protocol (TCP) is intended for use as a highly reliable host-to-host protocol between hosts in packet-switched computer communication networks, and in interconnected systems of such networks.” so as a protocol is like a “driving code” in the internet roads. can deliver the high reliability in stream transfer because each packet is indexed and delivering guaranteed. every packet flagged with a header provide the necessary data to accomplish the delivery.

While TCP contains information about what data has or has not yet been received, HTTP (Hypertext Transfer Protocol) contains specific instructions on how to read and process this data once it arrives.

When you type www.holbertonschool.com in your web browser a HTTP GET request sent from your computer to the web server hosts www.holbertonschool.com, according to the Basic architecture of TCP/IP protocol the request goes down to the IP module then the Ethernet driver. in this point the TCP header is like the mail’s label of the request. need to hit the right server (address).

What is the web server?

A web server is a software or hardware dedicated to run this hardware, is a software able to understand and process a HTTP request or any other protocol and can store and deliver a web page content. like a web server is hosted in a network device computing hardware can assign an IP address to it. so by now our request is coming on the door of a web server asking for page content. the server can understand our request and can deliver our page.



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