Skip to content

docs(api): lava-relay-timeout is bounded between 300ms and the call's own budget (MAG-3600) - #62

Merged
AnnaR-prog merged 1 commit into
mainfrom
docs/mag-3600-relay-timeout-bounds
Oct 7, 2026
Merged

AnnaR-prog merged 1 commit into
mainfrom
docs/mag-3600-relay-timeout-bounds

Conversation

@avitenzer

Copy link
Copy Markdown
Contributor

Jira ticket: MAG-3600

Router change: Magma-Devs/smart-router#427. Merge after it (and after #54, which this stacks on), since until #427 ships the header is still used as sent.

What changes

  • docs/api/directives.md, "Override the per-attempt timeout": the "used verbatim" promise is gone. The section now gives the bounds:

    • a zero, negative or unparseable value is ignored (from docs(api): a zero or negative lava-relay-timeout is ignored (MAG-3988) #54);
    • a value under 300ms becomes 300ms. That is still below --min-relay-timeout, so a client can still hedge sooner than the floor;
    • a value above the request's own budget (the budget it gets with no header) is held to that budget, unless the operator sets --max-caller-relay-timeout.

    A value at or above that budget turns hedging off for the request. "When to use" no longer recommends the header for pushing slow methods past their budget.

  • docs/api/directives.md, "Response headers": new row for Lava-Relay-Timeout-Applied, the per-attempt timeout the router actually used. It is sent only when the request carried lava-relay-timeout.

  • docs/configuration/failover/timeout.md: the header-override section becomes a table of value → timeout used, plus the own-budget definition, the hedging trade-off and the reply header. The heavy debug_* tuning row now points to --max-caller-relay-timeout for anything beyond the method's budget. The "100ms yields 100ms" pitfall now says 300ms, and a new pitfall covers a value above the budget.

  • docs/reference/cli.md: new row for --max-caller-relay-timeout (default 0: callers cannot extend a request's budget).

retry.md and failover/index.md mention the header only in general terms and stay correct. mkdocs build --strict passes locally (built with the repo's requirements.txt).

🤖 Generated with Claude Code

@AnnaR-prog
AnnaR-prog changed the base branch from docs/mag-3988-relay-timeout-non-positive to main October 7, 2026 11:17
… own budget (MAG-3600)

smart-router#427 stops using the lava-relay-timeout header verbatim. A
value under 300ms is raised to 300ms (still below --min-relay-timeout, so
callers can hedge sooner than the floor), and a value above the
request's own budget, the budget it gets with no header, is held to that
budget unless the operator sets the new --max-caller-relay-timeout. A
value at or above the own budget turns hedging off for that request.
The reply carries Lava-Relay-Timeout-Applied with the window used.

directives.md and failover/timeout.md promised "verbatim" and that 100ms
yields 100ms; both now describe the bounds, the hedging trade-off and the
reply header. cli.md gains the new flag. retry.md and failover/index.md
mention the header only generically and stay correct.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants