What happens when you type holbertonschool.com in your browser and press Enter

Jose Herrera
7 min readSep 6, 2021

In this short explanation I will be able to explain how it is possible that in a fraction of a second a connection to a server can be made with the simple fact of making an enter.

The process and technologies used to display a page will be shown.

The cliente-server model

We are going to talk about the client model in order to better understand the operation and infrastructure of the web server. This model is used in many Internet services and protocols, which is essential to understand the concept.
The client-server architecture has two clearly differentiated parts, one part the servers and the other part the client or groups of clients, where a server can be a fairly powerful computer with specific hardware and software, and on the client side it is usually a workstation that requests various services from the server, such as files, web pages, etc.

DNS requests

DNS or Domain Name System is, in simple words, the technology that translates human-adapted, text-based domain names to machine-adapted, numerical-based IP.

The DNS request first goes through the resolver. The resolver is usually our Internet Service Provider. most ISPs have servers dedicated to resolving domain names. if the resolver knows the IP, then, the resolution process ends and it will send it back to the browser.

If the resolver doesn’t know, the request will go to the root server. The root server doesn’t know the IP address of any website, instead, it knows where the TLD (Top-Level Domain) server is. In our example, “holbertonschool.com”, the top-level domain is “.com”.

If the TLD server doesn’t know the IP, it points the resolver to the Authoritative Name Servers of the domain name. These are the servers that will know the IP address of the domain name (if the website actually exists) and can send it back to the resolver then to the web browser.

If the website doesn’t exist, an error will be displayed on the screen.

After getting the IP address, it gets registered locally in the cache to avoid this long trip of DNS resolution process next time.

Protocols: TCP/IP

Currently computers and other devices are connected to the internet, intranet and other networks and most use the TCP / IP model. This model is a protocol for communication in networks that allows a computer to communicate within a network.
• TCP is the Transmission Control Protocol, which allows establishing a connection and the exchange of data between two hosts. This protocol provides a reliable transport of data
• IP or Internet Protocol, uses a series of four-octet addresses in decimal point format (34.75.217.72). which allows the data to be carried to other devices on the network
This model is a set of rules that define how servers and clients interact on the network, and how data must be transferred, divided into packets until received.

The Firewall

To protect our network from computer attacks, we use firewalls. It is a network security device that monitors incoming and outgoing network traffic, allowing data packets to be blocked according to a set of security rules. Its purpose is to establish a barrier between your internal network and incoming traffic from external sources to block malicious traffic such as viruses. In this case, when the browser requests the website at address 69.63.176.13, that request has been processed by the firewall, which will decide whether it is safe or constitutes a threat to the security of the server.
There are two categories of firewall: network firewall or host firewall:
• The network firewall is located in the interconnection devices and can be hardware or software, examining protocols, IP addresses among others, which manages access between networks
• Firewalls on the host if they are located on the end device that we want to protect (our server or computers), which allows controlling access to the equipment itself

Security and Encryption: HTTPS/SSL

Once it has found the IP address of the requested page, it requests the necessary data to display the page in the browser from the corresponding web server. This query takes place over HTTPS which stands for HeperText Secure Transfer Protocol and is a secure version of HTTP. This transfer protocol defines different types of requests and responses. It is the main way to transfer data between a browser and a website. HTTPS requests and responses are encrypted, ensuring users that their data cannot be stolen or used by others.

Websites with HTTPS usually use one of two secure protocols to encrypt communications, the SSL (Secure Sockets Layer) or TSL (Transport Layer Security) certificate. Both the TLS and SSL protocols use what is known as an asymmetric public key infrastructure system
An asymmetric system uses two keys to encrypt communications, a public key and a private key.
When we request an HTTPS connection to a website that uses the HTTPS protocol, the website first sends its SSL certificate to the browser. This certificate contains the public key of the server. That means that if we encrypt any data using that public key, only the server that has the corresponding private key can decrypt and read it. After receiving the SSL certificate, the SSL handshake occurs and a secure connection is established.

When a website uses HTTPS protocol, we can see a padlock icon in the address bar.

Load-Balancer

Whenever we want to connect to the internet, we need the websites to be accessible as quickly as possible, to have the best user experience. However, we must remember that these websites are hosted on web servers and these, in turn, have a capacity limit. A web with high demand could not really survive without a load balancer. This allows the tool that the website we administer is always available, and is capable of serving all requests at the maximum possible speed.

A load balancer ensures that web traffic is not concentrated on a single server, which eventually ends up saturating due to the miles of requests per second it receives from different clients. This saturation leads to extreme slowness of the websites or simply, that it is not available and does not return an error.

There are different load balancing balancing algorithms for different benefits;
• Round Robin: requests are distributed in the server group sequentially
• HAProxy: it is a load balancer and proxy for TCP / IP based application. It is especially suitable for websites with high traffic.

The Web Server

A web server is a program that uses HTTP to serve the files that make up web pages to users, in response to their requests, which are forwarded by HTTP clients on their computers. Servers can also be devices, dedicated computers.

All computers that host websites must have web server programs. The main web servers are Apache, Nginx among others, the web server is responsible for finding the static or dynamic content corresponding to the requested address and serving it.

The Application Server

A web server is very important to display a web page, however, sites don’t just want a static page where there is no interaction, and most websites are dynamic. That means it is possible to interact with the site, save information on it, log in with a username and password.

This is possible thanks to the use of more application servers. These are software programs that are responsible for operating applications, communicating with databases and managing user information, among other things. They work behind web servers and will be able to serve a dynamic application using the static content of the web server.

The Database

The final step in our web infrastructure is the Database Management System. Where a database is an organized collection of data. There are some types of databases, the most used type are relational databases. A relational database stores data in the form of tables. These tables may or may not be linked to each other through primary and foreign keys. A database is usually controlled by a database management system (DBMS). It is the program that will interact with the database, which is used to recover, add, delete and modify data in it.

--

--