What Happens when you type google.com in your browser and press Enter
When you type?https://www.google.com?in your browser and press Enter, a series of events are about to start and, at the end, you will be able to browse the Google homepage. There are two important concepts that we must have clear before we go further. The computers connected to the internet are called clients and servers.
The clients are the typical web user′s internet-connected devices (for instance, your laptop or your smartphone) and web-accessing software available on those devices (usually a web browser like Firefox or Chrome). The servers are computers that store webpages, sites, or apps. When a client device wants to access a webpage, a copy of the webpage is downloaded from the server onto the client machine to be displayed in the user’s web browser.
Let’s examine the following technical concepts before we keep going.
?
DNS QUERY (DNS REQUEST)
The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through?domain names, like nytimes.com or espn.com. Web browsers interact through?Internet Protocol (IP)?addresses. DNS translates domain names to?IP addresses?so browsers can load Internet resources.
Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1:: c629:d7a2 (in IPv6).
https://www.cloudflare.com/learning/dns/what-is-dns
?A DNS query (also known as a DNS request) 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.
?
Types of queries
?In general, there are two ways of resolving a host or a domain name to an IP address, using the domain name system – a?Recursive?query and a?non-Recursive?query.
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. https://www.cloudns.net/wiki/article/254
?TCP/IP
TCP/IP is a data link protocol used on the internet to let computers and other devices send and receive data. TCP/IP stands for Transmission Control Protocol/Internet Protocol and makes it possible for devices connected to the internet to communicate with one another across networks. Originally developed in the 1970s by DARPA (the Defense Advanced Research Projects Agency in the US), TCP/IP started out as just one of many internet protocols. The TCP/IP model later became the standard protocol for ARPAnet, the modern internet’s predecessor. Today,?TCP/IP is the global standard for internet communications.
?TCP/IP determines?how computers transfer data?from one device to another. This data needs to be kept accurate so that the receiver gets the same information that the sender originally sent.
So what is TCP/IP and how does it work? To ensure that each communication reaches its intended destination intact, the TCP/IP model breaks down data into?packets?and then reassembles the packets into the complete message on the other end. Sending the data in small packets makes it easier to maintain accuracy versus sending all the data at once.
After a single message is split into packets, these packets may travel along different routes if one route is congested. It’s like sending a few different birthday cards to the same household by mail. The cards begin their journey at your home, but you might drop each card into a different mailbox, and each card may take a different path to the recipient’s address.
?Whenever you send something over the internet — a message, a photo, a file — the TCP/IP model divides that data into packets according to a?four-layer procedure. The data first goes through these layers in one order, and then in reverse order as the data is reassembled on the receiving end.
A diagram of how the TCP/IP model divides data into packets and sends it through 4 different layers
The TCP/IP model works because?the whole process is standardized. Without standardization, communication would go haywire and slow things down — and fast internet service relies on efficiency. As the global standard, the TCP/IP model is one of the most efficient ways to transfer data over the internet.
https://www.avg.com/en/signal/what-is-tcp-ip
?
?HTTPS/SSL
HTTP: HTTP stands for Hypertext Transfer Protocol, and it is a protocol — or a prescribed order and syntax for presenting information — used for transferring data over a network. Most information that is sent over the Internet, including website content and API calls, uses the HTTP protocol. There are two main kinds of HTTP messages: requests and responses. (Why is HTTP not secure?, 2021).
HTTPS: The S in HTTPS stands for “secure.” HTTPS uses TLS (or SSL) to encrypt HTTP requests and responses, so in the example above, instead of the text, an attacker would see a bunch of seemingly random characters. (Why is HTTP not secure?, 2021).
HTTPS is HTTP with encryption. The only difference between the two protocols is that HTTPS uses TLS or Transport Layer Security to encrypt normal HTTP requests and responses. As a result, HTTPS is far more secure than HTTP. A website that uses HTTP has https:// in its URL, while a website that uses HTTPS has?https://.?
(Why is HTTP not secure?, 2021).
?
SSL: Secure Sockets Layer (SSL) is a security protocol that provides privacy, authentication, and integrity to Internet communications. SSL eventually evolved into Transport Layer Security (TLS).??????What is SSL? | SSL definition, 2021
The below images illustrate the main differences between HTTP and HTTPS.
FIREWALL
A firewall is a piece of hardware or software that filters incoming network traffic to keep malware and attackers out. Firewalls are used to prevent unauthorized users from accessing unauthorized assets and services, ensuring that users only interact with the application through the web portal and do not have access to any other application infrastructure components. Firewalls can also identify and block packets with mismatched IP addresses — packets that say they’re coming from one location but don’t have an IP address that backs up that claim. (Rubens, 2021)
The HTTPS request message is passing through the firewall that accepts traffic on port TCP/443.
?
LOAD BALANCER
Behind the firewall you will find one of the most important parts in an application infrastructure. This part is the load balancer. A load balancer acts as the “traffic cop” sitting in front of your servers and routing client requests across all servers capable of fulfilling those requests in a manner that maximizes speed and capacity utilization and ensures that no one server is overworked, which could degrade performance. If a single server goes down, the load balancer redirects traffic to the remaining online servers. When a new server is added to the server group, the load balancer automatically starts to send requests to it. (What is Load Balancing, 2021).
In this while, a load balancer performs the following functions:
o Distributes client requests or network load efficiently across multiple servers
o Ensures high availability and reliability by sending requests only to servers that are online
o Provide the flexibility to add or subtract servers as demand dictates
The diagram below depicts how a load balancer functions
Load Balancing Algorithms
There is a variety of?load balancing methods, which use different algorithms best suited for a particular situation.
?
Load balancing has become a necessity as applications become more complex, user demand grows and traffic volume increases. Load balancers allow organizations to build flexible networks that can meet new challenges without compromising security, service or performance.
领英推荐
?Benefits of Load Balancing include:
WEB SERVERS
Web servers are software or hardware (or both together) that stores and delivers content to a web browser at a basic level. The servers communicate with browsers using?Hypertext Transfer Protocol (HTTP). Web servers can also support SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer Protocol).?
Web servers are also used for hosting websites and data for web applications. They can host single websites and multiple websites using virtualization. What is a Web Server? | ServerWatch
?Web pages are a collection of data, including images, text files, hyperlinks, database files etc., all located on some computer (also known as server space) on the Internet. A web server is dedicated software that runs on the server-side. When any user requests their web browser to run any web page, the webserver places all the data materials together into an organized web page and have them forward back to the web browser with the help of the Internet. Therefore, we can conclude that: -
A web server is a dedicated computer responsible for running websites sitting out on those computers somewhere on the Internet. They are specialized programs that circulate web pages as summoned by the user. The primary objective of any web server is to collect process and provide web pages to the users.
This intercommunication of a web server with a web browser is done with the help of a protocol named?HTTP (Hypertext Transfer Protocol).
These stored web pages mostly use static content, containing?HTML documents, images, style sheets, text files, etc.
?However,?web servers can serve static as well as dynamic contents. Web Servers also assists in emailing services and storing files. Therefore it also?protocols to support the respective services.
Web servers are mainly used in web hosting or hosting the website's data and running web-based applications.
?The Hardware of the web server is connected to the Internet that manages the data exchange facility within different connected devices. In contrast, the software of web server software is responsible for controlling how a user accesses delivered files. Typically, web server management is an ideal example of the client/server model. Therefore,?it is compulsory for all computers that host websites (whether with state or dynamic web page content) to have web server software.
?The term web server can denote server hardware or server software, or in most cases, both hardware and?software might be working together
?
Let's discover the step-by-step process of what happens whenever a web browser approaches the web server and requests a web file or file. Follow the below steps:
?
Web Servers in the Market
Some of the most popular examples of web servers include:
Apache HTTP Server: ?A free and open-source web server used for many operating systems, including Windows, Linux, and Mac OS X. Apache is the oldest web server software and one of the go to’s for website owners, developers, and hosting providers, with a market share of over 31%.
NGINX: A famous open source web server software that initially only functioned for HTTP web serving. It is now also used as a reverse proxy, HTTP load balancer, and email proxy. NGINX is known for its speed and ability to handle multiple connections, which is why many high-traffic websites use its services.
Microsoft Internet Information Services (IIS): ?IIS is a closed web server software developed by Microsoft widely used in Windows operating systems.
Lighttpd: ?free and open-source web server software that’s known for its speed while requiring less CPU power. Lighttpd is also popular for having a small memory footprint.
In web hosting, different web hosts support different types of servers for example, Hostinger supports both Apache and NGINX, the two leading web servers in the market. Web Servers - Javatpoint
?
APPLICATION SERVER
An application server is a type of server designed to install, operate and host applications and associated services for end users, IT services and organizations. It facilitates the hosting and delivery of high-end consumer or business applications, which are used by multiple and simultaneously connected local or remote users.
An application server consists of a server operating system (OS) and server hardware that work together to provide computing-intensive operations and services to the residing application. An application server executes and provides user and/or other app access when utilizing the installed application's business/functional logic. Key required features of an application server include data redundancy, high availability, load balancing, user management, data/application security and a centralized management interface. Moreover, an application server may be connected by enterprise systems, networks or intranet and remotely accessed via the Internet.
Depending on the installed application, an application server may be classified in a variety of ways, including as a Web server, database application server, general purpose application server or enterprise application (EA) server.?What is an Application Server? - Definition from Techopedia
?
DATABASE
A database is a collection of data that is organized, which is also called structured data. It can be accessed or stored in a computer system. It can be managed through a Database Management System (DBMS), software used to manage data. Database refers to related data in a structured form.?
The?Database?is an essential part of our life. As we encounter several activities that involve our interaction with databases, for example in the bank, in the railway station, in school, in a grocery store, etc. These are the instances where we need to store a large amount of data in one place and fetch these data easily.?
In a database, data is organized into tables consisting of rows and columns and it is indexed so data can be updated, expanded, and deleted easily. Computer databases typically contain file records data like transactions money in one bank account to another bank account, sales and customer details, fee details of students, and product details. There are different kinds of databases, ranging from the most prevalent approach, the relational database, to a distributed database, cloud database, and NoSQL databases.??
?
?TIDYING ALL UP
Finally, in the image below, summarizes the general data pipeline when you type google.com in your browser and press Enter. Below you will see how the information flows through the internet and the different servers to get a respond from the different servers:
1. Once you type a web address into your browser, it goes to the DNS server, and finds the real address of the server that the website lives on.
2. The browser sends an HTTPS request message to the webserver, asking it to send a copy of the website to the client. This message, and all other data sent between the client and the webserver, is sent across your internet connection using TCP/IP.
3. The HTTPS request message will pass the firewall and arrive to the load balancer which, depending on the logarithm used, will select the most convenient web server to send the message to.
4. If the web server approves the client’s request, the server sends the client a “200 OK” message, which means “Everything is OK”, and then starts sending the website’s files to the browser as a series of small chunks called data packets.
5. The browser assembles the small chunks into a complete web page and displays it to you.
6. The web server handles static data requests, but you want to use an interactive tool. As a dynamic data request, the web server transfers the request to an application server.
7. The application server receives the HTTPS request and converts it into a servlet request. Servlet is a language for exchange between web and application servers.
8. The servlet reaches the database server, and the app server receives a servlet response.
9. The app server translates the servlet response into HTTPS format for client access.
10. The information goes back through the load balancer to your computer; the browser assembles it and displays it to you.
Upon receiving a servlet request from a web server, the application server processes the request and responds to the web server via servlet response. Because application servers primarily work with business logic requests, the web server translates the servlet response and passes an HTTPS response accessible to the user. (Ingalls, 2021)
?