WHAT HAPPENS WHEN YOU TYPE www.google.com IN YOUR BROWSER AND PRESS ENTER?

 Introduction: Digital devices and most especially computer systems have a user interface for inputting data, a processing and an output unit not to mention their memory and other peripherals. As we all know, the digital systems are made up of electrical/electronic components (these components make a device, and group of devices resulting into a system) and mechanical materials (made with metal and plastics) for its structure and assembly.

The input device/system sends in data in a form of electrical signals to the processing and memory units of the computer system and the result (termed as information) is display or send through the output units of the device/system.

To answer our aforementioned question, a kind of connectivity (wired or wireless) is needed for one digital system/device to be able to fully communicate with another device/system either in the same network or remotely. The figure below (fig. 1) illustrates a block diagram of a single communication network between a user device and a server.


Figure 1: Communication Network between a User Device and a Server

The user/client device (computer system/phone/other device) with a browser application (such as safari, chrome, edge, firefox browser etc) capability type in www.google.com (from the browser’s URL) to access the google server webpage. What happen in between can be explained using a network protocol called Open Systems Interconnection (OSI) model.

What is a network protocol?

A network protocol is a set of established rules that specify how to format, send and receive data so that computer network endpoints, including computers, servers, routers and virtual machines, can communicate despite differences in their underlying infrastructures, designs or standards. To successfully send or receive information, devices and systems on both sides (from receive to sender and vise visa) of a communication exchange must accept and follow some set protocol conventions (rules) which can be built into the software, hardware or both.

The OSI model is made up of seven (7) layers (subdivided into lower layer that deals with data transport and the upper layer that deals with software and applications) depicted in figure 2 and 3 respectively.

Figure 2: OSI Model Overview

Figure 3: Structure of the seven (7) OSI Model

The user/client typed data (www.google.com) is transported from the lower layer device/system to the upper level software and applications. The typed data is converted into media signal (inform of 1s and 0s) by the user device and send to the network hub or repeater (physical layer).  This media signal is then pass through the data link layer (switch wireless or wired) connected to the user local network. The signal from the data link layer is now routed to the network layer in a form of packets to be delivered and sequence to the transport layer as segments for it to be properly relied to the upper level layers.

The first upper link layer, the session layer establish a connection using the available protocols (between the user device network and the internet) to the presentation layer in a form of text, picture encrypted or unencrypted. These data fed to the presentation is now processed by the server side application. When the page is now available (i.e the www.google.com) on the server, it will be redirected to the client device (the user device) using the same process and layers.

The seven (7) layers are briefly explain below:

Physical layer. The physical layer is the first initial layer that connects two interoperable systems. It controls simplex or duplex modem transmissions and transfers data in bits. Additionally, it oversees the hardware that connects the network interface card (NIC) to the network, including the wiring, cable terminators, topographies and voltage levels.

Data-link layer. The data-link layer is responsible for the error-free delivery of data from one node to another over the physical layer. It's also the firmware layer of the NIC. It puts datagrams together into frames and gives each frame the start and stop flags. Additionally, it fixes issues brought on by broken, misplaced or duplicate frames.

Network layer. The network layer is concerned with information flow regulation, switching and routing between workstations. Additionally, it divides up datagrams from the transport layer into error-free and smaller datagrams.

Transport layer. The transport layer transfers services from the network layer to the application layer and breaks down data into data frames for error checking at the network segment level. This also ensures that a fast host on a network doesn't overtake a slower one. Essentially, the transport layer ensures that the entire message is delivered from beginning to end. It also confirms a successful data transmission and retransmitting of the data if an error is discovered.

Session layer. The session layer establishes a connection between two workstations that need to communicate. In addition to ensuring security, this layer oversees connection establishment, session maintenance and authentication.

Presentation layer. The presentation layer is also known as the translation layer because it retrieves the data from the application layer and formats it for transmission over the network. It addresses the proper representation of data, including the syntax and semantics of information. The presentation layer is also in charge of managing file-level security and transforming data to network standards.

Application layer. The application layer, which is the top layer of the network, oversees relaying user application requests to lower levels. File transfer, email, remote login, data entry and other common applications take place at this layer.

 

TECHNICALLY OF THE OSI MODEL BETWEEN THE CLIENT DEVICE AND A SERVER

Now that we have a preview of the OSI model and there functions, we can further explain what happens behind the scene of the OSI layer between the user/client device and the server.

When you type in a web address into your browser (such as the www.google.com), the user/client device sends a request to a DNS (Domain Name System which operates at layer 7) server to translate that address into an IP address that can be used by your device/system to connect to the website. The server DNS is responsible for finding the correct IP address for the domain URL, using the Domain Name System (DNS) protocol.

When a client device sends a request to a server, it uses the Transmission Control Protocol (TCP) (a protocol suite that is use to communicate between devices over the internet and operates at layer 4 and 3 of the OSI model) to establish a connection with the server. The three-way handshake process is used to establish this connection. During this process, the client sends a SYN packet to the server, which responds with a SYN-ACK packet. The client then sends an ACK packet back to the server, and the connection is established.

Before this connection is established, the client packets have to pass through a firewall. A firewall is a security system (a hardware or software, or combination of both) that operates at the network layer (layer 3) which monitors and controls network traffic based on a set of security rules. Firewalls usually sit between a trusted network and an untrusted network (oftentimes the untrusted network is the Internet). The proxy-based firewall sits in between clients and servers. Clients connect to the firewall, and the firewall inspects the outgoing packets (which will be incoming packets to the server), after which it will create a connection to the intended recipient (the web server). Similarly, when the web server attempts to send a response to the client, the firewall will intercept that request, inspect the packets, and then deliver that response in a separate connection between the firewall and the client. A proxy-based firewall effectively prevents a direct connection between the client and server thus ensuring connection from the right device on the right port.

During the connection phase or probably after the connection between the client and server has been established and the connection is secured from a third party interference and free from brute force attack, the client initiates HTTPS/SSL protocol (a combination of HTTP and SSL/TLS protocols that provides secure communication between a client and a server over the Internet that operates at layer 7 and 6). HTTPS/SSL uses both asymmetric and symmetric encryption to protect the confidentiality and integrity of data-in-transit. The following list out the processes for the HTTPS/SSL protocol, after which the client and server now exchange data using the session key for symmetric encryption:

·       The client initiates by sending a request to the server for building a secure session.

·       The server responds by sending its SSL certificate to the client.

·       The client receives the given SSL certificate.

·       The client then authenticates the server by using a list of known certificate authorities.

·       The client generates a random symmetric key and encrypts it using server’s public key.

·       The client creates a session key, encrypts it with the server’s public key and sends it to the server.

·       If the server has requested client authentication, then the client sends his own certificate to the server.

·       The server decrypts the session key using its private key and sends an acknowledgement to the client.

Another important device associated with web or application servers is a load balancer. The load balance is a device or software that distributes network traffic across a pool of servers to improve the performance, availability, and scalability of an application. A load balancer sits between the client and the server group and acts as an invisible facilitator, ensuring that all servers are used equally.

A load balancer can use different algorithms or methods to decide how to route the traffic to the servers, such as round robin, least connections, least response time, etc. A load balancer can also perform health checks on the servers and avoid sending traffic to unhealthy or overloaded servers.

A load balancer can operate at different layers of the network stack, such as the transport layer (layer 4) or the application layer (layer 7). A transport layer load balancer does not depend on the content of the application and works with TCP/IP protocols. An application layer load balancer uses the amount of traffic or the content of the application to decide how to distribute the traffic

In conclusion, the webpage typed in by the user/client is now search whether available in the web server. A web server is a software or hardware that handles requests from clients (usually web browsers) and delivers web content (such as HTML documents, images, CSS stylesheets, JavaScript files, etc.) over the Internet using the HTTP protocol.

A web server can be a physical machine that hosts one or more websites, or a software program that runs on a machine and listens for incoming requests. Some common web server software are Apache, Nginx, IIS, etc.

A web server can serve static content or dynamic content. Static content is pre-existing files that are stored on the server and sent as-is to the client. Dynamic content is generated on the fly by another program (such as a web application) that communicates with the web server and provides the content to be delivered to the client.

 

On the other hand, if you what is typed in the user/client browser is an address of an application or program, in this case the request will now be directed to an application server. An application server is a software program that provides the business logic or functionality of an application (layer 7). An application server can run on a web server or a separate machine, and it communicates with the web server and the database server to process dynamic requests from clients. An application server can support various programming languages, frameworks, and protocols to develop and deploy applications. Some common application servers are Jakarta EE (formerly Java EE), .NET, PHP, etc. An application server can also provide features such as clustering, fail-over, load-balancing, security, and performance optimization.

An application server can serve different types of applications, such as web applications, mobile applications, desktop applications, etc. Depending on the type of application, an application server can use different technologies to deliver the content or service to the client. For example, a web application server can use servlets, JSP, ASP.NET, etc. to generate dynamic web pages. A mobile application server can use REST, JSON, etc. to provide data and services to mobile devices.

What facilitates the swift and seamless storage, reading, writing and sorting of data and information on servers is a database. A database is an organized collection of structured information or data, typically stored and accessed electronically through the use of a database management system. Small data can be stored on a file system while large databases are hosted on computer clusters or cloud storage. A database management system (DBMS) is the software that interacts with end users, applications and the database itself to capture and analyze the data. The sum total of the database, the DBMS and the associated applications can be referred to as Database System.



Comments