Ch. 10 · Microservices

Microservice Deadlines Across Call Chains

Microservice Deadlines Across Call Chains. Learn the reasoning, a practical example, common mistakes and an interview exercise.

~2 min readintermediateupdated Oct 3, 2026

A deadline represents the remaining usefulness of work. Propagating it prevents downstream tasks from continuing long after the caller has stopped waiting.

Before you start

You should understand HTTP, database transactions and the difference between one process and independently failing services. Draw the participants and message direction before choosing a pattern. Include timeout, duplicate delivery and recovery in the model instead of considering only successful requests.

The practical goal is to reason through this situation: An upstream request with 800ms remaining should not start a downstream five-second operation. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.

Step-by-step walkthrough

Step 1: Start with useful lifetime

Determine the latest point at which the result can help the caller.

Step 2: Allocate remaining budget

Reserve time for local work and response handling before downstream calls.

Step 3: Cancel obsolete work

Propagate expiry and stop owned tasks where supported.

Worked scenario

An upstream request with 800ms remaining should not start a downstream five-second operation.

A request has 800ms left after authentication. Giving a downstream call a fresh five-second timeout allows useless work after the user has already received failure. Pass a remaining-time budget and avoid starting work when insufficient time remains for a meaningful result.

Common mistake

Independent full-length timeouts can accumulate beyond the user’s deadline.

Verify the behavior

Delay each stage and measure total duration plus downstream cleanup after expiry.

Interview exercise

Budget a multi-call request.

Answer and reasoning

Reserve time for local work and response handling, pass remaining time and cancel owned tasks when no useful budget remains.

Continue learning

Compare the scenario with the Microservices interview questions and test your understanding with the Microservices MCQs. For terminology and implementation details, consult the reference material.

More in Microservices

read ✓Microservices · hard

Microservices Anti-Corruption Layer

Protect a service's domain model from a foreign or legacy model with a translation layer at the boundary.

~2 min readread →
read ✓Microservices · hard

Microservices API Versioning and Evolution

Evolve service APIs without breaking consumers using additive changes, explicit versioning and consumer-driven contracts.

~2 min readread →
read ✓Microservices · hard

Microservices Backend for Frontend

Use a per-client BFF to aggregate services and shape responses, without letting it become a shared god service.

~2 min readread →
esc