Reading preferences
Concept

How Services Work Together

Learn the basic language of requests, capacity, and failure.

system design, services, latency, availability

A familiar request

Imagine a student opening a school portal to see a timetable. The browser is the client: it asks for information. A service is a program that receives the request, finds the timetable, and sends a response. The network carries messages between them; the service might also ask a database for data.

Follow a request

  1. The browser sends a timetable request to the service.
  2. The service reads the timetable from a database.
  3. The service returns the result. If the database cannot respond, the service may instead return an error or a clearly labelled older copy.

See the reasoning

Follow a timetable request

See which participant acts at each stage. This is a prepared demonstration, not live code execution.

Ask

A request and response
  1. BrowserRequests timetableCurrent focus
  2. ServiceWaiting
  3. DatabaseStores timetable

The browser is the client that starts the request.

Measurements and trade-offs

Latency is how long one request takes. Throughput is work handled per unit of time, such as requests per second. A system can have high throughput and still make some requests wait a long time. Look at a distribution of latencies, not only an average.

Availability describes how often the service delivers a defined useful response over a period. Define what counts as success and which requests are measured before comparing percentages. Networks, servers, and dependencies can fail independently or together. Extra copies can help, but shared failures, cost, stale data and operational complexity remain. The remaining lessons use hypothetical systems to explore choices, not guaranteed recipes.

Reflect on the concept

Four fixed questions to reinforce the reasoning. Answers are not saved or scored.

1. What does a client do in a request?
2. What is request latency?
3. What can throughput describe?
4. Does adding a second service automatically eliminate failure?

References and further reading