What happens when you type google.com in your browser and press Enter
You see a google landing page right❓️❓️
Actually, their are a lot of magics happening under the hood😇. Grab your cup of ☕️ and let me drive you in🚘
I want to believe you already know that Google is hosted on a server which has an IP address.
I know you would be curious to know what IP address is right now🤨
IP address is divided into two versions which are IPv6 and IPv4. It is a 128bits digit and 32bit digit respectively.
A typical IPv4 will look like this 128.23.23.57
Can you memorize the IP address of a thousands of websites❓️
No right❓️
Just pulling your legs, I know you can't 🙃
So that's why all websites has a domain name which point directly to their IP address. E.g, google.com points to 8.8.8.8
Wait! How does google.com now transform to 8.8.8.8 on the browser❓️🤔 That is where DNS comes in🥳
DNS-Domain Naming System.
The DNS is responsible for converting the domain name into IP address, specifically the resolver.
We actually have different DNS records which you can go for anyone you like depending on your needs. The domain google.com belongs to an A record.
When your browser sees the google.com, it checks the cache for the IP address that correspond to google.com, incase you have visited the website before.
If it's not found in the browser cache it sent a message to DNS that "do you have the IP address of google.com❓️" the resolver which is one of the component of DNS is the part responsible for converting domain name into the IP address, of course google.com is registered in the DNS records so it will surely be found.
The DNS return the IP address back to the browser. In a milliseconds you see the landing page of google.com😊.
TCP/IP
For computers to communicate on the Internet, they must agree on a protocol for communication to take place effectively. I know you would be like what's the protocol❓️🙃
TCP/IP protocol is the most popular through which computers communicate on the Internet.
The IP is use to locate the server because each server has its own IP address. The TCP act as a layers(OSI) through which information passes through from the user to the server and vice versa.
FIREWALL
The firewall is a component of the web infrastructure that is responsible for preventing unauthorised traffics, especially hackers from accessing the server.
HTTPS/SSL
We have HTTP, which is an unencrypted conversation meaning the hackers can listen to conversation between the user and the server.
HTTPS is the most secured to browse because it uses SSL certificate to encrypt the conversation between the user and the server thereby preventing hackers from eavesdropping.
LOAD BALANCER
When a website becomes popular, of course there will be a lot of users accessing the site simultaneously leading to much traffic
Therefore, it is the duty of load balancer to use a particular algorithm to distribute traffic to the servers you are trying to access such as google.com. This prevent overloading a particular server, therefore, giving the servers a longer life span.
WEB SERVER
Web server is responsible for hosting a website(web pages). Anything you see when you access google.com is served by the web servers. Although the web server can't do it alone because there are some things that the web server would still need to access the application server before providing such information.
APPLICATION SERVER
When it comes to a dynamic results served by the web server the web server will contact the application server. If the application server needs anything from the database for the request to be answered it does so.
Imagine you trying requesting an information based on the database from a website. It is the application server that fetches the information from the database and processes the information before sending it back to the web server.
DATABASE
That is where all the data relating to the website is stored. Any data you submit to a website is sent to the webserver and saved in the database for future or other purposes.
Without the database the a websited that you have registered for might not rocognize you. Hence, the database is like the storage house.
CONCLUSION
In summary, typing a domain is like unlocking a digital symphony. From DNS to servers and databases, each note plays a vital role. Understanding this orchestra reveals the harmony that powers our online experiences. Explore more, and enjoy the tune of the internet.
Thank you for reading😇🤗❤️