Client Server Architecture

Aryan DhirhiAryan Dhirhi
4 min read

In this article we are going to understand about the client server architecture. If you are searching for the knowledge about the client server architecture then you are at the right place. Hi my name is Aryan Dhirhi and I am going to explain you all about the client server architecture.

Introduction

If we are talking about the client server architecture then first of all we should knowt about the computer network architecture, majorly we have two types of computer network architecture.

  • Peer-to-Peer Architecture

  • Client-Server Architecture

Peer-to-Peer Architecture

In P2P(Peer-to-Peer) newtork all computer are connected to each other and every computer has equal priority and proviledges to share data to every computer individualy. In this architecture every computational nodes that has equal capabilities, abilities and responsibilities. In this architecture, tasks are allocated to each and every devices available in the network.

Advantages of Peer-to-Peer Architecture

  • Peer-to-Peer network is less costly and cheaper.

  • Peer-to-Peer is very simple and not complex.

  • It is vaery easy and simple to setput and manage as installation and setup is less painfull and computer manages itself. This is because of built-in support in modern operating system.

Disadvantages of Peer-to-Peer architecture

  • Security is one of the major in this type of architecture.

  • If computer working with some of resources is down and shearing of resources might become major problem.

  • Performace, security and access can also become major problem with an increase in number of computer on this network.

Client-Server Architecture

Client server is a type of computer network in which one of the centralized and powerful computers called as server is hub to which many of personal computer that are less powerful are connected. It is type oof system where clients are connected to server to just share or user resources. These servers are generally considered as heart of the system. This type of networks is more stable and scalable as compare to peer-to-peer network.

In this architecture a client sends the request to server which is typically processed on server side, then server returns the response about the requested data. Client do not share resources with eacyh other, but instead rely on the server to provide the resources or services requested.

How does the Client-Server Model Work ??

Client

Client is a device which requests for a services from the server. The client initiates commpunication, client send the request to the server’s IP address and receives response form the server, Generally we use web browser as client (Chrome, Firefox, Safari, etc.) but anything can become client which has ability to do network call (Postman, Terminal, Powershell, Thunderclient, etc.).

Server

Server is a remote computer that provides data, resources to client, It listens to incoming client requests, processes them and sends the required information to clients. A server can handle multiple clients requests simultaneously.

HTTP Request-Response Cycle

The process of HTTP/HTTPS request-response cycle consist of following steps-

  1. User Enters the URL :- The user types a website address for example “www.google.com” into the browser’s address bar.

  2. DNS (Domain Name System) :- The browser sends the request to DNS server and DNS server returns the IP address of the requesting website, If you want to read more about DNS the you can refure the Article https://aryandhirhi.hashnode.dev/domain-name-system-dns

  3. Browser Sends HTTP/HTTPS Request :- The browser sends an HTTP/HTTPS request to the IP address of the web server to fetch the website’s data. HTTP (HyperText Transfer Protocol) or HTTPS (the secure version) is the protocol used for communication between the browser (client) and the web server (server).

  4. Server Sends Website Files :- The server processes the request and sends the necessary website files (HTML, CSS, JavaScript, images, etc.) back to the browser.

Advantages of Client-Server Architecture

  • Centralized Data Management :- All data is stored in a centralized server, which make it easier to manage, update and backup

  • Cost Effective :- Se\ince the server handles most of the processing clients require fewer resources and can be simple devices, reducing costs.

  • Scalabilioty :- Both clients and server can be scale separatly. Servers can be upgraded to handle more clients, and new client can be added without siginificant changes to the server infrastructure.

  • Data Recovery :- Centrallized data storeage on the server allows for batter data recovery and eaier backup strategies.

Disadvantages of Client-Server Architectrue

  • Clients Are Vulnerable :- Clients are prone to viruses, Trojans, and worms if present in the Server or uploaded into the Server.

  • Servers Are Targets :- Servers are prone to Denial of Service (DOS) attacks, where the server is overwhelmed with traffic and made unavailable to legitimate clients.

  • Data Spoofing and Modification :- Data packets may be spoofed or modified during transmission if the proper security measures (e.g., encryption) are not implemented.

  • Man-in-the-Middle (MITM) Attacks :- Phishing or capturing login credentials or other useful information of the user are common and MITM(Man in the Middle) attacks are common.

0
Subscribe to my newsletter

Read articles from Aryan Dhirhi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aryan Dhirhi
Aryan Dhirhi