What happens when you type google.com in your browser and press Enter

Kofi comes home from school. He was given an assignment to write a report on "the impact of the internet on education". He proceeds to turn on his computer, launch his favorite web browser and enters the URL; https://www.google.com. Lets take a look at what happens when he hits Enter on his keyboard.



DNS request

Computers and other technological devices identify each other using IP address however, we humans cannot memorize the numerous IP addresses being used globally, Thus we invented the Domain Name System(DNS) to translate the human-friendly domain name like www.google.com into a machine-readable IP address like 0.0.0.0. DNS servers act like the phonebook of the internet.

Immediately Kofi hits enter his browser breaks down the URL and searches the cache first to see if the IP for https://www.google.com is known or unknown. If it is unknown, the browser passes the task on to the Operating System(OS). In the event that both don't know the IP for https://www.google.com, the OS calls the resolver. The resolver most likely your Internet Service Provider(ISP) locates the root server. The root server then proceeds to locate the .com Top Level Domain(TLD) server. The TLD server passes the task on to the authoritative name servers. When a domain is purchased, the domain registrar reserves the name and communicates to the TLD registry the authoritative name servers. Therefore the authoritative name servers are linked directly to the IP addresses.

When the IP addresses is gotten, the address is passed back through the same chain of communication to the browser. However, the browser and the resolver store the address in case Kofi decides to visit https://www.google.com again. 

TCP/IP

After Kofi's browser gets the IP address of the requested domain name through DNS resolution, it performs a Transmission Control Protocol(TCP) connection to establish a connection with the server. The TCP/IP is a connection-oriented transport protocol that uses sequence numbers and acknowledgments to recover from damaged or lost data. TCP also provides flow control, which allows a busy receiver to govern the amount of data sent by the sender(Kofi's Computer). The TCP/IP protocol ensures that each bit of data is transmitted or received is as it should be.

Firewall

Based on certain rules set on Kofi's computer, the computer firewall ensures that the data packets arriving and going out through his TCP/IP from and to Google servers are safe. The firewall bolster security by ensuring a Kofi's request for information from a server(Google) undergoes rigorous scrutiny.



HTTPS/SSL

When a connection to a Google server is established, Kofi's computer performs an Secure Sockets Layer(SSL) handshake with the Google server, which is commonly referred to as a Transport Layer Security(TLS) handshake . This involves the computer agreeing with the server(Google) on how to effectively perform the encryption and decryption of the data sent or received using a private and public key system.

Load-balancer

After Kofi's computer performs a TLS handshake and an HTTP request is sent to the server, it first arrives at the load balancers. The Load Balancer acts as a traffic cop, distributing incoming requests among multiple servers often redirecting them to the appropriate server. Its role is to optimize resource utilization, improve responsiveness, and enhance overall performance and availability. Load balancers analyze incoming requests and determine distribution methods based on factors such as server load, health, or algorithms.

Web server

The web server is a software application or hardware device that stores, processes, and serves web content to users over the internet. It plays a critical role in the client-server model of the World Wide Web, where clients (typically web browsers) request web pages and resources, and servers respond to these requests by delivering the requested content. Thus, the web server provides the HTTP response for Kofi's request.

Application server

An application server handles requests which create dynamic pages. So instead of serving an HTML page that is stored on the hard drive, it dynamically generate the HTML sent to the end user. Most of the time, this application server software is running on the same physical server machine as the web server. The application server handles complex cognitive functions within the web application.

Database

The database server software is where the application stores its structured information. Typically, this means custom software which allows the application server to ask questions like “how many items does user x have in their basket?”, using a programming language. Examples are MySQL, SQL Server, Oracle (all “relational databases”), and MongoDB, Redis and CouchDB (“NoSQL” solutions). The database serves as the repository for data, enabling a wide range of operations collectively referred to as CRUD.



The server then processes the request and sends back the requested webpage to your browser, which interprets the page’s code and displays it as a webpage.

Comments

Post a Comment