what happens when you type URL and press ENTER

Skander Amireche
6 min readAug 23, 2020

what happens when you type https://www.holbertonschool.com in your browser and press Enter

DNS record, How does DNS work?

The process of DNS resolution involves converting a hostname (such as https://www.holbertonschool.com) into a computer-friendly IP address (such as 192.168.1.1). An IP address is given to each device on the Internet, and that address is necessary to find the appropriate Internet device.
DNS is human-friendly navigation. You can easily access a website by typing the correct IP address for it on your browser, but imagine having to remember different sets of numbers for all the sites we regularly access? Therefore, it is easier to remember the name of the website using a URL and let DNS do the work for us by mapping it to the correct IP.

First, it checks the browser cache then, the browser checks the OS cache. If it is not in the browser cache, the browser will make a system call after that it checks the router cache and finally the ISP cache. If all steps fail, the browser will move on to the ISP. Your ISP maintains its’ own DNS server, which includes a cache of DNS records

If the requested URL is not in the cache, ISP’s (Internet service provider) DNS server initiates a DNS query to find the IP address of the server that hosts https://www.holbertonschool.com

recursive search since the search will repeatedly continue from a DNS server to a DNS server until it either finds the IP address we need or returns an error response saying it was unable to find it (explaining by the domain architecture..).

TCP/IP

Your internet connection: Allows you to send and receive data on the web (https://www.holbertonschool.com). It’s basically like the street between your house and the shop.

  • TCP/IP: Transmission Control Protocol and Internet Protocol are communication protocols that define how data should travel across the internet. This is like the transport mechanisms that let you place an order, go to the shop, and buy your goods. In our example, this is like a car or a bike (or however else you might get around).
  • The Internet Protocol itself is a relatively rudimentary protocol which provides only the capability of delivering small chunks of data to other computers. The Internet Protocol does not provide reliability: chunks of data that are sent using the Internet Protocol may be lost. They also may arrive in an order different to the order in which the chunks were sent.
  • For some types of data transfer, the (un)reliability afforded by the Internet Protocol is fine. When streaming video, for example, it does not matter if chunks that make up intermediate frames of the video are lost. What matters is that most of the data arrive relatively quickly, allowing the video to be played with reasonable quality and on the fly. The User Datagram Protocol, or UDP, is a simple protocol layered on top of the Internet Protocol that provides this level of reliability. UDP is used for purposes such as relaying video and audio streams as well as for networked games; all environments where responsiveness and fast delivery are more important than perfect reliability.

understanding Firewalls

A firewall is a structure intended to keep a fire from spreading. Building has firewalls made of brick walls completely dividing sections of the building. In a car, a firewall is the metal wall separating the engine and passenger compartments.

Internet firewalls are intended to keep the flames of Internet hell out of your private LAN. Or, to keep the members of your LAN pure and chaste by denying them access the all the evil Internet temptations. ;-)

The first computer firewall was a non-routing Unix host with connections to two different networks. One network card connected to the Internet and the other to the private LAN. To reach the Internet from the private network, you had to logon to the firewall (Unix) server. You then used the resources of the system to access the Internet. For example.

  1. the URL(https://www.holbertonschool.com) process sort of dual-homed system (a system with two network connections) is great if you can TRUST ALL of your users. You can simply setup a Linux system and give an accounts on it to everyone needing Internet access. With this setup, the only computer on your private network that knows anything about the outside world is the firewall. No one can download to their personal workstations. They must first download a file to the firewall and then download the file from the firewall to their workstation.

Firewall Politics

You shouldn’t believe a firewall machine is all you need. Set policies first.

Firewalls are used for two purposes.

  1. to keep people (worms/crackers) out.
  2. to keep people (employees/children) in.

Types of Firewalls

There are two types of firewalls.

  1. Filtering Firewalls — that block selected network packets.
  2. Proxy Servers (sometimes called firewalls) — that make network connections for you when you time a URL (https://www.holbertonschool.com).

Load-balancer

in the Holberton link process the HTTP request jumps from node to node until it gets to the IP address of google.com’s load balancer. It wouldn’t last long, Google would respond that you need to be using HTTPS — assuming with a 301 permanent redirect. So it would go all the way back to your browser, the browser would change the scheme to HTTPS, use the default 443 port and resend. This time the TLS handshake would take place between the load balancer and the browser client. Not 100% on how that works but I know the request would tell Google what protocols it supports (TLS 1.0, 1.1, 1.2) and Google would respond with “Let’s use 1.2”. Then the request gets sent with TLS encryption.

I think the next thing Google would do is put it through web application firewall rules on its load balancer to see if it’s a malicious request. When it passes, the secure connection has probably been terminated (because PCI-DSS regulations say you don’t need to encrypt internal traffic) and the request would get assigned to a pool in their CDN, and the google-side cached homepage will be returned in an HTTP response. Probably pre-gzipped.

Web server

A web server is a computer that runs websites. It’s a computer program that distributes web pages as they are requisitioned. The basic objective of the webserver is to store, process, and deliver web pages to the users. This intercommunication is done using Hypertext Transfer Protocol (HTTP). These web pages are mostly static content that includes HTML documents, images, style sheets, tests, etc. Apart from HTTP, a web server also supports SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer Protocol) protocol for emailing and for file transfer and storage.

The main job of a web server is to display the website content. If a web server is not exposed to the public and is used internally, then it is called the Intranet Server. When anyone requests for a website by adding the URL or web address on a web browser’s (like Chrome or Firefox) address bar (like (https://www.holbertonschool.com) the browser sends a request to the Internet for viewing the corresponding web page for that address. A Domain Name Server (DNS) converts this URL to an IP Address (For example 192.168.216.345), which in turn points to a Web Server.

Why Use an Application Server?

A web server is designed — and often optimized — to serve webpages. Therefore, it may not have the resources to run demanding web applications. An application server provides the processing power and memory to run these applications in real-time. It also provides the environment to run specific applications. For example, a cloud service may need to process data on a Windows machine. A Linux-based server may provide the web interface for the cloud service, but it cannot run Windows applications. Therefore, it may send input data to a Os-based application server. The application server can process the data, then return the result to the web server, which can output the result in a web browser.

Database

One of the most common types of dynamic web pages is the database driven type. This means that you have a web page that grabs information from a database (the web page is connected to the database by programming,) and inserts that information into the web page each time it is loaded.

If the information stored in the database changes, the web page connected to the database will also change accordingly (and automatically,) without human intervention.

This is commonly seen on online banking sites where you can log in (by entering your user name and password) and check out your bank account balance. Your bank account information is stored in a database and has been connected to the web page with programming thus enabling you to see your banking information.

--

--