What Happens When You Type holbertonschool.com in Your Browser and Press Enter

Jose Alonso Restrepo
The Startup
Published in
8 min readAug 23, 2020
Photo by Benjamin Dada on Unsplash

Hello dear lector, if you are reading this is because everything is working. What I mean by “is working”? Well, you will understand it at the end of this post. Nowadays, if you are one of those people that haven’t studied anything related to Information Technology, this would be like magic or maybe just something that works without knowing what’s going on. A great example is when you write in your web browser an URL, and in a few minutes, you get the page you are requesting. So, where this information comes from, there is someone in another computer sending back responses to this request? Too many questions, right? But don’t worry, we are here to learn.

In this opportunity, our focus will be on what happens when you type holbertonschool.com in your browser and press enter. I invite you to get comfortable and ready to learn what’s going on under the hood when you request an URL.

Beginning of magic

Photo by Reeney Jenkins on Unsplash

The communication in society and even in nature has an important role. As an example, both humans and animals use it to transmit information to their equals. The same happens in the IT world. The real power that computers have is communication between them. For this reason, since you get in touch with a computer, you probably have sent information to many others. And currently, this information transmission is done via Bluetooth, wireless connections, or optic fiber (most used).

As well as humans and animals use different languages and rules to communicate, the computer also does. In the world of computers, they use something called TCP/IP (stands for Transmission Control Protocol / Internet Protocol). In simple terms, this protocol suite is a set of standardized rules that computers use to communicate over a network (private network or Internet). That means that every computer is a node in a huge network like the Internet or a private network.

The role of TCP / IP

In detail, this suite of rules based on these two protocols have the following roles:

IP → Intenet Protocol is the system in charge of obtaining addresses where data must be sent.

TCP → Transmission Control Protocol, on the other hand, is in charge of handling error checking and packet ordering.

Photo by Author, a network of computers.

So, imagine you want to transfer information from computer A to computer B. This protocol suite is in charge of determining the origin from which data must be sent and the destiny that is going to receive this information (IP’s). Furthermore, once destiny and origin are known, the data is sent as packages of data over the network, having under control that information is not going to be lost or broken.

Before describing what happens when you type an URL in your web browser and press enter, let’s know more about another relevant protocol. While TCP/IP allows computers to exchange information there must be another protocol that specifies the rules for transmission of webpages over the network, and it is called HTTP (stands for HyperText Transfer Protocol).

This protocol relies on a request-response approach in which the client is your web browser and the server is another computer that is hosting the web page you are requesting. However, this protocol is not pretty secure to send information over the network. This due to the lack of encryption of the packages of data sent. So, any information that is transmitted from one computer to another can be intercepted and easy to understand. For this reason, exists the secure version of HTTP is called HTTPS (stands for HyperText Transfer Protocol Secure).

How HTTPS works?

HTTPS protocol works in the same way as HTTP, but its difference is that the data transfer is encrypted to increase security. This helps users to sent sensitive data, such as passwords, credit card information, or private business information.

Photo by James Sutton on Unsplash

To make encryption possible SSL technology is used to establish authenticated and encrypted links between networked computers. For this, SSL uses something called certificates, which are digital documents in which the identities of network entities are bind to cryptographic key pairs (private and public key). In this way, a computer that is communicating with another through HTTPS uses an SSL certificate can encrypt the outgoing and decrypt the incoming information.

Sending the request

Photo by Shannon S on Unsplash

Here we are, you already know how computers communicate securely over a network such as the Internet. Now, lets see what happens next when you type https://holbertonschool.com and press enter.

For any communication process, there must be a transmitter and a receptor of information. In this situation, the transmitter is going to be your computer using the web browser and the receptor must be the computer (also known as a server ) that is hosting the content of the Holberton school webpage. Once you press enter in your web browser the communication process begins. The first step is knowing where the browser must send the request. Wait we have the name of the web page already is not enough? Well, this name is important but while you specify the address when you send something by mail the same happens in the world of computers. To know this, let me introduce to you our web directory called DNS (stands for Domain Name System).

How DNS works and its usage

As we say above, the first step is knowing where information must go, in other words, what is the address of the computer that hosts the web page you are requesting. So, the principal role of DNS is converting a hostname (such as www.twitter.com) into a computer-friendly IP address (such as 132.138.1.3). In this way, when you request a webpage, a translation is done between what you type into your web browser (www.twitter.com) and the machine-friendly address (IP) necessary to locate the resource you want. However, there is more going on under the hoods in this translation process. To know more about it check this link.

Once this step finish and your browser get already the IP of the server where your website is, then it sends the request.

Until here lets make something clear. If you think on a small scale may be the request sent by your browser is directly received by the server that hosts your webpage. However, webpages such as www.facebook.com, www.twitter.com, or www.holbertonschool.com can’t afford to have weak web infrastructure designs. Furthermore, sites like these manage a lot of requests per day or even per second. That means that is a kind of infrastructure like that there would be a SPOF (single point of failure) that would affect the response of the requests received. For these reasons, the request sent by your web browser is attended first by something called Load Balancer.

What is a Load Balancer?

Considering the number of request for a specific webpage, Load Balancers, are thought as a tool that helps to make your content always available. Their role consists of taking all the incoming requests and redirect them to the servers in which the website you are requesting, is located. To do this, they use a predetermined algorithm that establishes the logic of load deployment. In this way, the load could be distributed depending on factors like server capacity, type of request, server status (enable or disable), or many other variables. Furthermore, its principal objective is to give always the fastest response and the most efficient and effective use of the available resources.

By Nginx.com, load balancing diagram

Additionally, as a load balancer is used in high scale web infrastructures to attend an enormous quantity of requests, also another tool is used to control the incoming and outgoing traffic to the infrastructure where webpage content is stored. This tool is called a firewall. And as the name says, it’s a wall that allows or denies access from requests to different ports. In this way, this security software analyzes each request to determine if it comes from a not secure IP address or if it’s asking for access permissions to illegal ports.

Accepted Request

By Author, request accepted

After the success of this authentication process did by the firewall, the load balancer establishes which server is going to respond to the request. Then, the request is redirected to the selected server where it reaches the Web server.

What is a web server?

Web server is a piece of software that is in charge of attending requests and giving a response to a specific request. It serves static content such as HTML pages, images, videos, text files, etc.

When the request of www.holbertonschool.com arrives at the webserver it starts looking around directories in the computer to find the content needed and when it’s found, it returns a response with the content of this file. This response is finally interpreted by your web browser which renders the information of the webpage and shows it finally on your screen.

Great! You already have the content of holbertonschool.com on your screen, but wait a moment is just static content is not it? All buttons, forms, and interactions with the webpage are not available yet. And here is where the Application server takes place.

Application server

This server is a piece of software that is in charge of the business logic. In simple terms, what this server does is serve dynamic content. This means that this tool helps our servers to respond to requests with functional webpages that allow interactions such as sending forms, pressing buttons, and so on. Furthermore, it communicates with databases and manages user information.

So, you make the request and the dynamic content of the webpage is returned by the webserver, working together with the application server. But where the application server gets the information about any update to the webpage data or validates user information such as passwords or usernames? Well, all that information is stored inside a Database.

Database

A database is an organized collection of data. Is the place in which all business data is stored as tables and records (rows). They could be a relational or non-relational database. Their importance of this tool is the facility to access, modify, update, manage, and organize the information of a business.

It is used when you request a webpage and, the application server needs to access some information relevant to give a response.

Now in a high-level approach, we could say that the request of the holbertonschool.com webpage is interpreted by the load balancer. Then, distributed to a server in which the response reaches the web-server, that working together with the application server and the database sends back a response with the content of holbertonschool.com, as awesome as magic.

By Author, Web Infrastructure example

Finally, after going through the main tools that work under the hoods when you request https://holbertonschool.com we know now what means that everything is working when you receive as a response this post after request it. Thanks for your time.

Resources

--

--