How the internet works

Odebode OpeyemiOdebode Opeyemi
4 min read

What happens when you type google. com in your browser and press Enter

Have you ever been curious about what happen behind the scene when you navigate to your browser and type google.com or facebook.com?

You might be saying, common! I know how the internet works but trust me you will learn something new in this post.

In this post, I will be talking about what happens when you type a URL into your browser and press enter. End to end, the process involves the browser, your computer’s operating system, your internet service provider, the server where the site was hosted, and services running on that server.

Before I proceed, we'll take a look about some important terminologies

Server: A server is a computer that provides functionality for other programs or devices, called "clients". In theory, whenever computers share resources with client machines they are considered servers. Dedicated servers should have high-performance RAM, a faster processor and several high-capacity hard drives and connected to redundant power supplies etc.

Client: is a piece of computer hardware or software that accesses a service made available by a server as part of the client–server model of computer networks

IP Address: An IP address is a unique address that identifies a device on the internet or a local network. IP stands for Internet Protocol, which is the set of rules governing the format of data sent via the internet or local network i.e set of rules for transmitting data between two devices.

PROCESS-1

You type https://google.com in your browser and press Enter

https (Protocol)

https:// is the scheme or protocol. HTTPS stands for Hypertext Transfer Protocol Secure. This scheme identifies the protocol to be used to access the resource on the Internet. It can be HTTP (without SSL) or HTTPS (with SSL)

google. com

This is the domain name corresponding to the IP address of the server.

We need to connect to google server with google IP address. The browser search for google.com IP address in its cache because if we once make a connection to that server the IP address will be saved in browser cache, If not found it proceeded to check the operating system cache, if not found, then the browser make a connection to the internet through Internet Service Provider (ISP), ISP is company that provides Internet connections and services to individuals and organizations. such companies are AT&T and Verizon in US, Spectranet and MTN in Nigeria.

Screen-Shot-2022-04-12-at-1.37.52-PM-1024x505.webp

After making connection to the internet, Internet Service Provider (ISP) makes a request to Domain Name Server (DNS)

PROCESS-2

DNS LOOKUP

Domain Name Server (DNS) is the phonebook of the Internet. which translates domain names like google.com, facebook.com and bestsuraj.tech to IP addresses. You can read more about how DNS works here.

The DNS return IP address of google.com back to the browser. let's assume the IP address is216.239.32.0

web01.png

PROCESS-3

TCP/IP: Transmission Control Protocol/Internet Protocol is a set of rules (protocols) governing communications among all computers. TCP/IP model is the default method of data communication on the Internet.

I’ve already talked about Internet Protocol, but to reinforce — IP addresses are unique to machines.

TCP and IP are separate protocols that work together to ensure data is delivered to its intended destination within a network. IP obtains and defines the address—the IP address—of the application or device the data must be sent to. TCP is then responsible for transporting and routing data through the network architecture and ensuring it gets delivered to the destination application or device that IP has defined.

In our case, The browser will communicate with the server hosting google.com over TCP/IP which is https, and pass the request to Load-balancer to give the available server to process the request.

TCP-IP.png

PROCESS-4

Load-balancer Load-balancer is the process of distributing traffic among multiple servers to improve a service or application's performance.

Load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance. If a single server goes down, the load balancer redirects traffic to the remaining online servers. When a new server is added to the server group, the load balancer automatically starts to send requests to it.

what-is-load-balancing-diagram-NGINX-1024x518.png

PROCESS-4

Firewall

A firewall is a network security device that monitors traffic to or from your network. It allows or blocks traffic based on a defined set of security rules.

A Firewall sit in front of the load-balancer to block any malicious request or request that violates the set of security rules.

If the firewall allow the requests, then the load-balancer will pass the request to the available host server.

what-do-you-mean-by-a-firewall-organisation-firewall-example-a735e743a6141329.png

PROCESS-5

Server

In the client/server programming model, a server program awaits and fulfills requests from client programs, which might be running in the same, or other computers. A given application in a computer might function as a client with requests for services from other programs and as a server of requests from other programs.

The server return the results of goog.com to the clients (Browser)

0
Subscribe to my newsletter

Read articles from Odebode Opeyemi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Odebode Opeyemi
Odebode Opeyemi

Software Engineer I Technical Writer