What happens when you type holbertonschool.com in your browser and press Enter(web application Architecture)

Ahmed Belhaj
7 min readApr 25, 2021

--

https://imgur.com/gallery/5l6CBQf

have you ever asked yourself before what happen when you type url()and press enter in this article we will talk about what happen when you do that the process and every step that follow until the content load in your browser and we will take holberton school website as an example for that .

concepts to look into in this article :

  • DNS
  • TCP/IP:
  • Internet Protocol (IP):
  • Load Balancer
  • HTTP/HTTPS
  • HTTPS and SSL
  • FIREWALL
  • Web Server
  • Server

DNS:

It’s a technology that helps us as a “translator” of IP addresses, it tells us what is the IP address behind a domain name.

how it works:

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 examples, “foobar.com” and “holberton.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.

Now the browser knows the IP address and ready to send a HTTP request to the server.

TCP/IP:

The acronym TCP / IP is the identification of the group of network protocols that make the transfer of data on the network possible, which are:

TCP:

This protocol is responsible for creating “connections” between them so that a data flow is created. This process guarantees that the data is delivered to its destination without errors and in the same order in which it was left. It is also used to distinguish different applications on the same device.

IP:

This protocol is responsible for sending and receiving data in blocks. The shipment is always done by the best route but without guaranteeing that it reaches the destination.

How TCP works

When a client sends a request to a server, the data is broken into packets. A packet is a small parcel of information that gets transmitted over the network. In the same way, The web server responds by sending back other packets.

Using TCP, all packets that are sent, are tracked so no data is lost or corrupted in transit. This means TCP is reliable.

Difference between TCP and UDP

Just like TCP, UDP (User Datagram Protocol) is another widely used protocol for sending packets over the Internet. But UDP is not reliable because packets that are sent over the network, are not checked and they may get lost or corrupted. On the other hand, UDP is faster and lighter than TCP.

Load Balancer:

They are classified into three types:

Hardware type: It consists of a dedicated server with a specific operating system, and software to do the load balancing process. This server integrates web servers using Plug and Play solutions, which means that as soon as they connect, they work with little or no pre-setting.

Switch type: A load balancer of this type requires a Layer 2 or Layer 3 switch to integrate the balancing process. No intermediary device is required between the switch and the web server.

Software-based: in this case it is not necessary to modify any network connectivity characteristics. You can install the software for the purpose on the web servers themselves. However, you can opt for a dedicated server to fulfill the role of load balancer.

HTTP:

HTTP stands for HyperText Transfer Protocol. It is a protocol that defines how messages are formatted and transmitted, and what actions web servers and browsers should take in response to various commands/ HTTP verbs.

For example, when the browser sends a HTTP request, the HTTP verb/method is GET by default, that means, the browser tries to get data from a specified ressource in the server.

There are other HTTP verbs or methods, like POST, PUT, HEAD, DELETE. The method POST, for example, is used to send data to a server to create/update a resource.

HTTPS and SSL:

SSL provides a secure channel between two computers or devices that work over the Internet or an internal network.

A common example is the use of SSL to protect communications between a web browser and a web server. This protocol changes the website address from HTTP to HTTPS, where “S” stands for “security”.

Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP. The ‘S’ at the end of HTTPS stands for ‘Secure’. It means all communications between the web browser and the wesbite are encrypted. HTTPS is often used to protect highly confidential online transactions like online banking and online shopping order forms.

With regular HTTP connections, all communications are in ‘plain text’ and can be read by any hacker that manages to break into the connection between the browser and the website. This presents a clear danger if the communication includes sensitive information like credit card details or social security number. With a HTTPS connection, all communications are securely encrypted. This means that even if somebody managed to break into the connection, they would not be able decrypt any of the data which passes between you and the website.

Firewall

A firewall is a network security system designed to prevent unauthorized access to or from a private network. Firewalls can be hardware or software.

There is two categories of firewalls: network firewalls or host-based firewalls:

Network firewalls are frequently used to prevent unauthorized Internet users from accessing private networks connected to the Internet, especially intranets. That means, All messages entering or leaving the intranet pass through the firewall, which examines each message and blocks those that do not meet the specified security criterias. Host-based firewalls run on host computers and control network traffic in and out of those machines.

Web server:

The web servers are responsible for displaying the pages to users. Without them, the Internet as we know it today simply would not be possible. This process is actually more complex than it seems, in fact all the “magic” of a webserver occurs outside of the person who is browsing a website. There are many web servers, and among the best known we can find for example Apache, Nginx, LiteSpeed or IIS.

Keep in mind that web server and server are not the same, they are related, but they work in different ways.

Application server:

An application server is a mixed framework of software that allows both the creation of web applications and a server environment to run them.

It can often be a complex stack of different computational elements running specific tasks that need to work as one to power multiple clouds and web-based software and application.

Sitting between the primary web-based server tier and the back-end tier of a database server, the application server is essentially a go-between for the database server and the users of the business or consumer apps it supports through putting various protocols and application programming interfaces (APIs) to use.

An application server is designed to install, operate and host applications and associated services for end users, IT services and organizations and facilitates the hosting and delivery of high-end consumer or business applications.

Depending on what is installed, an application server can be classified in a number of ways, such as a web server, database application server, general purpose application server or enterprise application server.

It’s commonly paired with a web server or contains a web server, which means the two can be converged and named a web application server. It is also versatile enough to be used with other application servers simultaneously.

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 database.

Data within the most common types of databases in operation today is typically modeled in rows and columns in a series of tables to make processing and data querying efficient. The data can then be easily accessed, managed, modified, updated, controlled, and organized. Most databases use structured query language (SQL) for writing and querying data.

Conclusion

First, your browser looks for the IP address using the domain name of the website “holbertonschool.com”. Once it is found, the browser sends a HTTPS request to the servers that are hosting the data. the request gets processed first by the firewall. if it passes the firewall, a secure HTTPS connection is established between the two machines.

The request is received by the load-balancer which forwards it to one of the servers depending on the configured load-balancing algorithm. The chosen web server receives the request, looks for the wanted files and sends them back in a HTTPS response to the browser.

Finally, the browser receives the packets of data and makes them readable for you.

resourses:

--

--

Ahmed Belhaj
Ahmed Belhaj

Written by Ahmed Belhaj

Dedicated DevOps Engineer with expertise in system administration, core development, and a full-stack software development.

No responses yet