The Wayback Machine - https://web.archive.org/web/20240917102206/https://www.geeksforgeeks.org/client-server-model/
Open In App

Client-Server Model

Last Updated : 19 Apr, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The Client-server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters called clients. In the client-server architecture, when the client computer sends a request for data to the server through the internet, the server accepts the requested process and delivers the data packets requested back to the client. Clients do not share any of their resources. Examples of the Client-Server Model are Email, World Wide Web, etc.

How Does the Client-Server Model Work?

In this article, we are going to take a dive into the Client-Server model and have a look at how the Internet works via, web browsers. This article will help us have a solid WEB foundation and help us easily work with WEB technologies.

  • Client: When we say the word Client, it means to talk of a person or an organization using a particular service. Similarly in the digital world, a Client is a computer (Host) i.e. capable of receiving information or using a particular service from the service providers (Servers).
  • Servers: Similarly, when we talk about the word Servers, It means a person or medium that serves something. Similarly in this digital world, a Server is a remote computer that provides information (data) or access to particular services.

So, it is the Client requesting something and the Server serving it as long as it is in the database.

Client-Server-Model

Client Server Model

How the Browser Interacts With the Servers?

There are a few steps to follow to interacts with the servers of a client.

  • User enters the URL(Uniform Resource Locator) of the website or file. The Browser then requests the DNS(DOMAIN NAME SYSTEM) Server.
  • DNS Server lookup for the address of the WEB Server.
  • The DNS Server responds with the IP address of the WEB Server.
  • The Browser sends over an HTTP/HTTPS request to the WEB Server’s IP (provided by the DNS server).
  • The Server sends over the necessary files for the website.
  • The Browser then renders the files and the website is displayed. This rendering is done with the help of DOM (Document Object Model) interpreter, CSS interpreter, and JS Engine collectively known as the JIT or (Just in Time) Compilers.
Client-Server-Model

Client Server Request and Response

Advantages of Client-Server Model

  • Centralized system with all data in a single place.
  • Cost efficient requires less maintenance cost and Data recovery is possible.
  • The capacity of the Client and Servers can be changed separately.

Disadvantages of Client-Server Model

  • Clients are prone to viruses, Trojans, and worms if present in the Server or uploaded into the Server.
  • Servers are prone to Denial of Service (DOS) attacks.
  • Data packets may be spoofed or modified during transmission.
  • Phishing or capturing login credentials or other useful information of the user are common and MITM(Man in the Middle) attacks are common.

Conclusion

The client-server architecture consolidates resources on servers for greater control and security, allows for flexible client options, and relies on a robust network for scalability and efficiency. While there are cost implications, the client-server model remains fundamental and has been shaped by trends such as cloud computing.


Previous Article
Next Article

Similar Reads

Server Side Rendering vs Client Side Rendering vs Server Side Generation
In the world of web development, there are several approaches to rendering web pages: server-side rendering, client-side rendering, and server-side generation. Each approach has its own advantages and disadvantages, and choosing the right one for your project depends on your specific needs and goals. In this blog, we’ll explore the differences betw
4 min read
Difference between Server-Side AJAX framework and Client-side AJAX framework ?
The article focuses on discussing the differences between the Server-side AJAX framework and the Client-side AJAX framework. The following topics will be discussed here: What is a Server-side AJAX framework?What is a Client-side AJAX framework?Server-side AJAX framework vs Client-side AJAX framework Let's start discussing each of these topics in de
3 min read
Server side and Client side Programming
Server-side Programming : It is the program that runs on server dealing with the generation of content of web page. 1) Querying the database 2) Operations over databases 3) Access/Write a file on server. 4) Interact with other servers. 5) Structure web applications. 6) Process user input. For example if user input is a text in search box, run a sea
2 min read
How does SSR(Server-Side Rendering) differ from CSR(client-side rendering) ?
Server-Side Rendering (SSR) and Client-Side Rendering (CSR) are two different approaches used in web development to render web pages to users. Each approach has its own set of advantages and disadvantages. In this article, we will learn about the difference between SSR and CSR with examples and features. Table of Content Server-Side Rendering (SSR)
4 min read
Detecting server vs client in NextJS application
Next.js, a popular React framework, helps you to build powerful web applications with ease. However, managing server-side and client-side execution can pose unique challenges. In this article, we'll explore techniques for detecting server or client execution in Next.js applications. Table of Content What is Server Side Rendering?What is Client Side
5 min read
How to Send Response From Server to Client using Node.js and Express.js ?
In web development, sending responses from the server to the client is a fundamental aspect of building interactive and dynamic applications. Express.js, a popular framework for Node.js, simplifies this process, making it easy to send various types of responses such as HTML, JSON, files, and more. This article will guide you through the process of
4 min read
Server-side Caching and Client-side Caching
Caching is a temporary technique that stores frequently accessed data for faster retrieval. There are two main types of caching in web development: server-side caching and client-side caching. Server-side caching stores data on the server to reduce load times and server strain. Client-side caching stores data on the user's device, improving speed a
8 min read
Client-Server Architecture - System Design
Client-server architecture is a fundamental concept in system design where a network involves multiple clients and a server. Clients are devices or programs that request services or resources, while the server is a powerful machine providing these resources or services. This architecture allows efficient data management and resource sharing, making
12 min read
Proper way to use Server Component Inside a Client Component in Next.js
Next.js, a popular React framework, helps to build powerful web applications with ease. One of its standout features is the ability to seamlessly integrate server-side logic alongside client-side components. This allows for dynamic content rendering, efficient data fetching, and enhanced user experiences. In this article, we'll explore how to use s
5 min read
How to send data from client side to Node.js server using Ajax without page reloading ?
In this article, we are learning about how can we send data to a node server using Ajax without reloading the page from the client-side. Approach: We are creating a button in HTML document on the client-side when the button is pressed a request is made on our node server and the object is received at our server without reloading the page. This can
2 min read
Server vs. Client Code Execution in Remix
For effective web development, the difference between server-side and client-side code execution is fundamental in Remix. Such actions as data retrieval and preparation go on behind the scenes before even the user realizes the page is loading, thus fast loading times. On the other hand, client-side code deals with active components that are impleme
7 min read
Difference between Bottom-Up Model and Top-Down Model
Top-Down Design Model: In the top-down model, an overview of the system is formulated without going into detail for any part of it. Each part of it then refined into more details, defining it in yet more details until the entire specification is detailed enough to validate the model. if we glance at a haul as a full, it's going to appear not possib
3 min read
Mongoose Document Model.prototype.model() API
The Mongoose Document API Model.prototype.model() method of the Mongoose API is used on the Document model. It allows to get the model instance. We can call this method on any model object and by providing another model name to the method parameter we will get the new instance of that model. Let us understand the model() method using an example. Sy
3 min read
Introduction to Model View View Model (MVVM)
Description of Model is as follows: MODEL: ( Reusable Code – DATA ) Business Objects that encapsulate data and behavior of application domain, Simply hold the data. VIEW: ( Platform Specific Code - USER INTERFACE ) What the user sees, The Formatted data. VIEWMODEL: ( Reusable Code – LOGIC ) Link between Model and View OR It Retrieves data from Mode
3 min read
PHP | Determining Client IP Address
What is an IP Address? The IP address stands for Internet Protocol Address. An IP address is used to provide an identity to a networked device.IP addresses allow the location of different digital devices that are connected to the Internet to be pinpointed and differentiated from other devices. In this post we have discussed two different ways of de
2 min read
How to define a client-side script in HTML5 ?
To define a client-side script in HTML5, we can do <script> tag or adding external script file by src attribute to the HTML file. <script> tag contains the JavaScript to be added for the client-side scripting. Syntax: <script> // JavaScript goes here console.log('GeeksforGeeks'); </script> Below are the examples for the abov
1 min read
How to get the client timezone offset in JavaScript?
The client's timezone offset could be detected by using the Date object's getTimezoneOffset() method. The getTimezoneOffset() method returns the time difference between UTC time and local time, that is the time offset, in minutes. This offset is changed by dividing by 60 and negating the result. Note: The getTimezoneOffset() does not account for Da
1 min read
How to detect operating system on the client machine using JavaScript ?
To detect the operating system on the client machine, one can simply use navigator.appVersion or navigator.userAgent property. The Navigator appVersion property is a read-only property and it returns a string that represents the version information of the browser. Syntax navigator.appVersion Example 1: This example uses the navigator.appVersion pro
2 min read
How to create a client-side image-map in HTML5 ?
In this article, we will create a client-side image map by using an <img> tag. The <img> tag is used to add images on a webpage. This tag is an empty tag which means it can contain only a list of attributes and it has no closing tag. Syntax: <img src="url" alt="some_text" usemap="#mapname"> Example: <!DOCTYPE html> <html
1 min read
What is Client-Side Filter Bypass?
Many websites lack client-side filter checks, so it becomes easy to bypass that. But, our bypass will only be successful if there is no server-side filter check either. First, let's dig a little bit about the client-side filter bypass. Client-Side FilterThese filters ensure that the input given by the user is in the correct format. Basically, this
2 min read
How to set alternate content for users that do not support client-side scripts ?
In this article, we define an alternate content for users that do not support client-side scripts by using <noscript> tag in the HTML document. It is used to display the text for those browsers that does not support script tag or the browsers disable the script for the user. Syntax: <noscript> Contents... </noscript> Example: <
1 min read
HTTP status codes | Client Error Responses
The browser and the site server have a conversation in the form of HTTP status codes. The server gives responses to the browser’s request in the form of a three-digit code known as HTTP status codes. The categorization of HTTP status codes is done in five sections which are listed below. Informational responses (100–199)Successful responses (200–29
4 min read
How to Receive JSON Data at the Client Side ?
For sending and receiving data to or from the server JSON format is used. JSON stands for Javascript Object Notation and it is a widely used format nowadays because of its advantages and simplicity. In this article, we will use XML HttpRequest to receive data from the server and use NodeJS for the backend for sending JSON data. Example: The below e
2 min read
What is the mechanism to store the data on the client's browser in HTML ?
Server-side storage stores data on the server (i.e. an external database) and client-side storage allow the user to store data on the client (i.e. user's browser). client-side storage consists of JavaScript APIs that allow you to store data on the client i.e. on the user's machine and then retrieve it when it is needed. This has many different uses
4 min read
How to Generate/Send JSON Data at the Client Side ?
Javascript Object Notation (JSON) is a widely used format for sending and receiving data to or from the server. In this article, we will use fetch API to send and receive data from the NodeJS server. Advantages of JSON: Because of its easy and small syntax, it executes the response in a faster way.It is supported by a wide range of browsers.Parsing
3 min read
Redis - Client Connection
Redis Client Connection plays a pivotal role in enabling data transmission, retrieval, and manipulation, making it a fundamental aspect of leveraging Redis's capabilities. In this comprehensive guide, we delve into the intricacies of the Redis Client Connection, offering a detailed exploration of its syntax, essential commands, and practical exampl
3 min read
Passing an object to Client in Node/Express.js with EJS Templating Engine
EJS stands for Embedded JavaScript. It is a templating language used to generate dynamic HTML pages with data from the server by embedding JavaScript code. This article provides a detailed explanation of the process of passing objects from a Node.js/Express server to clients using the EJS templating engine. It guides us through setting up a basic E
3 min read
Implementing GraphQL Queries using React Hooks & Apollo Client
Implementing GraphQL queries with React Hooks and Apollo Client involves setting up Apollo Client in your React application, defining GraphQL queries using useQuery hook, and accessing data from the GraphQL API in a declarative way. With Apollo Client, React Hooks like useQuery simplifies the process of fetching and managing data from a GraphQL ser
3 min read
How to get a component when client does not fetches the data from API ?
When constructing a React application, incorporating data from an API is standard practice for dynamic content display. Yet, there are instances where the data isn't immediately accessible during the initial component rendering. It becomes crucial to adeptly manage situations where data retrieval is pending, ensuring a seamless user experience by p
3 min read
Consuming a GraphQL API using fetch - React Client
In this article, we will learn to develop a React application, which will fetch the data from a public GraphQL API using Fetch. We will use The Movie Database Wrapper ( TMDB ) API to fetch the shows available with name/keyword. You can find the API reference and source code links at the end of this article. Before moving onto the development part,
5 min read