frameworkEngineering & architecture

Client and Server

An interaction model in which a client initiates requests for capabilities or resources that a server provides across a defined boundary.

Download Markdown (.md)

01What it means

The client-server model separates a service requester from a service provider. A client initiates an interaction, while a server listens for and handles requests according to a protocol. These are roles within an interaction, not fixed device types: one system can be a server to one participant and a client of another.[1][2]

Interaction roles The client initiates; the server handles the request
  1. ClientInitiates request
  2. ProtocolContract and trust boundary
  3. ServerProcesses and responds

Response or error

Client and server describe roles at a boundary. A service can be a server in one interaction and a client in the next.

02Why it matters

The separation lets user-facing software, services, and shared resources evolve and operate behind explicit boundaries. It clarifies ownership, trust, deployment, scaling, latency, and failure assumptions across browsers, mobile apps, APIs, databases, and distributed systems.

03When to use it

Use the model when multiple consumers need a centralized or network-accessible capability with a defined interface. Local processing, peer-to-peer exchange, or event-driven collaboration may fit better when central coordination, synchronous access, or a persistent provider is undesirable.

04How it works

  1. Define the capability, protocol, address, contract, and trust boundary exposed by the server.
  2. The client discovers or is configured with the server location and establishes communication as needed.
  3. The client sends a request containing the operation, data, and credentials required by the contract.
  4. The server authenticates, authorizes, processes the request, and returns a result or error.
  5. Both sides handle latency, timeouts, retries, compatibility, and partial failure at the boundary.

05A practical example

Example

A mobile banking app acts as a client of an account service. That account service acts as a client when it requests fraud scoring from another server. Each boundary has separate authentication, timeout, response, and compatibility rules.

06Where it breaks

Central servers can become bottlenecks or failure targets, network boundaries add latency and uncertainty, and clients depend on server availability and compatible contracts. The model alone does not determine deployment topology, data ownership, security, or user-interface architecture.

Common mistakes

  • Treating client and server as permanent machine types rather than roles in an interaction.
  • Assuming the client is trusted because it is an official browser or mobile application.
  • Designing as if network calls are local, instantaneous, and guaranteed to complete once.
  • Confusing client-server roles with the separate frontend-backend division of responsibilities.

07Sources

  1. ServerMDN Web Docs · Official technical documentationServer
  2. HTTP Semantics (RFC 9110)RFC Editor · Internet StandardHTTP Semantics (RFC 9110)
View saved topics

Start typing to search titles, definitions, categories, and frameworks.