Repository navigation
Conversation
…er main (MAG-4923) The "Primary and backup nodes" page was written against smart-router c17c2cce (v1.6.5). Since then #578 changed pins, #587 changed failed replies, #671 kept the headers on a reply no node answered, and #675 and #670 fixed two of the page's known issues. backup.md: - A plain lava-select-provider covers the first attempt only. Its retry or hedge can reach a backup. With lava-select-provider-strict: true, and for a sticky request, the named node answers or the request fails, with no Lava-Retries header. - Sticky sessions: a node error or a busy node fails the request and the session keeps its node. Remove the MAG-4731 known issue (#670). - What the caller gets: a node's answer goes back as is (status, body, Content-Type). All 429 is the node's 429, not 503. A budget that ends is 504 "no answer from upstream within <budget>", not 500. A write every node answered gets the node's status. Failed replies carry the Lava-* headers; only a request that reached no node has none. - The archive warning: lava-extension: archive now gets Lava-Extension-Unavailable when the archive node is out of rotation, and that reply is not cached (MAG-4729, #675). directives.md: - The pin's "when to use" and "unreachable node" lines: a plain pin is retried on another node. - A pinned write refused with 429 is sent to the other nodes; a sticky or strict one gets the 429. - Response headers: failed replies carry them. Lava-Provider-Address lists the nodes asked when none answered. Lava-Retries is absent on a write and on a sticky or strict request. Lava-Extension-Unavailable also covers an extension no node could serve for this request. Checked against smart-router main 10c1db19 (v1.6.8-36) with a real router boot against the provider simulator (2 or 3 primaries, 1 backup): every table row, the pin and sticky cases and the archive case were sent live. The --shared-state and busy-node cases come from the code and the router's tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira ticket: MAG-4923
The "Primary and backup nodes" page (#81) was checked against smart-router
c17c2cce(v1.6.5). Since then, smart-router #578 (pins), #587 (failed replies), #671 (headers on a no-answer reply), #675 (MAG-4729) and #670 (MAG-4731) changed what it describes. This PR brings the page, and the matching lines ofapi/directives.md, back in line with router main10c1db19(v1.6.8-36).configuration/failover/backup.mdlava-select-providercovers the first attempt only. Its retry or hedge goes through normal selection and can reach a backup. Withlava-select-provider-strict: true, and on a sticky request, the named node answers or the request fails, with noLava-Retriesheader (504if it stays silent). The "when a backup gets traffic" row says the same.Content-Type.429returns the node's429(was503).504 no answer from upstream within <budget>(was500 context deadline exceeded).500names its causes.Lava-*headers. Only a request that reached no node has none.lava-extension: archivenow getsLava-Extension-Unavailable: archivewhen the only archive node is out of rotation, and that reply is not cached (MAG-4729).api/directives.md429from the pinned node sends a plain-pinned write to the other nodes. A sticky or strict write gets the429.Lava-Provider-Address(lists the nodes asked when none answered),Lava-Retries(absent on a write and on a sticky or strict request), andLava-Extension-Unavailable(also an extension no node could serve for this request).How it was checked
A real router boot of main
10c1db19against the provider simulator: 2 primaries and 1 backup, plus a 3-primary run for the pinned-write case. Every row of the failure table, the pin cases (backup, unknown, blocked, plain, strict, strict and silent), sticky with blocked primaries and recovery, and the archive backup down at boot were sent live, and the status, body and headers were read off the reply. The--shared-stateand busy-node cases come from the code and the router's tests (TestVerify_B_SharedClaimAllPrimariesBlocked,TestStickyPodLocal_BusyProviderFailsRatherThanMoving,TestSharedSticky_NoPrimaryToClaimServesFromBackupUnpinned). REST and Tendermint come fromTestFailedRelayReply_EndToEnd_MAG4481.mkdocs build --strictpasses.Other open docs PRs on the same lines
lava-select-provider-strictsection todirectives.md. This PR names the header but links to#pin-to-a-specific-node. Once docs(stickiness): sticky requests are strict, lava-select-provider keeps failover, lava-select-provider-strict opts in (MAG-2280, MAG-4123, MAG-4826) #77 lands, the link can point to#require-the-named-node. docs(stickiness): sticky requests are strict, lava-select-provider keeps failover, lava-select-provider-strict opts in (MAG-2280, MAG-4123, MAG-4826) #77 says "Lava-Retries: 0" in four places. The client gets noLava-Retriesheader at all.backup.md. No overlap.Lava-Retriesrow. Whichever merges second rebases.🤖 Generated with Claude Code