A quick aside before we begin with our local machine. Networks exist in all shapes and sizes. We may categorize networks in any manner but I will stick a couple. First, there are Local Area Networks (LAN). LANs are typically small; a home Wi-Fi network is a LAN. Some LANs are connected to a wider network whereas others are completely closed-off from a wider network. The other type of network, the one we are most concerned with, is a Wide-Area Network (WAN). The Internet is a WAN. In reality, the Internet is an abstract term for the collection of all networks that are connected to one another. The internet wasn’t made or created insofar as the computers that compose it were. Likewise, a forest isn’t made insofar as the trees that compose it are. A forest doesn’t actually exist, it is a conceptual term for a bunch of trees.
LAN connect local devices together, WAN connects LANs together, and WANs are operating over the Internet. — Sylvain Kalache, Holberton School
So the user types “holbertonschool.com” in their browser and presses `enter`. Let us skip all the details about keystrokes (or the local processor) and begin our observation at the point where the the browser attempts to find the content associated with the address “holbertonschool.com”. “Holbertonschool.com” is a web address, or specifically, a Uniform Resource Locator (URL) instance. A URL follows a certain pattern that programs worldwide can interpret. An issue lies in that we now have to find the computer that contains the content associated with that URL. The identifier by which we use to find such a computer is the Internet Protocol (IP) address. An IP address would be hard to remember for a human whereas a URL is not. As such, we can consult the Domain Name System (DNS) in order to find the IP we seek. Once entered, the browser will consult its own cache to see if it has the IP saved for “holbertonschool.com”. If it can’t find the IP, the cache of the Operating System (OS) of the computer will be searched. If the OS does not know, the computer will contact a resolver server which is usually located at the user’s Internet Service Provider (ISP). If the resolver cannot find the IP, it will consult a “root” server which itself is able to communicate with the .COM Top-Level Domain (TLD) server. Assuming the root server cannot find the IP, the .COM TLD server is consulted. Further assuming that “holbertonschool.com” even exists, it will be found by the .COM TLD. The .COM TLD knows the location of the nameserver of the “holbertonschool.com” proprietor. The nameserver will handout the IP address to the resolver, and the resolver will return the IP to the OS.
Now that the browser knows where to find the content associated with “holbertonschool.com”, it must somehow have a method to communicate with the server at the resolved IP. Computers know how to communicate with each other over the internet using the Internet protocol suite or TCP/IP. TCP/IP is composed of four layers
From lowest to highest, the layers are the link layer, containing communication methods for data that remains within a single network segment (link); the internet layer, providing internetworking between independent networks; the transport layer handling host-to-host communication; and the application layer, which provides process-to-process data exchange for applications. — Wikipedia
TCP/IP essentially defines how data is to be turned into packets and how a computer should receive those packets. This is done through a computer’s network card or driver. Using the internet layer it defines host addressing and identification (IP address) as well as figures out where to send packets.
When the the user’s computer attempts to establish a connection with the content server, it comes across a firewall. A firewall filters incoming and outgoing traffic depending on the content. Firewalls can be software- or hardware-based. Firewalls can filter out certain websites, users, a flurry of requests for access, among other things. In our specific case, the firewall will not recognize any particular problem with the user’s request for access and permit such activity.
Once the the request gets past the firewall it will come across the load-balancer. The load-balancer may be a standalone server. The load-balancer helps to redirect out traffic to the content servers. Without a load-balancer, each request would be randomly assigned to any given server. The load-balancer may use several techniques to determine how much traffic each server receives. It can distribute them equally, one-by-one, or it may assign traffic based on the resources of each server.
Once traffic has been routed by the load-balancer, it finally reaches the server. The point-of-access ought to be a piece of software known as a web server. The web server processes incoming network request. The web server’s job is to deliver web content to the requesting client. It does this by communicating with the client through HTTP. Most commonly, the type of content delivered are HTML pages and their associated images and style sheets. But what if the execution of the website requires a background process to be ran that is more complex than a simple HTML page?
Behind the web server is an application server which runs the applications necessary to run a dynamic program. This application server may or may not make calls to a database. Depending on the application, the application server will deliver dynamic content to the web server which in turn will send that content to the client.
Without going into further detail, this is what happens when you type holbertonschooll.com into a browser and press enter.