Client-Server Architecture
1. Definition
Client-server architecture is a computing model in which clients request services and servers provide them. A client (browser, mobile app, desktop program, IoT device) initiates a request; a server (a program running on a dedicated machine) waits for requests, performs the work — database query, file access, computation, authentication — and returns a response. The two roles are asymmetric: the server is centralised, always available and manages shared resources, while clients are many, remote and comparatively simple.
CLIENT 1 (browser) ──request──► ┐
CLIENT 2 (mobile app) ─request─►├──► ┌──────────────────────────────┐
CLIENT 3 (desktop app) request─►┘ │ SERVER │
│ • handles many clients │
┌────── response (data, page, ──► │ • authentication & security │
│ result, error) │ • shared data / database │
└─────────────────────────────────│ • logging, backup, business │
│ logic │
└──────────────────────────────┘
2. Roles and Responsibilities
| Client | Server |
|---|---|
| Starts the communication (active) | Waits and listens (passive) |
| Typically one user, one session | Many concurrent users/sessions |
| Runs the presentation/UI | Holds the data and business logic |
| Sends requests, displays responses | Processes, validates, stores, responds |
| Needs less powerful hardware (thin client) | Needs high CPU, RAM, storage, redundancy |
| Talks through APIs/protocols (HTTP, SQL, RPC) | Uses a DBMS, queues, caches, services |
3. Tiers of Client-Server Systems
| Tier | Structure | Example |
|---|---|---|
| 1-tier | UI + logic + data on one machine | Standalone desktop app with a local file/database |
| 2-tier | Client (UI + logic) talks directly to the database server | Desktop billing/Tally-style app with a shared DB |
| 3-tier | Presentation ↔ application/business logic ↔ data | Web app: browser ↔ app server ↔ database |
| n-tier / multi-tier | Additional layers: web server, load balancer, cache, message queue, API gateway, microservices | Modern cloud e-commerce platforms |
Thin client — only presentation (a browser, a terminal, a low-spec PC); most work happens on the server. Thick/fat client — significant logic and storage on the client (CAD software, games), reducing server load but complicating updates.
4. Types of Servers
File server · print server · web server (Apache, Nginx, IIS) · application server · database server (MySQL, Oracle, SQL Server) · mail server · DNS server · DHCP server · proxy/caching server · authentication server (Active Directory, LDAP, RADIUS) · media/streaming server · game server · backup and virtualisation/cloud servers. Server hardware stresses reliability: ECC memory, RAID storage, redundant power supplies and network links, hot-swap components, UPS and cooling in a data centre — plus clustering and load balancing so one failure does not stop the service.
5. Advantages and Limitations
| Advantages | Limitations |
|---|---|
| Centralised control — data, security policies and backups in one place | Single point of failure — server downtime stops all clients |
| Data consistency — everyone works on the same copy | Server capacity limits the number of clients (bottleneck) |
| Easier maintenance and updates — patch once on the server | Expensive server hardware, software licences, admin staff |
| Resource sharing (files, printers, databases, internet) | Requires a reliable, fast network; congestion hurts everyone |
| Scalability — vertical (bigger server) or horizontal (more servers/load balancing) | Network dependency — no connectivity means no service |
| Security — authentication, authorisation, auditing at one point | A popular target for attacks (DDoS, breach of the central store) |
| Thin clients are cheap and easy to manage | Longer response time than local processing |
6. Client-Server vs Peer-to-Peer
| Basis | Client-server | Peer-to-peer |
|---|---|---|
| Roles | Fixed: server serves, client requests | Equal peers, each both client and server |
| Central control | Yes | No |
| Cost | High server cost, cheaper clients | No server cost — uses existing PCs |
| Security | Strong, centralised | Weak, difficult to control |
| Scalability | Good with more servers, needs planning | Grows naturally but management gets messy |
| Reliability | Server is a single point of failure (unless clustered) | No single point of failure; data spread out |
| Backup/administration | Simple — one place | Difficult — many machines |
| Examples | Web, e-mail, banking, UPI, college ERP, this app's API | BitTorrent, blockchain, direct device file sharing |
Hybrid models dominate in practice: a CDN caches content at the edge, BitTorrent tracks peers through a central tracker, and messaging apps keep central servers for accounts while routing media peer-to-peer.
7. Technologies That Implement It
Protocols: HTTP/HTTPS (web), SQL (database), SMTP/IMAP/POP3 (mail), DNS, DHCP, LDAP (directory), RPC/gRPC, WebSockets (real-time), AMQP/MQTT (messaging/IoT). Patterns: REST/GraphQL APIs, microservices, message queues, caching (Redis), session management, load balancers and reverse proxies, clustering and failover, containerisation (Docker/Kubernetes) and auto-scaling in the cloud. Real examples: a browser and a web server; a UPI app and the bank's server; the PYQDECK app and its API server; WhatsApp clients and Meta's messaging backends.
8. Exam Points
- Define client-server architecture with a diagram; explain the role of each side — 5-7 marks, almost certain.
- Explain 1-tier, 2-tier, 3-tier and n-tier architectures with examples — 5-7 marks, very frequent.
- Differentiate client-server and peer-to-peer networks — 5 marks, almost certain.
- Advantages and disadvantages of client-server architecture — 5 marks, frequent.
- What is a thin client and a thick client? — 3 marks.
- List any five types of servers with their purpose — 5 marks.
- How do load balancing and clustering improve a client-server system? — 3-5 marks.