Table of contents
1.
Introduction
2.
Client-Server Model 
2.1.
Components of the client-server Model 
2.2.
How does the Client-Server Model Work? 
2.3.
Client-Server Model Examples  
3.
How does the Browser interact with the Servers?
4.
Advantages of the Client-Server model 
5.
Disadvantages of the Client-Server model
6.
Peer-to-Peer vs Client-server Model
7.
Frequently Asked Questions
7.1.
Which layer provides the interface via which client and server application objects communicate? 
7.2.
Which is the binary data protocol layer? 
7.3.
Which object serves as a client-side gateway? 
7.4.
Which is the server-side object's gateway? 
8.
Conclusion
Last Updated: Aug 28, 2024

Client-Server Model

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?
Computer Networks

Introduction

Client-Server Model: This model describes network communication between two computing entities. Clients request resources or services, and servers provide them.

The client-server model, also known as client-server architecture, outlines the framework used to enable communication between source and destination systems. This model, often referred to as a protocol stack or network protocol, defines the architecture and components essential for network communication.

There are two types of network models:

  1. Client-Server Model: A client is an application program that makes a request to another application program on the local system, while a server is a program that serves a request. When a web server gets a request from a client host, for example, it responds to the client host's request.
     
  2. Peer to peer Model: In a data center, it does not have a dedicated server. Peers are machines that do not belong to the service provider. Most of the peers reside in their homes, offices, schools, and universities. This design is known as peer-to-peer architecture because the peers connect with each other without sending information through a dedicated server. The applications based on P2P architecture include file sharing and internet telephony.

Also See, Basic Networking Commands

Client-Server Model 

The client-server model is a distributed application structure that divides jobs or workloads between servers, who offer a resource or service, and clients who request that service. Clients and servers connect across a Computer Network on separate hardware most of the time. However, they may share a system. A server host is a computer that executes one or more server applications that share resources with clients. A client typically does not share any of its resources but instead asks a server for material or services. As a result, clients start communication sessions with servers, waiting for incoming requests. Email or network printing and the World Wide Web are computer applications that employ the client-server concept.

Client Server Model

Client-Server Model

Components of the client-server Model 

Clients, Servers, and the networking devices that link the two segments are present in all client-server frameworks.

  1. Client 
    A client is an application that runs on a local system and asks the server for help. A client program is a finite program, which implies that the user initiates the service and ends when it is done.
     
  2. Server 
    A server is software that runs on a distant computer and provides services to clients. The server opens the door for incoming requests when a client wants a service, but it never launches the service.
    A server program is an ongoing program, implying it will operate indefinitely until a problem occurs. The server will sit and wait for the clients' requests. The server replies to the proposal when it arrives at the server.
     
  3. Networking Devices
    The architecture requires physical or wireless networking equipment such as hubs, switches, and routers to link servers, clients, and resources.
    Administrators may customize how client devices make requests and assign servers to execute certain activities once the link between clients and servers is established.

How does the Client-Server Model Work? 

The following procedure is made more accessible with a functional client-server architecture:

  • The client uses a network-enabled device to send a request.
  • The request is received and processed by the network server.
  • The client gets a response from the server.

The client-server paradigm, despite its simplicity, is broadly applicable and essential to anybody interested in learning about content delivery networks (CDNs) or the mechanics of edge networking. The client-server process is closer to end-users as server capabilities grow closer to the network edge.

The Client Server Model

Client-Server Model Examples  

  1. Facilitating Email
    Snail mail can't match the speed and dependability of electronic mail in business communication. For a long time, the industry standard for controlling individual email accounts and activities has been to host email communications for an organization or network on a dedicated server.
    Administrators can set up a system that enables, protects, and manages email interactions using IMAP, POP3, and SMTP protocols.
     
  2. Accessing Web Content
    When a web client types in a URL to visit a certain website, the browser asks the domain name system for an IP address (DNS). The DNS server provides the user with an IP address for identification and transmission of results.
    A client activated particular online material by traveling to the website, which the user may only access through an HTTP response delivered by a web server.
    The end-user in this scenario is the customer who is provided with digital material. The DNS server and web server create and maintain a connection to a database that stores web content.

You can also read about the Layered Architecture in Computer Network.

How does the Browser interact with the Servers?

The browser interacts with servers through a process that involves sending requests and receiving responses. Here's how it works:

  • Request Initiation: When you enter a URL or click a link, the browser sends an HTTP request to the server. This request includes details like the type of content needed, cookies, and other data.
     
  • DNS Resolution: The browser first queries a DNS server to translate the human-readable domain name (like example.com) into an IP address that identifies the server.
     
  • TCP/IP Connection: The browser establishes a connection with the server using the IP address obtained. This connection is usually made through the TCP/IP protocol, ensuring reliable data transfer.
     
  • Sending the Request: Once connected, the browser sends an HTTP request to the server. This request specifies what the browser is asking for, such as an HTML page, an image, or other resources.
     
  • Server Processing: The server processes the request, retrieves the required data, and prepares an HTTP response. This response includes the requested content and status information (e.g., whether the request was successful).
     
  • Receiving the Response: The browser receives the HTTP response from the server. It interprets the content, which could be HTML, CSS, JavaScript, or other resources needed to display the webpage.
     
  • Rendering the Page: The browser then renders the received content into the visual webpage that users see, potentially sending additional requests for resources like images or scripts as needed.
     
  • Closing the Connection: After the data transfer is complete, the browser may close the TCP/IP connection, although it might keep it open for a short period for potential future requests to the same server (known as keep-alive).

This interaction loop happens rapidly, enabling the browser to fetch and display web content seamlessly.

Advantages of the Client-Server model 

  1. Centralization
    The primary benefit of a client-server network is the centralized control it provides. All of the required information is gathered in one spot. This is particularly advantageous for network administrators, who have complete control over management and administration. Any problem that arises throughout the whole network may be resolved in one location. Also as a result of this, upgrading resources and data has gotten a lot easier.
     
  2. Safety and security
    Because of its centralized architecture, the data in a client-server network is effectively safeguarded. It can be enforced with access restrictions, allowing only authorized people access. Imposing credentials such as login and password is one such approach. Furthermore, if the data is lost, the files can be retrieved quickly from a single backup.
     
  3. Scalability
    Client-server networks have a lot of scalabilities. The user can expand the number of resources such as clients and servers as needed. As a result, the server's capacity may be increased without causing significant downtime. Because the server is centralized, there are no concerns regarding authorization to network resources growing in size. As a result, the arrangements require a small number of people.
     
  4. Management
    It is quite simple to handle files because they are all kept on a single server. The optimum management for tracking and finding records of necessary files is in a client-server network.
     
  5. Accessibility
    Every client, regardless of location or platform, is given the option to log into the system. All workers will be able to access their business information without the requirement for a terminal mode or a processor in this manner.

Disadvantages of the Client-Server model

  1. Congestion 
    The most significant drawback of a client-server network is traffic congestion. Too many clients making requests from the same server can cause the connection to fail or slow down. An overburdened server causes several issues with information access.
     
  2. Stability
    Client-server networks, as we all know, are centralized. In the event that the primary server fails or is interfered with, the whole network will be interrupted. As a result, client-server networks are lacking in terms of resilience.
     
  3. Cost
    The cost of setting up and maintaining a server in a client-server network is often higher than the cost of network operations. Because the networks are so strong, they can be costly to acquire. As a result, not every user will be able to afford them.
     
  4. Maintenance 
    It will work nonstop after the servers are built. That is to say, it must be given the attention it deserves. If there are any issues, they must be handled as soon as possible. As a result, the server needs to be maintained by professional network management.
     
  5. Resources
    Not all of the server's resources are available for acquisition. It is not feasible, for example, to print a document straight from the web or to alter any information on the client's hard disc drive.


Must Read Stop and Wait Protocol.

Peer-to-Peer vs Client-server Model

  1. Definition
    A peer-to-peer network is a distributed application architecture in which jobs or workloads are divided among peers. A client-server network is a distributed application framework that consists of resource or service providers (servers) and service requesters (clients). This is the distinction between a peer-to-peer network and a client-server network.
     
  2. Functionality
    Thus, the main difference between peer-to-peer and client-server networks is that, in peer to peer network, each node can request services and provide services. Whereas, in a client-server network, the client requests for service, and the server responds with a service.
     
  3. Type of Network
    Another distinction between a peer-to-peer and a client-server network is that the former is a decentralized network, whilst the latter is a centralized network.
     
  4. Reliability
    In a peer-to-peer network, there are numerous service-providing nodes. As a result, it is more dependable. Clients in a client-server network are reliant on the server. All clients' operations will be disrupted if the server fails. This is a significant distinction between a peer-to-peer network and a client-server network.
     
  5. Time for service access
    Furthermore, because the service-providing nodes are dispersed throughout the peer-to-peer network, the service-requesting node does not have to wait long. In a client-server network, on the other hand, several clients request services from a server. As a result, a service's access time is longer.
     
  6. Cost
    While a client-server network is more expensive to set up, a peer-to-peer network does not require as much gear.
     
  7. Security
    In comparison to a peer-to-peer network, a client-server network is more reliable and secure. Another distinction between a peer-to-peer and a client-server network is this.

 

You can also read about mime protocol and Subnetting in Computer Networks

You can read related articles such as Congestion Control in Computer Networks here.

Frequently Asked Questions

Which layer provides the interface via which client and server application objects communicate? 

The skeleton or stub layer provides the interface via which client and server application objects communicate.

Which is the binary data protocol layer? 

The transport protocol layer is a binary data protocol that transmits requests for distant objects across the wire. Any remote program that talks with these server objects are referred to as a client.

Which object serves as a client-side gateway? 

A stub is a client-side object that functions as a gateway. The stub is used to pass outbound requests.

Which is the server-side object's gateway? 

A skeleton is a server-side object that serves as a gateway. It is where all inbound requests are directed.

Conclusion

In this article, we have studied an introduction to the client-server model, its components, how does client-server model works, what are its examples, and what are its advantages and disadvantages, and a comparison with the peer-to-peer model. 

Recommended Readings:

Check out some of the amazing Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Basics of C, Basics of Java, Computer Networks, etc. along with some Contests and Interview Experiences only on Code360

 

Live masterclass