# Client and Server

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

- Type: framework
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-23
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/client-and-server/>)

## What 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.

## Why 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.

## When 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.

## How 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.

## A practical 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.

## Where 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.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/client-and-server/#visualization-client-and-server>)

## Sources

1. [Server](<https://developer.mozilla.org/en-US/docs/Glossary/Server>) — MDN Web Docs · Official technical documentation
2. [HTTP Semantics \(RFC 9110\)](<https://www.rfc-editor.org/rfc/rfc9110>) — RFC Editor · Internet Standard

## Related topics

- [Request and Response](<https://wiki.soroush.uk/topic/request-and-response/>)
- [HTTP](<https://wiki.soroush.uk/topic/http/>)
- [WebSocket](<https://wiki.soroush.uk/topic/websocket/>)
