You may or have not been asked this question before and you may or may not have had the answer for it. It is important to understand what is going on in the background when you type the URL (Domain name) of a website into the search bar and press enter. To thoroughly explain this step by step, I will use the following image:
Well the first step is to type in the URL of the website in the browser. However, the URL that we as humans can understand as readable words is like a foreign language to the browser. So, this must be converted into a more readable website address for the computer or machine in charge of finding the website.
This is where the DNS (Domain Name System) comes in. The DNS is a database system that holds a record of all URLs and their corresponding IP address. In case you didn’t know, an IP address is a set of numbers separated by dots “.” that map the location of a computer or server hosting the website content and database for that website. Therefore, the DNS plays a very important role in the serving of websites and overall internet service. If the DNS server is able to locate the IP address of the website, it will return it in order for the web server to know exactly where to look. However, if the DNS server is not able to locate the the corresponding IP address for the URL or the URL is simply not valid, it will return an error: “404 not found”.
Once the browser has obtained the correct IP address, it will establish a connection between the client computer and the web server hosting the site using a transfer protocol. There are a few transfer protocols but we will use TCP/IP (Transmission control protocol/Internet Protocol) for this purpose. Once the connection is established, the browser will send an HTTP request to the web server in the form of headers. A header can be thought of as instructions to the server to specify what exactly it wants from it. Sometimes a header can contain this line “connection: Keep-Alive”, which basically tells the server to keep the connection open.
However there are a few factors that must be taken into account. The Web server usually has a firewall that prevents certain information from flowing in and out of the web servers. A firewall is a software or hardware that controls what enters or leaves a server. These are used to block ports and prevent malicious attacks on a computer or system. Therefore if the returned IP address (eg: 220.127.116.11) is detected by the firewall as a malicious website, it will close the connection and block the website.
Also, If the web server is SSL (Secured Socket Layer) certified, it will encrypt all of the information flowing in order to prevent or make it harder for hackers or attackers to access client information. In order to know if a website is SSL certified, you can see if the URL has an “https” which stands for Hypertext Transfer Protocol Secured. This is most important for websites that handle a lot of credit card information or very fragile client credentials.
Once, the firewall and SSL have done their job and permitted a safe transfer of information, the Load-balancer server will take the role of redirecting the request to one of the backend servers. “Why is there a load-balancer?”, you may ask. Well the reason for this is that sometimes there are to many requests from different clients to the website. So the load-balancer distributes the requests evenly to the server is order to regulate the connection and prevent slow connection. The load-balancer can be considered a single point of failure because once that fails, the request will not get to the web servers, hence not providing any service.
If the load-balancer was successful at its job, the request will get to the web server where the HTML content of the page can be found. The purpose of the web server is simply to deliver the web content requested by the browser. However, a number of things happen in the web server in order to deliver the content.
Use of the Application server
Usually a web server will contain an application server which overall supports the web server and connect to the database and other components of the web server. It simply makes the job of the web server easier and allows for a more dynamic use of websites through user interaction.
Lastly, once the request has been interpreted by the web server, the application server will help to extract the necessary data from the database that must be delivered. A database is a collection of data stored in a server that holds useful information of a the website and its users. A very popular database used world wide is MySQL database and it supports adding, removing and modifying data.
If the request was received and the data was retrieved properly, the server will send back an HTTP response with the requested website: “https://www.holbertonschool.com” and displayed on the client’s screen.
What is a Network Protocol? - Definition from WhatIs.com
This definition explains network protocol, a set of rules establishing how network devices should format, transmit and…
What is a Web Server and How Does it Work?
Explore our definition of a web server and understand what it is and what it does. Also find a list of some of the most…
How does Software and Hardware Load Balancer Work? (Loadbalancer Algorithms Explained with…
When you have an enterprise application or website that gets lot of hits, your server might be under heavy load. In…
Single point of failure
A single point of failure ( SPOF) is a part of a system that, if it fails, will stop the entire system from working…