We now routinely browse, whether we are aware of it or not. We start our browser, type in a few URLs, and look for various websites educational, religious, news, etc. But what we are actually doing is browsing the internet. When we type a domain name into our search bar and press Enter, we might not have given it any thought. Therefore, today I'll explain what happens when you insert the well-known domain name google.com into your browser and press Enter.
DNS Request
When we enter google.com, the browser (or at least mine) will automatically fill in the rest of the URL. Then, when we check our search box, something like this appears: https://www.google.comThis URL have four parts
https = which is the protocol
www = an IS enabling documents and other web resources to be accessed over the internet (Wikipedia).
google = which is the domain name
.com = which is the top level domain
The domain we are typing in our browser—in this case, google.com—is linked to an IP address of a server located somewhere in the world. So that when we enter the domain name in the search bar, our computer sends what is known as a DNS Request to a DNS Server on our network.
A DNS server connects our computer to the website we are looking for (google.com) by translating the domain name to an IP address. If the DNS server of our network recognizes the IP address of the domain we are looking for, excellent! We have found the desired page. If not, however, one of the root servers will receive the request from our DNS server instead. Those root servers look to be sophisticated. The root server replies by directing the user to the proper TLD (Top level domain) DNS server, which can subsequently give the requested domain name's IP address.
Although the root servers are essential to the operation of the internet, they do not hold any actual domain name data. Instead, they only direct users to the relevant authoritative DNS servers, which are in charge of maintaining and preserving DNS entries for particular domains. Our authoritative DNS servers will use the.com TLD as it is our TLD. The IP address of the domain name we typed into the search field, google.com, will then be found by the authoritative TLD DNS and sent back to our DNS so that it may be sent to our machine.
TCP/IP
It is now time to establish a connection utilizing the https protocol that we have provided in the URL after obtaining the IP Address of our domain name (google.com). The TCP/IP (Transmission Control Protocol/Internet Protocol) set of protocols includes HTTPS. On the internet, network devices are connected via a set of communication protocols called TCP/IP. A private computer network (an intranet or extranet) may also employ TCP/IP as its communication protocol. So, utilizing this Protocol, we will now establish a connection with a distant server.
TCP 3 way handshake, a new idea, will now be introduced. A connection is made between our machine and the server during this process. Technically speaking, we can refer to our machine as a client and the connection as a client-server connection. Now that synchronization is required, our computer makes a SYN request, means that our computer asks if we can connect to the server. Then the server may reply SYN-ACK if it is ready to connect or it will reply with a RST (reset) packet rather than the anticipated SYN-ACK (synchronize-acknowledge) packet. This RST message indicates that the requested port is not open or that the server is not accepting new connections. The RST packet immediately stops the connection attempt, and the client program often displays an error message to the user that says "connection refused" or something similar. So now let us assume that we got SYN-ACK and for the last time our machine will send ACK packet to the remote server. After all this, now a TCP connection is formed between our computer and the server running google.com.
Firewall
Right now have something to keep in mind, firewall. Although it's better to have both, firewalls can be either software- or hardware-based. A physical firewall is a piece of equipment that can be situated between our network and gateway, whereas a software firewall is a program installed on each computer that controls traffic through port numbers and applications. They manage the traffic to and from our network in accordance with the guidelines we give them. Therefore, before attempting to connect to a particular server, we must confirm that the IP address of the server is valid for use on our network. The firewall will prevent a connection between our machine and the server if it is not permitted on our network.
HTTPS/SSL
The World Wide Web was built on the Hypertext Transfer Protocol (HTTP), which is used to load web pages with hypertext links. Running on top of other layers of the network protocol stack, HTTP is an application layer protocol created to transport data between networked devices. A client machine makes a request to a server, which then sends a response message, in a normal HTTP flow. The basic protocol used to transmit data between a web browser and a website is HTTP, while HTTPS is the secure version of HTTP. To strengthen the security of data transport, HTTPS is encrypted. This is crucial when customers login into a bank account, email account, or health insurance provider and transfer sensitive data.
As a result, our machine now connects to the server via TCP/IP and begins communicating with it using the protocol we defined in the URL (https). This protocol specifies various request forms (such as GET, POST, and PUT) and answers that are protected by Secure Sockets Layer (SSL), a widely used security protocol that encrypts and decrypts data as it travels from the client to the server architecture at the load balancer.
Load-balancer
A load balancer sits in front of the server between our PC and the server. A load balancer distributes client requests across all servers capable of doing so in a way that maximizes speed and capacity utilization and makes sure that no server is overworked, which could lead to performance degradation. The load balancer routes traffic to the active servers in case one server goes offline. The load balancer initiates requests to a new server when it is added to the server group.
To avoid downtime and a Single Point of Failure (SPOF), the load balancer divides the website's requests among several servers when there are a large number of users (requests) visiting the site. Therefore, the load balancer is now taking our request rather than the server directly. Upon accepting our request, the load balancer transfers it to the ideal candidate based on the algorithm it is applying.
Web server and Application Server
A web server program is installed on the server with whom we are communicating. By giving us static web contents that are stored on it, such as HTML files, text files, and photos, this program assists the server in responding to our requests. An application server sits in front of Google's database on the server. By running programs, interacting with databases, and managing user information, among other things, an application server creates dynamic content.
Database
A database is an organized collection of structured information, or data, typically stored electronically in a computer system. A database is usually controlled by a database management system (DBMS). Together, the data and the DBMS, along with the applications that are associated with them, are referred to as a database system, often shortened to just a database.
Now the server we are communicating with(google.com) has this thing called a database. This database gives us any information we query from it and stores the information we give him like account information etc.
After all this process you see the page you are looking for at last. When you read this blog post it might seem like a time taking process. But it is a process that is done at the speed of light. So this is what happens when you type google.com in your browser's search bar...I think it is a lot...Isn’t it?
Resources
https://www.cloudns.net/wiki/article/254/
https://www.techtarget.com/searchnetworking/definition/TCP-IP
https://www.forcepoint.com/cyber-edu/firewall