Copy of What happens when you type google.com in your browser and press enter.

Copy of What happens when you type google.com in your browser and press enter.

When you type google.com in your browser and press enter have you ever thought about the things that happen behind the scene, were you ever curious about what happens immediately after clicking enter key, or what happens within those few seconds to generate the list of search results that google displays when you search for anything? if you have ever been curious then let me explain.

These explanation will be reflecting on the following:

  • DNS Request
  • TCP/IP
  • Firewall
  • HTTPS/SSL
  • Load Balancer
  • Web Server
  • Application Server
  • Database

I understand that we all know what a browser is but i will drop a simple definition of a browser. A browser, short for web browser is a software application used to access and view websites and navigate the internet. common examples are Google chrome, Firefox, Microsoft Edge, Apple safari, Opera etc.

DNS Server

The Domain Name System (DNS) is the phonebook of the internet. when users type domain name such as 'google.com' or 'nytimes.com' into web browsers, DNS is responsible for finding the correct IP address for those sites. Browsers then use those addresses to communicate with origin server or CDN edge servers to access website information.

DNS lookup process explanation

  • The browser sends a request to the local DNS resolver
  • The local DDNS resolver checks it's cache to see if it has a recent copy of the DNS record for a domain. If it does it sends the IP address back to the browser, if it does not it sends a request to a root nameserver
  • The root nameserver responds with the address of a Top level Domain (TLD) name server such as .com .org
  • The local DNS resolver sends a request to the TLD nameserver, The TLD nameserver responds with the address of the authoritative nameserver.
  • The authoritative nameserver responds with the IP address for the domain.
  • The local DNS resolver sends the IP address back to the browser
  • The browser sends a request to the server at the IP address to retrieve the webpage.

TCP/IP

The transmission control / Internet Protocol (TCP/IP) protocol suite is the engine for the internet and networks worldwide.

TCP/IP provides communication services that run between the programming interface of a physical network and user application.

when you enter google.com into a web browser, the browser uses TCP/IP to establish a connection with the server that hosts the website.

The breakdown:

  • The browser sends a request to the server using IP to establish a connection
  • The server receive the request to the sends back a message acknowledging the request to establish a connection. This process is called the handshake process.
  • Once the handshake process is complete, the browser can send request for the webpage it wants to access(in this case, the homepage of google.com).
  • The server receives the request and send back the HTML code for the homepage of google.com to the browser.
  • The browser receives the HTML code and use it to render the webpage on your screen. Any resources such as image that the webpage needs are also requested and received using TCP/IP.

Firewall

Firewall began as a physical, hardware entry point to networks, blocking unauthorized traffic and permitting data packets that belonged. firewalls deny or allow entry request based on previous network traffic patterns.

when you type a URL like google.com into your browser, the request that your browser makes to google server passes through the firewall on its way. The firewall checks the incoming request to make sure it is allowed based on its security rules.

if the incoming request meets the security rules set by the firewall in front of Google's server, it is allowed through and the browser is able to access the website.

HTTPS/SSL

HTTPS (Hypertext Transfer Protocol Secure) is a secure version of the HTTP protocol used to transmit data on the internet. It is used to encrypt the data transmitted between your browser and Google's server.

SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are encryption protocols that are used to secure the data transmitted over HTTPS.

When your browser establishes a connection with Google's server using HTTPS, your browser and Google's server first agree on the version of SSL/TLS to use and then create a secure, encrypted channel for transmitting the data.

When you type "google.com" into your browser, the browser is like the person sending the message. The server that hosts google.com is like the person receiving the message. The browser sends a request for the webpage using HTTPS, which is like putting the request in the locked box and sending it to the server. The server then sends the webpage back to the browser using HTTPS, which is like putting the webpage in the locked box and sending it back to the browser.

Load Balancer

A load balancer is a device that distributes incoming network traffic across a group of servers or resources.

Its primary function is to ensure that the traffic is distributed evenly across the servers in order to avoid overloading any single server and to increase the overall capacity and reliability of the system.

In the case of a browser trying to access google.com, the load balancer would receive the incoming request from the browser and then forward it to one of the servers in the Google server network. The particular server chosen will depend on the type of load balancing algorithm implemented.

Web Server

A web server is a computer program that is responsible for handling requests for web pages from clients (such as a browser trying to access google.com). When a client sends a request for a web page to a web server, the server processes the request and returns the appropriate response to the client.

This means that when trying to access google.com, Google's server will receive a request from the load balancer.

The web server would then process the request and generate a response, which would typically include the HTML, CSS, and JavaScript files that make up the web page.

The web server would then send this response back to the load balancer, which would forward it on to the browser. The browser would then use the HTML, CSS, and JavaScript files to render the web page for the user.



要查看或添加评论,请登录

Faith Makata的更多文章

  • WEEKLY REFLECTION

    WEEKLY REFLECTION

    Mastering CSS Layouts When I first started diving into software development, I found HTML fairly straightforward. You…

社区洞察

其他会员也浏览了