Client-Server Architecture
- In Turkish
- İstemci-Sunucu Mimarisi
- Pronunciation
- KLY-unt SUR-ver
In short
Client-server architecture splits a system into clients, which request data or actions, and servers, which provide them, as when a browser requests a page.
What is client-server architecture?
The client is the part the user interacts with: a web browser, a mobile app, a desktop program or another service. The server waits for requests, does the work, such as reading a database, checking permissions or running business logic, and sends back a response. Communication follows a protocol, such as HTTP for the web, SMTP for email or a database's own wire protocol.
Keeping data and rules on the server has big advantages. Everyone sees the same, authoritative data, security checks can't be bypassed by changing client code, and updating the server updates the system for all users at once. Servers can be scaled by adding more of them behind a load balancer, especially when they are stateless and keep session data in a shared store.
The split also lets clients specialize. A thin client, such as a simple web page, leaves almost everything to the server, while a rich client, such as a single-page app or mobile app, handles much of the interface and offline behavior itself and uses the server mainly through an API. Many systems add more tiers, such as a separate database server, which is called three-tier or n-tier architecture.
A common misconception is that client and server must be separate machines. They are roles: a dev server and a browser on the same laptop are still a client and a server, and one program can be a server to its users while acting as a client of a database or another API.
Key takeaways
- Clients send requests; servers do the work and respond.
- Protocols such as HTTP define how they communicate.
- Central servers keep data authoritative and security enforceable.
- Thin clients rely on the server; rich clients do more locally.
- Client and server are roles, not necessarily separate machines.
Readers ask
What is the difference between client-server and peer-to-peer?
In client-server, dedicated servers provide services to many clients. In peer-to-peer, every participant can act as both client and server, sharing resources directly without a central server.
Is the web a client-server system?
Yes. Browsers are clients that request pages and data, and web servers respond over HTTP. Behind them, web servers are often clients of databases and other services.
What is three-tier architecture?
A client-server design with three layers: the presentation tier in the client, an application tier on the server with the business logic, and a data tier with the database.
See also
- Peer-to-PeerSoftware Architecture, p. 32Peer-to-peer (P2P) is a network design in which peers connect and share resources directly, each acting as both client and server, with no central server.
- Web ServerBackend & APIs, p. 46A web server is software, or the machine running it, that accepts HTTP requests from browsers and other clients and responds with pages, files, or data.
- APIBackend & APIs, p. 2An API is a set of rules that lets one piece of software request data or actions from another in a predictable, documented way.
- HTTPWeb Development, p. 19HTTP is the protocol that browsers, apps, and servers use to exchange web pages and data through a simple cycle of requests and responses.
- Layered ArchitectureSoftware Architecture, p. 25Layered architecture splits an application into horizontal layers, such as presentation, business logic, and data access, each calling only the layer below it.
- Load BalancerDevOps & Cloud, p. 34A load balancer is a server or service that spreads incoming traffic across several backend servers so no single one is overloaded and the app stays available.
Spotted a mistake or something missing on this page?Suggest an edit