What happens when you type holbertonschool.com in your browser and press Enter ?
“What happens when you type in a URL” is a deceptive question commonly asked in tech interviews.
If you look online, there are many resources but few concise explanations of how a web browser, a server, and the general internet work together.
This is how I would explain it:
- DNS request
- Web server
- Application server
DNS request :
What is DNS?
The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.
Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).
How does DNS work?
The process of DNS resolution involves converting a hostname (such as www.example.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 — like a street address is used to find a particular home. When a user wants to load a webpage, a translation must occur between what a user types into their web browser (example.com) and the machine-friendly address necessary to locate the example.com webpage.
We mentioned how domain names actually represent IP addresses, but IP is not the only type of protocol use by the Internet. The Internet Protocol Suite is often referred to as TCP/IP (TCP stand for Transmission Control Protocol), and it also contains other types of protocols. It’s a set of rules that define how servers and clients interact over the network, and how data should be transferred, broken into packets, received, etc.
A firewall is an added layer of security to an application. You can think of a firewall as a big gate around your house with multiple doors that can identify who is trying to come in and permit or deny them entry. These doors are referred to as ports and these ports have rules and numbers assigned to them specifying who is allowed into your application. This prevents any person with malicious intent from entering an application.
Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP). It is used for secure communication over a computer network, and is widely used on the Internet. In HTTPS, the communication protocol is encrypted using Transport Layer Security (TLS) or, formerly, its predecessor, Secure Sockets Layer (SSL). The protocol is therefore also often referred to as HTTP over TLS,or HTTP over SSL.
What is load balancing? A load balancer is a piece of hardware (or virtual hardware) that acts like a reverse proxy to distribute network and/or application traffic across different servers. A load balancer is used to improve the concurrent user capacity and overall reliability of applications. A load balancer helps to improve these by distributing the workload across multiple servers, decreasing the overall burden placed on each server.
Physical load balancing appliances are similar in appearance to routers. They are connected to your network infrastructure in the same manner as a router or another server. In contrast, virtual load balancing hardware is a program that emulates the addition of a new hardware solution. These virtual load balancers work in a manner similar to a virtual server or a virtual computer on your network. They act as a physical load balancer and distribute requests accordingly, saving you space and offering greater flexibility than many hardware balancers.
The Web server :
An application server is a server specifically designed to run applications. The “server” includes both the hardware and software that provide an environment for programs to run.
Application servers are used for many purposes. Several examples are listed below:
- running web applications
- hosting a hyper-visors that manages virtual machines
- distributing and monitoring software updates
- processing Data sent from another server
also called electronic database, any collection of data, or information, that is specially organized for rapid search and retrieval by a computer. Databases are structured to facilitate the storage, retrieval, modification, and deletion of data in conjunction with various data-processing operations. A database management system (DBMS) extracts information from the database in response to queries.