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.