← Lessons

quiz vs the machine

Silver1080

Networking

The Request Response Cycle

The basic round trip that carries a client question to a server and back.

4 min read · intro · beat Silver to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. What does a status code in a response communicate?

2. Why do designers try to reduce the number of request response cycles?