What happens when you type google.com in your browser and press Enter
Sylvia Gilloh
Tech-Savvy Administrative Assistant | Master of Organizational Efficiency and Communication Strategies | Enhancing Office Workflows.
Finding the IP address
In order to establish communication, the browser must obtain the IP address of the URL typed into the search bar. IP stands for "Internet Protocol." An IP address is a string of numbers separated by periods. They are expressed as a set of four numbers; an example address might be 192.158.1.38. An IP address is a unique address that identifies a device on the internet or a local network.
The browser would loop through its own cache memory to find out whether it could find the IP of the URL you just typed. If the IP does not exist, it will turn to DNS for help. DNS stands for "Domain Name Server." It is a server that stores and maps all the domain names to their IP addresses. Since the browser doesn't have a direct connection to DNS, it would send a request to Resolver for assistance. Resolver is the Internet Service Provider, which facilitates the internet connection for the browser.
?
Browser: Damn, I can't find this IP in my memory; it's like I've never seen this kind of request before. What should I do? Let me consult the resolver, who is far more knowledgeable than I am.
Browser: Hey Resolver, do you know the IP address of Google.com?
Resolver: It's okay, I got you.
?
The resolver will go through its own cache memory to see if it can find the IP address. If the address is not there, it will send a query to the next server, which is the root server. The root server is at the top of the DNS hierarchy. There are 13 sets of these root servers, strategically placed around the world and operated by 12 different organizations. Each set has its own unique address.
The root server may not know the IP address of the requested URL, but it would know where to send the resolver to get it. The root server would direct the resolver to the TLD (top-level domain server). The TLD server stores address information for top-level domains such as.com,.net, and.org.
?
Resolver: It looks like I do not have the IP address of the URL that the browser is looking for; let me ask the root server. Let me ask the root server.
Resolver: Hey root server! Do you know the IP address for google.com?
Root server: I do not have the IP address; I do not store addresses, but I know just the right guy for you. Please ask TLD; he always has all the information about top level domains.
?
A query will be sent to the TLD, which will not know the address but will direct the resolver to the authoritative name servers, which are responsible for providing answers to recursive DNS requests such as IP addresses.The ANS, upon receiving the query, will respond with the IP address. The resolver will first of all save a copy of the address in its memory so that it doesn't have to go through all those steps anytime it receives a similar query.
?
Resolver: Hey ANS, Do you know the IP address for google.com?
Answer: Yes, I have; here is the address.
Ressolver: Finally, let me save it so that I don't have to go through all of this again. Bye, thanks for your help.
Resolver: Hey browser, here is the IP address for google.com. It's been a long journey, but it's been worthwhile. I met so many people.
Browser: Thank you so much, resolver; I knew I could count on you.
?
If the ANS does not find the address, it would mean that the address doesn't exist, and a message saying "Error page not found" would appear on the screen.
?
Establishing Connection
After getting the IP address, the browser would now begin the process of connecting to the Google.com server. The url had HTTPS, which stands for "secure hypertext transfer protocol." This protocol encrypts the data that is being retrieved by the URL, making it secure and impossible to hack.
The browser would add 443 at the end of the IP address, i.e., "7.24.15.443." This is because HTTPS , by default, uses port 443. A port is a logical connection that is used by programs and services on a computer or server that are going to be used. The browser would be able to locate the google.com server by its IP address via the internet. Through this, a connection is made between the browser and server, and they begin to communicate.
HTTPS secures data by using the SSL protocol. SSL stands for "Secure Sockets Layer." SSL is a protocol that is used to ensure security on the internet. It uses public key encryption to secure data. This is how it works: once the browser connects to the web server, the browser requests that the server identify itself. The server will send a copy of its SSL certificate to prove its identity. SSL certificates are small digital certificates that are used to verify a website's identity. It is meant to show the browser that the website is trustworthy. The browser acknowledges the certificate, and they begin to exchange data.
?
Browser: Hey server, I need to trust you. Identify yourself.
Server: Here is my SSL; you can have a look at it and prove my identity.
Browser: It looks good; I can trust you now.
Server: Okay, let us exchange encrypted data.
?
Once all is done, the browser requests a TCP socket. TCP stands for "Transmission Transfer Protocol," and it ensures that all data is received and in order, with no packets lost. TCP is a connection-oriented protocol, which means that it must acknowledge the essential connection between the server and the browser before any communication can take place, which it does with our three-way handshake. The browser will send a message called "SYN," and the receiving computer (in this case, the server) will send back an acknowledgment message known as "SYN," telling the sender that it has received the message. The browser will send back an acknowledgment message to the web server, "ACK RECEIVED."
?
Browser: SYN
Server: SYN ACK
Browser: "ACK RECEIVED"
?
Data Retrieval
?
A. Request sent by the browser
After everything is set, HTTP will now send a GET request. A GET request is used to retrieve information from a server. When a client (e.g., a web browser) sends a GET request to a server, it includes the following information:
领英推荐
Optionally, the client can also include other information in the request, such as the hostname of the server, a list of acceptable response formats, and any request headers (e.g., "User-Agent," "Accept-Language," etc.).
Here is an example of a GET request:
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Accept-Language: en-US,en;q=0.9
?
B. Server sending a response
When the server receives a GET request, it looks for the requested resource and returns it to the client along with an HTTP response. The response includes the HTTP status code (e.g., 200 OK), the HTTP version, and any response headers (e.g., etc.).Here is an example of a GET response:
?
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 1234
?<html>
<head> title>Google/title></head>
<body> <h1>Google</h1> ... </body>
</html>
?
C. Browser displaying the response to the screen
When a browser receives a GET response from a server, it processes the response and displays the content to the user.The first step in this process is to parse the HTTP response. The browser reads the status line of the response (e.g., "HTTP/1.1 200 OK") to determine the status of the request. If the request was successful (i.e., the status code is in the 2xx range), the browser continues to process the response. If the request was unsuccessful (i.e., the status code is in the 4xx or 5xx range), the browser displays an error message to the user.
Next, the browser reads the response headers to get additional information about the content of the response. For example, the "Content-Type" header tells the browser the type of content being returned (e.g., text/html, image/jpeg, etc.), and the "Content-Length" header tells the browser the size of the content.
Finally, the browser reads the body of the response, which contains the actual content that is being returned (e.g., an HTML document, an image, etc.). The browser processes the content based on its type (e.g., rendering an HTML document, displaying an image) and displays it to the user.
If the response includes any hyperlinks (e.g., anchor tags in an HTML document), the browser also processes these and makes them clickable so that the user can navigate to other pages or resources on the website.
This means you have now entered the Google home page.
Firewall
A firewall is a security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall can be hardware-based, software-based, or a combination of both.
The main purpose of a firewall is to prevent unauthorized access to or from a private network. It does this by inspecting incoming and outgoing traffic and allowing or denying access based on a set of rules.
There are two main types of firewalls: network firewalls and host-based firewalls.
A network firewall is a security system that sits between the network and the internet and controls incoming and outgoing traffic based on predetermined security rules. Network firewalls can be hardware-based (e.g., a physical appliance) or software-based (e.g., a software application running on a server).
A host-based firewall is a security system that runs on a single host (e.g., a computer or mobile device) and controls incoming and outgoing traffic for that host. Host-based firewalls can be software-based (e.g., a software application installed on the host) or hardware-based (e.g., a firewall built into the operating system of the host).
Firewalls use a set of rules to determine whether to allow or block incoming and outgoing traffic. These rules can be based on various criteria, such as the source and destination IP addresses, the protocol being used (e.g., TCP, UDP, etc.), and the port number being used.
For example, a firewall might allow incoming traffic from the IP address of a trusted website (e.g., www.example.com ) but block incoming traffic from an untrusted website (e.g., www.malicious-site.com ). Or, it might allow outgoing traffic to a specific port number (e.g., port 80 for HTTP traffic) but block outgoing traffic to a different port number (e.g., port 25 for email traffic).
By controlling access to and from the network, firewalls help protect against malware, hacking attempts, and other security threats.
?
Load Balancer
A load balancer is a device that distributes network traffic across multiple servers or resources. The main purpose of a load balancer is to improve the performance and availability of a network by distributing the workload evenly across multiple resources.
There are two main types of load balancers: hardware-based and software-based.
A hardware-based load balancer is a physical device that sits between the clients and the servers. It is responsible for distributing incoming traffic to the servers and can be configured to use various algorithms to determine which server should handle a particular request.
A software-based load balancer is a program that runs on a server and is responsible for distributing incoming traffic among the servers. Software-based load balancers are often used in cloud environments and are typically more flexible and easier to configure than hardware-based load balancers.
Here's how a load balancer works:
Some common algorithms that load balancers use to determine which server should handle a request include round-robin (which distributes requests evenly among the servers), least connections (which sends requests to the server with the fewest connections), and least response time (which sends requests to the server with the fastest response time).
By distributing the workload evenly across multiple servers, a load balancer can improve the performance and availability of a network and ensure that clients can access the resources they need even if one or more servers fail.