Overview

The client–server model is a widely used software architecture in which computing responsibilities are divided between clients and servers. A client is a program that requests services or resources, while a server is a program that provides them and waits for incoming requests. Communication typically occurs over a network using standard protocols, though both roles may run on the same physical machine for local testing or single‑seat setups. A client–server application is an instance of a distributed system composed of cooperating client and server software.

Core behavior and roles

In this architecture, the client initiates interactions; it sends requests and consumes responses. The server receives those requests, performs processing or data retrieval, and returns responses. Servers commonly manage shared resources such as databases, files, authentication services or business logic. Clients are often responsible for presentation and user interaction. The initiator/responder pattern helps structure communication and separate concerns between user-facing logic and centralized service logic.

Processes, lifecycle and single‑seat setups

Client and server are typically implemented as separate processes. The client process actively connects to the server and may maintain a session or perform one‑off requests. The server process usually listens on a well‑known address or port and handles incoming requests, often concurrently. When both client and server processes run on the same computer for development or single‑user scenarios, the arrangement is known as a single‑seat setup; it simplifies testing but does not change the conceptual roles.

Protocols, APIs and communication patterns

Communication uses transports such as TCP/IP or UDP and application protocols like HTTP(S), SMTP, FTP or custom RPC protocols. Many modern services expose APIs using REST, GraphQL, gRPC or other RPC-style interfaces. Design choices include synchronous request/response, asynchronous messaging, polling, and push notifications. Caching, compression and content negotiation are common optimizations applied to reduce latency and bandwidth usage.

Stateful vs stateless servers

Servers can be stateful, retaining session information between requests, or stateless, where each request contains all information needed to process it. Stateless services are easier to scale and cache; stateful services can simplify session management and real‑time interactions but often require sticky sessions or external state stores. Architects choose the approach based on consistency, scalability and fault‑tolerance needs.

Scalability, reliability and security

To scale client–server systems, operators add server capacity, use load balancers, or distribute responsibilities across specialized servers (web, application, database, cache). Redundancy, health checks and failover mechanisms improve reliability. Security measures include authentication, authorization, encryption of traffic, input validation and rate limiting. Centralized servers allow more consistent application of security policies and data backups.

Not all distributed systems follow the classic client–server pattern. Peer‑to‑peer networks allow nodes to act as both clients and servers, decentralizing resource sharing. Edge computing moves some server‑side processing closer to clients to reduce latency. Microservices decompose server functionality into many small services that may interact with clients or with each other. Event‑driven and publish/subscribe patterns provide alternatives to direct request/response flows.

Common examples and uses

  • Web browsing: a browser (client) requests web pages from a web server.
  • Email: mail clients retrieve and send messages via mail servers.
  • Databases: applications query database servers for persistent data.
  • File sharing and printing: clients request files or printing services from dedicated servers.

Practical considerations for designers

Designers should consider latency, network reliability, concurrency, data consistency and operational complexity. Effective logging, monitoring and versioning of APIs simplify maintenance. Choosing whether to centralize functionality or distribute it affects deployment, cost and the ability to evolve services independently.

Further reading and resources

  1. Introduction to computer science perspectives
  2. Software architecture models and patterns
  3. Client-side programming guides
  4. Networking basics and protocols
  5. Local development and single-seat configurations
  6. Distributed systems overview
  7. Process and communication patterns

Notable fact: In client–server systems the client initiates a connection and the server waits for requests; this initiator/responder relationship is one of the clearest practical distinctions in networked application design.