Chapter 14: Data and failure

Timeouts and deadlines

Also called Deadline propagation

A timeout limits one call. A deadline limits the whole job: the moment by which the answer stops being any use, handed down through every call that serves it, so nobody keeps working for a user who has gone.

The network chapter said to set a timeout. An agent then sets one per call, each a round number, and retries inside each. The sum can be far longer than anyone will wait, and the work carries on long after the page has given up. Timeouts are a chain, so they have to be set as one.

Say it to your agent

“Set one deadline of 2 seconds at the edge, pass the remaining time down with each call, and stop work once it has passed. Each outbound call uses the smaller of its own limit and what remains. Retry at the top layer only. Log how much time each hop had left.”

The workshop

Name a word, or describe what you mean in everyday language.