The cycle step by step
The request response cycle is the heartbeat of most networked applications. A client sends a request describing what it wants, the server processes it, and the server returns a response with the result or an error. The cycle is usually synchronous from the client view: it waits for the answer before continuing.
Parts of each message
- A request carries a method or verb, a target identifier, headers with metadata, and an optional body.
- A response carries a status code, headers, and an optional body with the payload.
- Headers describe content type, length, authentication, and caching hints.
- The status code tells the client whether the request succeeded, failed, or needs follow up.
One cycle equals one round trip, and the time it takes is dominated by network latency plus server work. Designers reduce the number of cycles by batching requests or caching responses, because each extra round trip adds delay that the user feels directly. Pipelining and connection reuse also cut the cost of repeated cycles.
Key idea
The request response cycle is a single round trip where a client sends a structured request and the server returns a status and body, and cutting the number of cycles is a core way to reduce perceived latency.