What happens when you type google.com in your browser and press Enter?
To know what happens exactly, we first need to define some terms:
Now that we’re all set, we could dive into the big stuff. When a client or user types www.google.com and hits enter:
Let’s get into more details of how this whole process works:
The Domain Name System
It converts domain names? into IP addresses which are then used to load web pages. Every computer that is connected to the internet has its own IP address which other computers use to identify it by. When you search anything online, the browser stores the details in its cache so that when the same client looks up the same page, the browser checks in its cache to see if it has a record of the DNS entry for that domain. In the event that it finds a record in its cache, it responds faster because it does not have to request the DNS server for the IP address.
However, if there was no previous record of the IP address in its cache, the browser sends a request to the DNS server to translate the domain name into an IP address.
The DNS request is an entirely different process on its own but can be summarized as follows:
TCP/IP Model
Transmission Control Protocol and Internet Protocol transfers data from the sender to the recipient. It is a concise version of the OSI model (Open Systems Interconnection) with only 4 layers to it as opposed to 7. It ensures that the data transmitted is accurate in that it is exactly the same as the client sent. It does this by dividing the data into packets and joins the packets at the end to form a whole. By doing so, data is transported faster while still maintaining accuracy.
The four layers of the TCP/IP model are:?
领英推荐
Firewall
A firewall is a security system that monitors incoming and outgoing network traffic so that it can either block or allow requests based on whether or not they follow the predefined rules. The firewall prevents the computer from malware or cyber threats. When a user types in “www.google.com”, the request goes through the firewall to ensure that it is safe to proceed to the servers. The firewalls were designed to secure private networks and the endpoint devices within them called network hosts. These so-called network hosts “talk” with other hosts on the network. They send and receive between internal and external networks as well as outbound and inbound between external networks.
HTTPS/SSL
Hypertext Transfer Protocol Secure (HTTPS) is a more secure version of HTTP and is the primary protocol used to send data between a browser and a website. It uses an encryption called Transport Layer Security (TLS) which was formerly called Secure Sockets Layer (SSL) to protect the data by using asymmetric public and private key pairs. When a connection is established between your browser and Google’s server, the server decides on the version of TLS/SSL to use and then makes a secure, encrypted channel to transport the data.
Load-Balancer
A load-balancer is a server that distributes the workload to different backend servers in order to ensure efficiency. Many users browse the Google website using its domain name or subdomain name. To ensure faster and more efficient responses to the clients, the load-balancer depending on the stipulated algorithm such as (The round-robin algorithm) distributes these requests across the multiple backend servers. A load-balancer prevents SPOFs from occurring.??
Web Server
A web server can refer to software, hardware or both software and hardware working together. On the hardware side, a web server is a computer that contains web server software and a website’s component files such as HTML, CSS and JavaScript. On the software side, a web server contains several parts that control how a client accesses hosted files. For instance, when a user types “www.google.com”, the browser forwards the request to the load balancer which will then be forwarded to Google’s web server. The server through the HTTPS accepts the request, finds the appropriate response (HTML, CSS and JavaScript files), pushes it back to the load balancer which will forward it to the browser and the pushed files are ultimately used to render the page that was initially requested by the client.
Application Server
The application server is responsible for rendering a dynamic web page. When users submit their queries, the load-balancer will forward it to the web server which will forward the request to the application server based on the type of query that was inputted. The web server renders static web pages but the application server renders the dynamic kind. When the application server finds the requested data, it pushes it back to the browser through the web server and load balancer to render the dynamic page.
Database
A database is an organized collection of well structured data or information stored in a computer system and managed by the database management system (DBMS). Depending on the complexity of the requested dynamic web page, the application server may have to make a request to the database to find the data that is needed by the client. If the data is found present in the database, it is returned to the browser and the data is rendered as the web page.
Displaying or Rendering the web page
Upon receipt of the requested files from the web server, the browser forms or displays a page that is made up of Hypertext Markup Language (HTML), Cascading Style Sheets (CSS) and JavaScript (JS). HTML provides functionality to the page, CSS styles the page and JS adds interactivity to the page. The rendered page also includes images which provide more context or even just to the style of the page.
Conclusion
I hope this article provides an insight into how things work under the hood when people search on Google or any other subdomain or domain name.?
Founder at Kua Nasi | Impact Entrepreneur | EMMIE Scholar | Creating Decent and Dignified Jobs for Women | Leader of Tomorrow by the 53rd SGS
1 年So insightful. ??