What happens when you type "https://www.google.com" in your browser and press Enter?

What happens when you type "https://www.google.com" in your browser and press Enter?

Imagine the entire world, all the people inhabiting it, all the commercial, social and other transactions happening every day. Imagine all the various kinds of traditional communications going on daily, the birth and cradle, death and grave. Imagine the human-to-human interactions that lead to successful accomplishment of tasks and achievement of goals. The many ways that various machineries are developed or modified for increased efficiency. Imagine how these inventions are used to reduce human efforts, thereby increasing productivity and generally, the essence of living. Now you can pause on imagining and come with me on a journey.

It’s remarkable how the internet and the worldwide web can be likened to these myriads of interactions and activities. The internet is similarly filled with such amount of events responsible for getting us what we seek over the web. It’s a beehive of activity at an unimaginable pace that reaches across the globe to retrieve the information we search for.

In this article, we shall summarize some of the various activities that typically take place when a domain name, for example, https://www.google.com is typed into a web browser under the following concepts.

  • DNS Request
  • TCP/IP
  • Firewall
  • HTTPS/SSL
  • Load-balancer
  • Web server
  • Application server
  • Database

We shall briefly explain these concepts, while discussing the roles they play when we try to visit a website. Before we start, let’s single out a few terms that will come up. First, when we say “Type https://www.google.com in your browser and press Enter”, we simply mean “Visit www.google.com website”.

IP Addresses (Internet Protocol Address)

IP address is a set of 32-bit of 4-octet numbers, each octet separated by a dot notation. It is an address that uniquely identifies any network or internet enabled device. In other words, as long as your device has the capability to connect to a network or the internet, then it has an IP address. IP address is like the typical address to your home. An example of IP address would be (Google’s IP Address: 142.251.40.206). It’s the address that tells one device from another on a network and helps the system to determine where to send a packet or message to. Many other websites and devices on the internet have theirs too.

MAC Address (Media Access Control Address)

This is another unique set of numbers that identifies and tells hardware devices from one another. Unlike IP addresses, MAC is a 48-bit length address and each unit is usually separated by a colon. Similar to IP addresses, no 2 MAC addresses can be the same. An example of a MAC address will be (AC:9F:C8:BD:A4:C6). While IP addresses are assigned at the network level, MAC addresses are burned onto the hardware by the device manufacturer from factory.

Web server

Web server is a physical computer or software program that provides services to other computers on a network or on the internet. For instance, when you try to download a file or visit a website, the file or pages you’re trying to view is stored on a computer somewhere else or in a remote location. This computer then makes the file or pages available to you, so you can download and or view them. These computers are known as web servers.

1. DNS Request (Domain Name System)

Normally, when we visit a website, we should type the IP address of the website to view it. However, imagine having to remember the IP addresses for all the websites you know. We humans often feel less comfortable remembering a bunch of numbers but are more comfortable remembering regular alphabet-based names. Hence, DNS is a service on a network or internet that maps alphabet-based names to IP addresses. This way, we don’t have to remember any IP address to visit a website. Instead, we simply type in the corresponding alphabet-based or human-readable name. For example, instead of typing 142.251.40.206 to visit Google’s site, we simply type Google.com).

So, when we type Google.com in a web browser, the browser makes a request using the name we typed, to a DNS resolver asking for the corresponding IP address of Google.com. The look-up process continues until the matching IP address is found and returned to the browser. Then, the browser uses the IP address to connect to a web server hosting the Google’s website. That’s when the Google.com site is displayed for you to view and browse.

2. TCP/IP (Transmission Control Protocol/Internet Protocol)

TCP/IP is a conceptual framework of communication protocols that uses a layered approach to describe how communication traverses across the network. The layers are; Application layer, Transport layer, Internet Layer, Link layer and the Physical Layer.

Following our Google.com example respectively, our web browser which is the application (Application layer) makes the request to the web server as we hinted earlier.

At the Transport layer, TCP makes a reliable connection between our computer and the web server. This layer also segments our Google.com request into smaller units, ensuring that they are transmitted in order, correctly and reliably.

At the Internet layer, IP will be responsible for the placement of source and destination addressing scheme to ensure correct delivery and routing the segments of data across the internet from our computer to Google’s web server.

The Link layer takes care of the transmission of our request now known as data frames, over the physical network which can be Wi-Fi or Ethernet. It then adds another addressing scheme known as MAC address to identify the exact device for which the frame is destined.

The Physical layer describes the physical hardware devices that help to transmit and receive our Google website request in the form optical and electrical signals. E.g., switches, cables, etc.

3. Firewall

In an attempt to request a web page, in this case, Google.com, a network should already be in place. Just like our typical home, if left open, then all kinds of unwanted creatures, including wild animals, can come in. More so, our toddlers can crawl out the door into danger. But if we have doors and locks installed, then we can choose who goes in and out. The function of the firewall is to ensure that unwanted connections do not make it into our network or system, ensuring that only the ones we request for, make it out and in, in order for our request to successfully fetch and deliver the right information back to our system. The protection is done in many ways including using source and destination IP addresses to determine what connection of packet enters the network, based on the predefined rules set by the Network administrator.

4. HTTPS/SSL (Hypertext Transfer protocol Secure/Secure Sockets Layer)

Imagine sending a package through an untrusted person or courier service. The person can eavesdrop or open your package on the way and illegally look through the content of your package. But if you could deliver it through some secured pipeline to the destination, then bad actors won’t be able to see the package. The role of the HTTP/SSL protocol, is to ensure that the data transmission is secured through a number of means. When you type Google.com, the browser goes into negotiation with the server. The server then offers a digital certificate with some information and credentials that the client can confirm. This is to ensure an encrypted transmission of data across the network, in order to avoid a third party from accessing it. After a few back-and-forth exchanges of encrypted data to confirm the validity of both parties, both parties will then confirm each other and their readiness to begin communication. Hence, the requested page is displayed by the server on the client’s browser and this time, “https://” is prepended to www.google.com, to indicate that the browser is visiting a secure site. This is also what happens when a commercial site is involved. This ensures that critical personal data like password and payment card details are not intercepted or eavesdropped on by a third party or bad actor.

5. Load-balancer

We discuss the singular event of trying to visit a website such as Google.com. This sounds fairly simple. But imagine that millions of people around the world will also be trying to visit Google.com, especially given that Google.com is a popular resource on the internet. Typically, large companies like Google would normally have numerous web servers instead of one. The idea is that if one goes bad for one reason or the other, then others can continue to function without any interruption of service. On the other hand, if millions of requests are only sent to a single web server or a given set of servers, then the servers would have too much traffic to handle, which would slow them down or even cause them to crash. Hence, Load balancer to the rescue. Load balancer is another system that ensures that traffic destined to a server are distributed among all the available servers. This ensures that no one server or group of servers are overloaded with traffic. In the case of our Google.com example, a request might go to “Server A” and the next request might go to “Server B”, but the results are seamlessly delivered to the client without the user knowing which server exactly is serving the request, therefore ensuring that functionality is maintained.

6. Web server

Recall that we hinted earlier about Web server. In this case, the Google.com website is a page or like the file that we have requested for and it is stored on Google’s servers. Hence, when we type Google.com in the browser, the browser performs all the above-listed interactions with the server in order to retrieve the Google.com page. In other words, when both the browser and the Google’s web server confirms validity of each other and handles the necessary security components, then the server will offer the requested page to the browser and the browser will display it for the user to see and interact with.

7. Application server

The process utilized by the Application server is somewhat similar to what is applicable with the Web server. However, the major difference is that it is responsible for all the events necessary to generate dynamic content that is rendered on the browser. In our Google.com example, when our request reaches the server, it is passed over to the application server which performs all the functions related to retrieving a dynamic content. These contents might include data stored in databases, execution of the business logic to determine the appropriate data to serve to the client. Essentially, in a typical request, static content is provided by the Web server. However, Application server is responsible for generating contents that change from time to time (dynamic content), based on a given design criteria or business logic. These contents include information that is retrieved from databases or from other sources using APIs.

8. Database

Earlier, we mentioned the database while we discussed the role of the application server. The database is the central datastore where a website’s data is stored. It could be stored in tables, rows and columns or using other formats and are usually accessed using underlying logic of SQL or other kinds of queries. Considering our Google.com example, the request is initially sent to the web server and if there are information that needs to be retrieved and displayed to the user, then the Application server performs the job of retrieving the data using the SQL logic needed to retrieve the data. Essentially, the database stores all the content and data needed for seamless user manipulation and browsing experience. This is where the concept of dynamic content comes in. This is because the content the user sees is not readily displayed on the page. However, depending on the logic of the Application server, information can be manipulated, stored, updated or retrieved for the user consumption and all these information is stored in a database management system (DBMS) located in the server.

Now we can see how the various activities that take place on the internet are like those happening in our real world. There are interactions, creation and retrieval of information, contents and even denial of access, just like many events in the physical world. There are also negotiations and acknowledgements and many more. So essentially, just like we have the physical world, the internet and the worldwide web is the digital version of our world.

要查看或添加评论,请登录

Ultimate Kaycee的更多文章

社区洞察

其他会员也浏览了