docs(architecture): design for durable multi-instance approuter static serving - #1642
Merged
Merged
Conversation
…c serving POST /admin/rebuild mutates only the one approuter instance the CF router hits, and the push is ephemeral (a restart reverts to droplet static). With instances>1 (autoscaler) the fleet serves a mix of old/new static until the next full deploy. This design doc frames the problem, constraints (no object store; approuter binds srv-api + HANA + WS already exist), and options: A) instance-targeted fan-out (interim), B) CAP/HANA-backed versioned bundle + approuter self-sync (recommended), C) object store (needs entitlement), D) eliminate runtime push (rejected). Recommends B, phased. For review.
jung-thomas
marked this pull request as ready for review
August 11, 2026 11:18
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.
Design proposal — durable multi-instance approuter static serving
Follow-up to the 2026-08-10/11 stale-static incident (root cause fixed in #1628; runtime-push guard added in #1641). This PR is a design doc only (no code) for the deeper architectural gap you asked to address.
The gap
POST /admin/rebuild(approuter/server.js:373-374) atomically swaps the localstatic/on only the one instance the CF router hits, and the push is ephemeral — acf restartre-extracts the droplet and discards it. So withinstances > 1(autoscaler), the fleet serves a mix of old/new static until the next full deploy, and autoscaled-up instances start from the (possibly stale) droplet. Key finding: "restart after rebuild" is a recovery tool, not a propagation mechanism.Options (full detail in the doc)
X-Cf-App-Instance): interim, contained; doesn't survive restart/scale-up.srv-apibinding +/ws/*; no new entitlement.Recommendation
Phased: Phase 0 done (#1628 + #1641) → Phase 1 optional fan-out → Phase 2 Option B.
Open questions for you
/ws/*WebSocket?Once you pick a direction I'll turn it into an implementation plan + PR. Draft for review.