Ever Wondered What Happens When You Type 'www.google.com' In Your Browser And Press Enter?
Chima Enyeribe
Software Engineer | Data-centric Solutionist | Education | Enjoys problem solving with Python on Hacker Rank
This question is a classic and still widely used interview question for many types of software engineering positions to assess a candidate’s general knowledge of how the web stack works on top of the internet. The explanation, however, can range from simple to complex. In this article, we’ll look at a beginner-level abstraction of what happens when you enter ‘www.google.com’ or any URL for that matter into your browser.?
When a user types "google.com" into a web browser, it is interpreted as http(s)://www.google.com, a URL (Uniform Resources Locator), and the browser begins to process it. The URL consists of a protocol (HTTP or HTTPS), and a host or domain name (www.google.com). After parsing the URL , the domain name is sent to the Domain Name System (DNS) server to resolve its IP address.
A Domain Name System, (DNS), is a system that translates human-readable domain names into numerical IP addresses that computers can understand. Your computer then uses the IP address to establish a connection to the web server hosting the website and request the webpage. But before this webpage data transfer is done, the TCP/IP needs to verify the devices involved in this transmission process.?
TCP/IP is a set of communication protocols that are used to connect devices on the internet and enable them to communicate with each other.
The TCP is responsible for establishing and maintaining a connection between two devices, and for breaking the data into smaller packets for efficient transmission over the internet. IP part of TCP/IP is responsible for routing the packets of data from their source to their destination via the IP addresses. However, before these packets of data are received at the destination, it needs to go through Firewalls to ensure the data isn’t malicious.
A firewall is a security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules.
It is important to note that before the browser e.g Brave, Chrome, Firefox, etc and a web server, in this case, the google web server, can communicate securely, they both need to have an SSL/TLS handshake, which is an encryption-decryption process, to aid data secure communication between themselves over the network.
In order to use HTTPS, a website must have an SSL certificate issued by a trusted certificate authority. When a user connects to a website using HTTPS, their browser will display a padlock icon to indicate that the connection is secure.
领英推荐
When a request is made to a website, it is often handled by a cluster of servers rather than a single server. This is because a single server may not be able to handle the load of all the requests. In this case, a load-balancer distributes the requests across the servers in the cluster using various algorithms. This is why web servers e.g google servers, is able to handle millions of requests from users across the globe, without crashing or increased latency between REQUEST and RESPONSE.
The request from the load balancer is then forwarded to a web server. The web server then responds by sending the requested web page back to the browser, which displays the page to the user.?
If the website's page to be displayed has dynamic content, the web server may pass the request on to an application server, to execute the needed business logic to produce the required results.?
If the application server needs to retrieve data from a database, it will send a request to the database server. The database server retrieves the requested data and sends it back to the application server.
Response
Once the application server has processed the request and retrieved any necessary data, it sends a response back to the web server, which in turn sends it back to the client (i.e., your browser). The response typically consists of an HTML document, which the browser then renders and displays as a webpage.
In summary, when you type “https://www.google.com" or any URL into your browser and press Enter,?
Read the full abstraction here on medium