What happens when you look up "Google"

Basic terminologies:

  • Server: a computer which performs specialized functions such as hosting websites, storing and managing files, and processing data. Servers are mainly used to provide users with access to resources or services. There are many types of servers such as mail servers, web servers, application servers, etc.

  • IP (Internet Protocol) address: a special group of numbers separated by periods (.) that is used to uniquely identify a computer on a network. They're like a numerical name that each computer has when it is connected to a network. Examples include 8.8.8.8, 192.168.0.10, 127.0.0.1, etc.

  • DNS: DNS stands for Domain Name System. To share resources, each computer must first be able to communicate with one another through their IP addresses. However, since their IP addresses are tricky for human beings to memorize, they are given domain names such as "google.com", "localhost", etc. The DNS is like a dictionary or phone book that stores these domain numbers along with their respective IP addresses.

  • DNS request: a query that is made to the DNS server when the user wants to access a website. Once the server receives the query, it maps the domain name to its IP address and either forwards the request to that server or returns an error message depending on the existence of the requested resource.

  • TCP: stands for Transmission Control Protocol. It is used to establish and maintain a reliable connection between two computers. This protocol breaks down data into small objects called segments, numbers and orders them, and sends them to the receiving computer which sends an acknowledgement signal after receiving every segment. If some segments are missing, they are re-sent until all the segments have been delivered and can be organized to form the original data.

  • Firewall: a piece of hardware or software that controls access to a computer or network system. A firewall can be used to block unauthorized access to a network or computer while allowing traffic from authorized computers or websites.

  • HTTPS: stands for Hyper Text Transfer Protocol Secure. It is the safer, more secure successor of Hyper Text Transfer Protocol (HTTP). It works by adding an extra layer of security to the data that is transmitted over a network.

  • SSL: stands for Secure Sockets Layer. A socket is a special combination of IP address and port number which acts as an endpoint or sending or receiving data across a computer network. SSL is a protocol that ensures that computers can be connected securely. It does this by using a system of digital certificates, and encryption to authenticate the server and encrypt the data exchanged. This protocol is now deprecated and replaced by the more secure Transport Layer Security (TLS).

  • Load balancer: a hardware device or software that distributes network or application traffic across multiple servers. The main purpose of a load balancer is to increase the availability and scalability of a service by distributing the workload among multiple servers and minimizing the risk of overloading a single server.

  • Web server: a computer that responds to requests from users over the Internet or a network, and returns either the requested web page or an error page (e.g., 404, 503, etc.). Web servers handle HTTP and HTTPS requests, which are the standard protocols for transmitting data over the web.

  • Application server: a computer specifically designed to host and run software applications.

  • Database: a collection of information that is organized in a way that makes it easy to find, access, and update the data. A database is like a digital filing cabinet where related data is stored in tables which consist of rows and columns. For example, a company might have a database that contains one table containing employee information, another table containing stock inventory, another table for orders, and so on.

What happens when you type "Google" in your browser's address bar and press ENTER?

  1. Your browser first checks its cache to see if it contains the IP address of the requested web page. If not, it sends a request to the DNS server so that it can map the domain name "google.com" to its IP address.

  2. Once the IP address has been retrieved, your browser establishes a connection with the server to which the IP address belongs using TCP.

  3. Next, your browser sends an HTTP request to the server, asking it to retrieve the Google home page.

  4. Once the server has received the request, it processes it and then carries out the appropriate actions, e.g., retrieving data from a database, fetching a web page, etc. In the event of a server that receives an incredibly high volume of traffic and requests, it is recommended to use a load balancer and more than one web server so as to not crash the main server.

  5. Once the requested resources have been acquired, the server then sends an HTTP response which contains the requested web page and information about the status of the request, such as whether it was successful.

  6. The browser renders the web page so that the user can access it and find out what happens when you type "Google" and press ENTER.

Bonus!

You don't need to go through the entire process every time you want to access the Google website or any other website. Once the whole process is done, the website's IP address gets cached (stored temporarily) on your computer so that the next time you want to visit that web page, you don't need to go through the DNS resolution stage.