Client-server architecture
Client-server architecture is a model of distributing tasks in a network where some devices (clients) request services, while others (servers) perform them, providing the necessary resources, data or computing power. This is the basis of the internet, websites, mobile applications and corporate systems.
Contents
What is client-server architecture in simple words
Client-server architecture is a model of interaction in a computer network where tasks are distributed between two main components: the client and the server. The client is a program or device that requests a service or resource (for example, a browser on your computer). The server is a powerful computer or program that waits for requests, processes them and sends the response back.
Imagine a restaurant. The client is you, the visitor. You look at the menu (the interface) and place an order (a request). The server is the kitchen where your dish is prepared (data is processed). The waiter is the network connection that passes the order to the kitchen and brings the finished dish back. This is how the internet works too: your browser requests a page, the server generates it and sends it back.
Read about how the infrastructure of web applications works in the article Web server.
Main components of the architecture
- Client: An interface or device (browser, mobile application, desktop program) that sends requests and displays results.
- Server: A powerful computer or program that processes requests, executes business logic and accesses databases.
- Network: The connecting link through which the client and server communicate using special protocols (HTTP, HTTPS, TCP/IP, WebSocket).
- Database: A storage where all records, passwords, goods or media files are saved.
Read about network protocols in the article Cryptographic protocol.
Architecture levels
- Two-tier (client — server): The client directly addresses the server, which itself processes data and interacts with the database. A simple model for small systems.
- Three-tier (client — application server — database server): The business logic is moved to a separate application server. A popular pattern for complex corporate systems (for example, 1C:Enterprise).
- Multi-tier (N-tier): Additional levels — caching, message queues, integration services. Provides maximum flexibility and scalability.
Read about corporate systems in the article 1C:Enterprise.
How the interaction works
- The user performs an action in the client application (for example, clicks the “Buy” button).
- The client forms a request and sends it to the server over the network.
- The server accepts the request, checks access rights and executes the business logic.
- The server accesses the database to retrieve or modify information.
- The server forms a response and sends it to the client.
- The client displays the result to the user.
Where client-server architecture is used
- Websites and web applications: A browser (client) requests pages from a web server.
- Mobile applications: An application on a smartphone (client) sends requests to the server for updating the feed, transferring money, searching for goods.
- Online games: The game on the device is responsible for graphics and control, while the server is responsible for player synchronization and physics calculations.
- Corporate systems: 1C, SAP, CRM — they work on the client-server model.
- Cloud services: All cloud applications work on this model.
Advantages and disadvantages
Advantages:
- Centralization: All data is stored on a protected server; it is easy to update and back up.
- Security: Access to critical information is controlled centrally.
- Versatility: Millions of different clients (smartphones, PCs, tablets) can work from one server.
- Scalability: The server's power can be increased as the load grows.
Disadvantages:
- Single point of failure: If the server goes down, the system becomes unavailable for all clients.
- Network dependence: With a poor internet connection, the system slows down.
- Server load: With a large number of requests, the server can become overloaded.
Read about load distribution in the article Server cluster.
Frequently asked questions
What is client-server architecture in simple words?
This is a model where a client (your browser or application) requests data, and a server processes it and returns it. Like an order in a restaurant: you (the client) place an order, the kitchen (the server) prepares and serves the dish. Read about how servers work in the article Web server.
How does client-server architecture differ from file-server?
In a file-server model, files are stored on a server and clients open and process them themselves (for example, shared access to documents). In a client-server model, the client only sends requests, and all processing is done by the server. This is safer and more efficient for complex systems. Read about databases in the article DBMS.
What levels of client-server architecture are there?
Two-tier — the client directly accesses the DB server. Three-tier — an application server with business logic stands between the client and the DB. Multi-tier — caching, queues and integration services are added. Read about corporate systems in the article 1C:Enterprise.
What are the advantages of client-server architecture?
Centralized data storage, high security, ease of scaling, backup and updates. Clients do not store data, so if a device breaks, the information will not be lost. Read about data protection in the article Data backup.
What are the disadvantages of client-server architecture?
A single point of failure — if the server goes down, the system is unavailable. Dependence on network quality. High load on the server with a large number of users. To solve these problems, clustering and load balancing are used. Read about clusters in the article Server cluster.
Other terms in «Infrastructure»
Was this information helpful?
Build reliable IT infrastructure
Build a modern, fault-tolerant IT infrastructure. Design, equipment supply, installation and maintenance turnkey.