liveBook · Manning

Latency

As explained in Microservices Patterns, Second Edition

Latency is the elapsed time between initiating an operation and receiving its result or response.

Latency measures elapsed time in a request or data flow. A synchronously coupled endpoint waits for each dependent service, so its response time accumulates their response times. section 4.4.1

Order creation

When the Order Service handles POST /orders, it waits for the Customer Service to validate the customer and reserve credit. The endpoint’s response time is the sum of both services’ response times. section 4.4.1

In CQRS, end-to-end latency is the time from a provider service committing a change until a view reflects it. This delay can leave a query returning stale data after an update. section 13.2.3

Figure 4.12 The Order Service cannot respond to the POST /orders request until the Customer Service has responded to the PUT /customers/{id} request. As a result, the availability of the POST /orders request is the product of the availability of the Order Service and the Customer Service
runtime coupling

Shows the Order Service waiting for the Customer Service, illustrating how a synchronous dependency adds to endpoint response time. section 4.4.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines response time as a sum across services and end-to-end latency as a commit-to-view interval, without prescribing measurement procedures.
Examples
Uses order creation’s customer-validation request and CQRS event propagation to views as examples.
What you can do after
Evaluate how synchronous service calls add response time and how CQRS view delays can expose stale data.
How it connects
Connects latency to runtime coupling, availability, CQRS, and eventual consistency.

Also explained in

Compare how 12 books explain latency →

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.