liveBook · Manning

Request-response pattern

As explained in Microservices Patterns, Second Edition

An interaction style in which a client sends a request and waits for a timely response.

Request–response is a one-to-one interaction in which a client sends a request to a service and expects a timely reply, potentially blocking while it waits. This wait creates tighter runtime coupling between services. section 8.1.1

Treat it as an interaction style, not a transport choice: REST or messaging can carry it. Messaging is inherently asynchronous, but a client can block for a reply; in practice, replies are processed asynchronously. section 8.1.1 section 8.3.2

Distinguish nearby styles by what the client expects:

  • Asynchronous request–response sends a request without expecting an immediate reply, so the client does not block while waiting. section 8.1.1
  • One-way notification sends a request without expecting or receiving a reply. section 8.1.1
Table 8.1 The various interaction styles can be characterized in two dimensions: one-to-one vs one-to-many and synchronous vs. asynchronous

one-to-one

one-to-many

Synchronous

Request/response

-

Asynchronous

Asynchronous request/response

One-way notifications

Publish/subscribe

Publish/Async responses

Use the two dimensions—one-to-one versus one-to-many, and synchronous versus asynchronous—to place request–response among other interaction styles. section 8.1.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines the client’s wait for a timely reply and contrasts nearby styles, without specifying implementation steps.
What you can do after
Evaluate interaction styles by reply timing and recognize that messaging does not eliminate blocking or runtime coupling.
How it connects
Connects request–response with asynchronous request/response, one-way notifications, REST, and messaging.

Also explained in

Compare how 5 books explain request-response pattern →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.