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

Nmesoma Udojike
4 min readOct 9, 2022

--

We are constantly searching for several things on the internet, and if we have a good enough internet bandwidth we get our results in split seconds. Hmm nice, but ever wondered how it all happens, or is it some magic wand-waving technique, of course not, so LET’S BREAK IT DOWN!!!

Client-Server relation

Before we start the entire web infrastructure breaking down, let’s see the client-server model. The clients make the request eg your browser, and the servers respond to the request with the required data. A server is a physical machine or computer program that performs the request of clients.

DNS request

So when you type in your URL eg “google.com” and press enter, the browser first searches its cache for the IP(Internet Protocol) address of that URL. IP addresses are how computers identify themselves on the internet. They look like these 10.0.0.1, 192.168.1.0 etc. Imagine having to memorize these pheew. This is where DNS(Domain Name System) helps us, it maps IP addresses to human-readable names (domain name). eg google.com → 216.58.210.142. Yayy now we just need to remember “google.com”. If the browser doesn’t find the URL in its cache it asks the computer’s OS.

From the OS if it is still not found it asks the resolver. The resolver is mostly your ISP(Internet Service Provider). Now chances are that they don’t have the answer your OS needs, but they all know the next step which is the root server. The root server in turn locates the .COM(remember the end of our URL is .com) TLD(Top-Level Domain). Other TLDs include .org etc The .COM server requests from the authoritative which in turn provides the needed IP address for google.com. When the IP address is found the browser now connects to the correct website and displays the web pages.

TCP/IP

TCP/IP(Transmission Control Protocol/Internet Protocol) is a suite of communication protocols used to connect networks on the internet. It helps in defining how communication will be carried out across a network.

Firewall

In all of this transfer of information to and fro, we have malicious people (hackers) who are just there to find ways to infiltrate the data with unwanted/destructive data. This is why we need firewalls, this ensures that requests and responses that go into and out of the server are safe. They are software that set rules on what can pass through them into and out of the servers.

HTTPS/SSL

You most definitely don’t want to go to a website and get your data stolen, this is why websites should be secured, you see that little padlock you can see right now beside medium’s URL (if you are on the web), yes that’s a way to know a site is secure. Now being secure simply means that the data send and received from the servers would be encrypted. Tch what does encryption help us do? Heyyy they ensure that people who should not see those details being transmitted can’t. (Yes it’s possible to monitor data packets transmitted on a network it’s called sniffing). You definitely don’t want strange humans to know your bank details.

Secure sites start with HTTPS (Hypertext Transfer Protocol Secure), which is the secure form of HTTP. Another key component in securing websites is SSL(Secure Socket Layer) which is a protocol for establishing secure links between networks.

Load-balancer

Imagine a very big company that clearly has a mind-blowing amount of people constantly trying to reach their sites, they definitely can’t have only one server serving those pages. Load-balancer as the name implies helps in balancing (sharing to different servers) the load(requests). Load balancers have different algorithms they can follow eg round robin (keep assigning requests to servers one after the other till the last one, then start from the first again) etc

Web server

Simply put web servers serve static content, the pretty pages you can see and all that… They receive HTTP requests and give out HTTP responses. We have several web servers eg Apache, Nginx

Application server

Some websites don’t just display pretty pages, they also allow for interaction on their pages this is what dynamic servers help do. The application serves dynamic content, saves information into it and so on.

Database

All these retrieving of data is done from the database. A database is basically an organized collection of data. Databases allow for retrieval, addition, updating, deletion etc. We have two main models of databases relational databases and non-relational databases.

--

--

No responses yet