How Services Work Together
Learn the basic language of requests, capacity, and failure.
system design, services, latency, availabilityA 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
- The browser sends a timetable request to the service.
- The service reads the timetable from a database.
- 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
- BrowserRequests timetableCurrent focus
- ServiceWaiting
- 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.
