What happens when you type google.com in your browser and press Enter?
If you had typed https://www.google.com in a text editor, your OS would have let the dedicated text editor program handle your interactions with it. But since you typed in the browser, it will let the browser application handle it.
What is a browser?
Similarly, the browser is the medium that allows you to make a request and lets a server serve you. It’s software installed and running on your computer that lets you search the Internet. It takes your input, creates and sends a request to a DNS (Domain Name Server) to find the IP., gets the response from DNS and serves you.
DNS (Domain Name Server)?
DNS(Domain Name System) is a database that maintains the name of the website (URL) and the particular IP address it links to. Every single URL on the internet has a unique IP address assigned to it. The IP address belongs to the computer which hosts the server of the website we are requesting to access. For example, www.google.com has an IP address of 126.96.36.199.
To find the DNS record, the browser checks four caches.
● First, it checks the browser cache. The browser maintains a repository of DNS records for a fixed duration for websites you have previously visited. So, it is the first place to run a DNS query.
● Second, the browser checks the OS cache. If it is not in the browser cache, the browser will make a system call to your underlying computer OS to fetch the record since the OS also maintains a cache of DNS records.
● Third, it checks the router cache. If it’s not on your computer, the browser will communicate with the router that maintains its’ own cache of DNS records.
● Fourth, it checks the ISP cache. If all steps fail, the browser will move on to the ISP. Your ISP send maintains its’ own DNS server, which includes a cache of DNS records, which the browser would check with the last hope of finding your requested URL.
Than, DNS request(also known as a DNS query) is a demand for information sent from a user’s computer (DNS client) to a DNS server. In most cases a DNS request is sent, to ask for the IP address associated with a domain name. An attempt to reach a domain, is actually a DNS client querying the DNS servers to get the IP address, related to that domain.
Than, there are two ways of resolving a host or a domain name to an IP address, using the domain name system — a Recursive request and a non-Recursive request.
The Recursive query is, when a DNS client directly gets the IP address of a domain, by asking the name server system to perform the complete translation.
The non-Recursive query is, when a DNS client contacts the name servers, one by one, until it finds the server, containing the needed information.
How do they work?
The process behind Recursive queries, can be explained by the following example:
1. A user opens up his favorite browser and enters https://www.google.com in the address bar. His computer does not know the IP address for https://www.google.com, so it sends a request to the user’s DNS resolver.
2. The resolver does not know the IP address for https://www.google.com so it will query one of the root DNS servers.
3. The root servers know the locations of all the TLDs, such as .com, they do not know the IP of https://www.google.com, so they return the location of the .com servers.
4. Once the query reaches the .com TLD servers, it will find the Authoritative DNS server of https://www.google.com and will reply to the resolver with that server.
5. The resolver will send a query to the Authoritative DNS server of the domain and will resolve it.
6. The Authoritative DNS server of the domain will check within its database and will find an entry for https://www.google.com, which has an IP address.
7. Finally the resolver will know the IP address for https://www.google.com and will send the result to the user’s computer.
The process behind non-Recursive queries, follows the same procedure, but the DNS client (the machine from which the user tries to resolve the domain) will have to find the authoritative DNS server for the domain, by itself.
The DNS client will have to ask by itself, first the root servers, then the TLD servers and finally the Authoritative DNS server to be able to resolve the domain.
The open systems interconnection (OSI) model is a conceptual model created by the International Organization for Standardization which enables diverse communication systems to communicate using standard protocols. In plain English, the OSI provides a standard for different computer systems to be able to communicate with each other.
The OSI Model can be seen as a universal language for computer networking. It’s based on the concept of splitting up a communication system into seven abstract layers, each one stacked upon the last.
So far, I have mainly talked from the client perspective. It’s time to understand what happens at the server end.
Once the browser receives the correct IP address, it will build a connection with the server that matches the IP address to transfer information. Browsers use internet protocols to build such connections. There are several different internet protocols that can be used, but TCP is the most common protocol used for many types of HTTP requests.
To transfer data packets between your computer(client) and the server, it is important to have a TCP connection established. This connection is established using a process called the TCP/IP three-way handshake. This is a three-step process where the client and the server exchange SYN(synchronize) and ACK(acknowledge) messages to establish a connection.
1. The client machine sends a SYN packet to the server over the internet, asking if it is open for new connections.
2. If the server has open ports that can accept and initiate new connections, it’ll respond with an ACKnowledgment of the SYN packet using a SYN/ACK packet.
3. The client will receive the SYN/ACK packet from the server and will acknowledge it by sending an ACK packet.
Then a TCP connection is established for data transmission!
The Internet protocol suite, commonly known as TCP/IP, is the set of communications protocols used in the Internet and similar computer networks. The current foundational protocols in the suite are the Transmission Control Protocol (TCP) and the Internet Protocol (IP).
The technical standards underlying the Internet protocol suite and its constituent protocols are maintained by the Internet Engineering Task Force (IETF). The Internet protocol suite predates the OSI model, a more comprehensive reference framework for general networking systems.
A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiates communication by making a request for a web page or other resource using HTTP, and the server responds with the content of that resource or an error message. A web server can also accept and store resources sent from the user agent if configured to do so.
Technologies such as REST and SOAP, which use HTTP as a basis for general computer-to-computer communication, as well as support for WebDAV extensions, have extended the application of web servers well beyond their original purpose of serving human-readable pages.
So, if you encountered an error, you can take a look at the HTTP response to check what type of status code you have received.
HTTPS stands for HyperText Transfer Protocol Secure, but it is also referred to as HTTP Secure and HTTP over SSL. Ever since the internet came about HTTP was the protocol that was used to move data across the world. HTTP moves data in plain text, which is no longer secure because it is readily available for anyone to read, HTTPS provides a secure method, using encryption to move data over the internet.
HTTPS has been around for some time now; it first came to life in 1994 when SSL and HTTP were put together.
SSL is short for Secure Socket Layer, and an SSL certificate will give you a way of encrypting information while it travels online. This is particularly important as it ensures that data in transit cannot be intercepted by those with malicious intent. The quickest way to check a website is SSL encrypted is by looking in the top left-hand side of the URL address bar on your browser.
The details of the SSL certificate, such as the corporate name of the owner of the website and the issuing authority can be seen by clicking on the padlock symbol in the address bar.
SSL certificates are usually available to buy directly from your hosting provider or web developer. You must always ensure you buy SSL certificates from trusted providers.
Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers, also known as a server farm or server pool. … If a single server goes down, the load balancer redirects traffic to the remaining online servers.
A load balancer is a device that acts as a reverse proxy and distributes network or application traffic across a number of servers. Load balancers are used to increase capacity (concurrent users) and reliability of applications. … Load balancers are generally grouped into two categories: Layer 4 and Layer 7.
Firewalls provide protection against outside cyber attackers by shielding your computer or network from malicious or unnecessary network traffic. Firewalls can also prevent malicious software from accessing a computer or network via the internet.
In computing, a firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules. A firewall typically establishes a barrier between a trusted network and an untrusted network, such as the Internet.
An application server is a server that hosts applications.
Application server frameworks are software frameworks for building application servers. An application server framework provides both facilities to create web applications and a server environment to run them.
An application server framework contains a comprehensive service layer model. It includes a set of components accessible to the software developer through a standard API defined for the platform itself. For Web applications, these components usually run in the same environment as their web server(s), and their main job is to support the construction of dynamic pages. However, many application servers do more than generate web pages: they implement services such as clustering, fail-over, and load-balancing, so developers can focus on implementing the business logic.
As mentioned, web databases can be used for professional and personal purposes. Common ways businesses use web databases are for customer feedback forms, website polls, and inventory lists. Personal web databases are a useful way to store email addresses, or even for a home inventory list.
Simple architecture for this process:
I hope that with this overview you have more clarity about what happen when you type
https://www.google.com in your browser and press
Enter. Thank you for reading :)