What happens when you type google.com in your browser and press Enter
Almost everyone who have ever used the internet and a browser, at least once in the history of their online searches, typed "https://www.google.com " into a browser. Were you ever curious about what happens immediately after clicking the search key? Don't worry, I will break everything down as much as possible for you.
Just to confirm we are on the same page, A browser is basically an app that you use to access the web. examples include: Chrome, Firefox, Safari, Edge, etc.
When you type a URL like "https://www.google.com" into a web browser and hit your enter key, there are a lot of things that go on before you finally get some output on your browser.
https://www.gooogle.com, This is a URL (uniform resource locator) that contains the location of the internet resources you want to access. The URL is an address that points to the place (web page) you want to visit.
General overview of everything that goes on within those few microseconds.
Locating The Internet Resource(Destination Site) - DNS Query
Your computer sends a request to the domain name system (DNS) server, which serves as an address book for all domain names. This then sends back the exact IP address of the server which https://www.google.com points to.
ESTABLISHING CONNECTION - TCP/IP
Knowing this IP, your computer then establishes a connection with the server through the IP address. The type of this connection is known as Transmission Control Protocol (TCP)
This connection established via TCP 3-way handshake (where the client and the server synchronize (SYN) and acknowledge (ACK) each other). The client chooses an initial sequence number set in the first SYN packet. The server also chooses its own initial sequence number increments the client's SYN number sets it to the SYN/ACK packet and waits for the client to ACK by incrementing its SYN number.
HTTPS/SSL
After establishing the connection, your browser now sends a request for the webpage using an encryption protocol like Secure Sockets Layer (SSL) or Transport Layer Security (TLS) in order to encrypt the data that will be shared between your computer and the server. This type of encryption is what is responsible for the "s" in "https" which also implies that the connection is secure.
FIREWALL
A digital security system that scrutinizes all incoming and outgoing traffic on a network according to a defined set of rules. A firewall blocks unauthorized traffic and allows only communications that are considered safe, using a set of security rules provided by a network administrator.If your computer is behind a firewall, the firewall checks to ensure that the particular request you are making is allowed before permitting it. Also, if the server you are trying to access is also behind a firewall, a similar check will be done before you are finally able to connect to the server.
领英推荐
Load Balancer
Companies like Google with high traffic maintain a host of servers and for that matter they have a load balancer that receives most of the requests and sends it to a particular server. The request from your browser will therefore hit the load balancer first, which will forward it to a specific server depending on the algorithm used by the load balancer. The load balancer distributes the requests across several servers to prevent downtimes and Single Point of Failure (SPOF).
WEB & APPLICATION SERVER
The server that receives the request then sends a response back to the load balancer, which also forwards the response back to your browser. This response will mostly include HTML, CSS, and JavaScript files that makes up Google's homepage.
The HTML files returned tells the browser how to render the content of the page. The CSS file tells the browser how to style the content, while the JavaScript file adds interactivity to the page.
DATABASE
If there is a need for some dynamic content such as Google search results, then the web server will make a request to the application server, which in turn may make a request to a database server to get some data and send it back to the web server. The web server will then include these in the response that it sends back to the browser.
Rendering the page
When a browser receives a response from a web server, it processes the HTML, CSS, and JavaScript files that are included in the response in order to render the web page.
The rendering process involves interpreting the HTML and CSS code, rendering any images or other media that are included on the page, and executing any JavaScript code that is present on the page.
In your case, your browser would receive the response from the web server, which includes the HTML, CSS, and JavaScript files that make up the Google web page.
Conclusion
This article is my submission to a task focused on technical writing as part of the ALX Africa Software Engineering program. I hope you enjoyed it and now appreciate exactly what happens when you type "google.com" into your browser.
Resources
Your attention to the intricacies of how the web operates is super impressive! Diving deeper into user experience design could add a fresh perspective to your technical writing. Have you considered how these skills might shape your career path in software engineering?
Fantastic submission! Your insights on the workings of the web are incredibly insightful and show great promise in the realm of software engineering. Keep up the excellent work!
Data Driven Professional | Data Consultant | Instructor | Data & Analytics Analyst |
11 个月Karibu to you.