docs: thundering-herd demo view + resilience-demo enrich pass#111
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
One client retrying a blip is invisible; twenty clients retrying a sustained outage is a traffic weapon unless retries are spread out and capped. Adds mountHerd (composing Task 1's tour driver and Task 2's simulateHerd/renderRateStrip) as a stacked "Now 20 clients" section below the existing single-client retry demo, with a mini-tour spotlighting the measured peak-load gap: naive ~70x (unbounded, still growing) vs httpware ~3x (capped by each client's own max_attempts, never a shared budget). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CSS-driven conic countdown ring on the timeout and circuit-breaker pages' fixed lane-B elements (elapsedB / brkB), showing the multi-second deadline and reset-timeout waits. Retry and bulkhead get no ring per the fidelity decision (backoff is sub-tick at this demo's time compression). All pages gain a jagged clip-path failure dot so outcomes read without color. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reuse renderRateStrip on the full-stack page: a small backend call-rate strip below the lanes, revealed each tick with the single-client run, labeled with the active incident phase. Gated by config.macroStrip so every other lane page is unaffected. Finalizes the change summary with the realized herd multipliers (naive ~70x vs httpware ~3x). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The design body still carried the pre-measurement ~10x/~1.2x placeholders and a stale retry-ring mention. Align with the shipped model: httpware is bounded near its max_attempts cap (~3x) at demo scale, naive ~70x; ring is CB+timeout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The herd's sustained outage produced a smooth rising ramp for independent, un-synchronized naive clients, not the spikes-with-gaps the tour copy claims. Switch the model input to a flapping backend (down/recover x3) so unbounded retries genuinely surge on each dip and clear on recovery -- real spikes-with-gaps, faithfully sourced from backend recovery rather than client synchronization. The existing simulateHerd algorithm already produces this shape once the fault flaps; this is a scenario + rendering + copy change. Add computeOutageBands so the rate strip shades each dip separately, leaving recovery gaps visibly unshaded between them (falls back to the single outage window for callers that don't pass bands, so the full-stack macro strip is unaffected). Re-measure the naive multiplier against the flapping scenario (~18x, down from the sustained model's ~70x since each dip is shorter) and reconcile retry.md's copy and the change-file's motivation/design/payoff language to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… intro The only mountHerd caller now passes an explicit flapping-aware intro; the shared default's "sustained" was dead but a latent trap for future callers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Adds a many-client thundering-herd macro view to the retry demo page and folds three visualization techniques across the resilience demo suite. Design + rationale:
planning/changes/2026-07-19.02-resilience-demo-herd-and-enrich.md.What's new
max_attemptsat demo scale; per-client budget, never shared). Faithful model — reuses the realRetryBudget.Notes
architecture/untouched — docs only, no capability contract moves.makeTourfactory so the herd's mini-tour reuses it (no divergent copies).Verification
just docs-build --strictclean;just check-planningOK;node --check docs/demos/engine.jsclean.verify-demos,verify-herd,verify-real-page); the herd trace asserts the spikes-with-gaps shape (3 separated naive spikes, recovery gaps) plus naive ≫ httpware and httpware bounded nearmax_attempts; the ring trace confirms activation on timeout + circuit-breaker.🤖 Generated with Claude Code