↑↓ to navigate Enter to open "…" all these words ANDOR to combine

Architecture Decision Record

ADR-124: The Server-Rendered UI Host Is Its Own Hardened Edge

Status

Accepted (2026-09-19). Revised 2026-09-25 (the hardening kit is one framework copy in MMCA.Common.UI.Web/Hardening/, first shipped in v1.206.0, which both UI hosts consume; the /hubs exemption is a framework default; both hosts adopt forwarded headers through Common's UseCommonUiForwardedHeaders; every anchor repointed; see the Revision below). Revised 2026-10-01 (the /_blazor circuit transport is held to the per-IP window only and kept out of the concurrency ceiling, and the circuit count releases a permit only for a circuit it admitted; see Revision below). Revised 2026-10-06 (the extension exemption no longer applies under the same-origin API proxy prefix, proxied hub traffic is exempt at the configured prefix, and ADC's replica count, container size and per-IP window widen under conferenceMode; see Revision below). Revised 2026-10-07: under conferenceMode ADC's UI runs a fixed four replicas rather than scaling up to four, ADR-079 is cited as the service pipeline the UI host composes around rather than one it joins, and anchors refreshed after the v1.233.0 release. Revised 2026-10-21: anchors refreshed after the v1.250.0 release. Revised 2026-10-26: the Decision now records that a fixed-window 429 carries Retry-After and that the two hosts place UseUiRateLimiting() at different points relative to the error-handling middleware (before it in ADC, after it in Store), and anchors refreshed against Common v1.261.0 (both consumers pin 1.260.0). Revised 2026-10-28: anchors refreshed after the v1.265.1 release (both consumers pin MMCA.Common.UI.Web 1.265.1). Revised 2026-11-23: both hosts now run the one composed AddMmcaBlazorWebHost / UseMmcaBlazorWebPipeline head, so the limiter sits at the same point (before the error-handling middleware) in both, and the extension-bearing-path exemption is gone: a path is exempt by prefix or by matching a real static asset, and a file extension alone exempts nothing.

Context

ADR-019 layers rate limiting, and ADR-088 makes the Gateway the layer that carries the outermost one. Both records describe traffic that arrives through the Gateway. The server-rendered Blazor UI host is the case neither covers: it is a separate externally reachable origin on its own Container Apps FQDN, so the Gateway's edge limiter guards the Gateway's own hostname and never sees a single request to the front door a browser actually loads (MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:11-16, and the same statement in ADC's head at MMCA.ADC/Source/Hosts/UI/MMCA.ADC.UI.Web/Program.cs:73-74).

Two properties of this origin make that gap expensive rather than cosmetic.

A page load here is not a cheap request. Under ADR-056's Interactive Auto strategy the first render is always a Server circuit, so every page load opens one and each open circuit holds live render state for as long as the connection lives (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:15-21). An unauthenticated loop over the page and negotiate endpoints therefore accumulates server memory, not just request volume, and the container it accumulates in is typically 0.25 vCPU / 0.5 GiB (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:27-28; ADC's UI container doubles to 0.5 vCPU / 1 GiB only under its conferenceMode deployment parameter, MMCA.ADC/infra/main.bicep:179,204).

The framework knob that looks like the answer is not one. CircuitOptions exposes DisconnectedCircuitMaxRetained and DisconnectedCircuitRetentionPeriod, and both bound only circuits that have already DROPPED their connection and are being held for reconnect; nothing in CircuitOptions bounds circuits that are open and connected (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:13-15, MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:15-17). A rate limiter does not close the gap either, from the other direction: it bounds how fast requests ARRIVE, while a caller who opens circuits slowly enough to stay inside the window still accumulates them (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:10-13).

Decision

The server-rendered UI host defends itself, in three layers bound from two configuration sections the host owns, in both ADC and Store, using one framework kit.

  • A ceiling on concurrently ACTIVE circuits, held by a singleton CircuitHandler. BoundedCircuitHandler counts opens and closes and refuses the ones past MaxActiveCircuits (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:43-49,64-85,88-109). It is registered as a singleton so one count spans the replica: circuit handlers are resolved from each circuit's own scope, so a scoped registration would count to one and cap nothing (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitExtensions.cs:46-48,60). It runs last among the registered handlers (Order => int.MaxValue), so a refusal happens after cheaper handlers have done their work rather than in the middle of it (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:57-61).

  • The refusal is a thrown exception, and that is the one place the Result pattern does not apply. CircuitHandler.OnCircuitOpenedAsync returns Task and has no "refuse" return value, so a faulted task is the only way to stop a circuit from starting; the code says so where it does it (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:24-29, the Task.FromException at :78-80). The contract being implemented belongs to the framework, so the framework's refusal vocabulary wins over the codebase's. Refusal is observable: one Warning per refusal naming the ceiling (:111-114).

  • The count is race-safe by construction and cannot leak permits in either direction. The open path increments first and rolls back on refusal, because reading and then incrementing would let two simultaneous opens both observe the last free slot and both take it (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:70-75). The close path releases a permit only for a circuit the open path admitted, tracked in a set keyed by reference, because the framework also closes a refused circuit and that close would otherwise release a permit another circuit holds (:32-39, the set at :47, filled at :83, checked at :92-98). It then floors at zero rather than trusting the pairing, as a last line of defence against a count driven negative handing out permits forever (:100-106).

  • Disconnected-circuit retention is tightened from the same section, as defence in depth. DisconnectedCircuitMaxRetained drops from the framework's 100 to 25 by default, because a retained circuit holds the same state an active one does while serving nobody (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:40-46), and both hosts keep 25 (MMCA.ADC.UI.Web/appsettings.json:30, MMCA.Store.UI.Web/appsettings.json:53). The retention period is where the two apps deliberately differ. The kit defaults it to 60 seconds, because a visitor who really did drop off wifi reconnects within seconds, and its own documentation names the exception (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:48-57): Store keeps 60 (MMCA.Store.UI.Web/appsettings.json:54), while ADC raises it back to the ASP.NET Core default of 180 (MMCA.ADC.UI.Web/appsettings.json:31) because a conference venue's shared wifi drops connections for far longer than a home network does and an attendee walking between rooms should come back to the session state they left.

  • A UI-host-local per-IP fixed window CHAINED with a replica-wide concurrency ceiling, both rejecting 429. The two limiters answer different questions, so a request must satisfy both: PartitionedRateLimiter.CreateChained over a per-client-IP fixed window and a single-partition concurrency limiter (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:252-258). The rejection status is 429 (:235), and a fixed-window rejection also carries a Retry-After header in whole seconds (a concurrency rejection has no hint and sends none; :47-66, wired at :236). The concurrency half queues nothing (QueueLimit = 0), so a saturated host sheds load instead of growing latency (:200-205, rationale at MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:64-74). The Blazor circuit transport (/_blazor: negotiate, the circuit WebSocket and its long-polling fallback) is the one path held to the per-IP window alone: a circuit WebSocket would hold a concurrency permit for the circuit's whole lifetime and starve page loads, so the concurrency half gives that prefix the no-limiter partition and open circuits are bounded by MaxActiveCircuits instead (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:39-45,178-206).

  • Exemptions are what keep the limiter off the first real visitor rather than off the attacker. Health and liveness probes are exempt, because throttling them turns a traffic spike into a failed probe and a container restart; so are the two framework asset roots (/_framework, /_content), matched on whole segments (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:68-80, the match at :102-104). Beyond those prefixes, a request is exempt only when the endpoint routing selected for it is a real static asset mapped by MapStaticAssets, read from its StaticAssetDescriptor metadata, since a single page load pulls dozens of them and each is served with an ETag for almost nothing (:106-128). A file extension alone exempts nothing: a path such as /missing.png that maps to no static asset renders the not-found page and is counted like any page route (:88-93), and proxied API traffic is counted whatever its last segment looks like. The default exempt list also carries /hubs, mirroring the Gateway's own bypass list, so a host that ever fronts a SignalR hub on this origin is covered by declaration rather than by accident (:72-75,80), and the same hub traffic arriving through the proxy is exempt at {SameOriginApiProxy:PathPrefix}/hubs (:76-78,104), with the prefix read through the proxy's own options so the limiter and the proxy cannot disagree (:244-250; v1.232.0, MMCA.Common/CHANGELOG.md:1546). Because these are the kit's defaults, both hosts exempt them. /_blazor deliberately has no exemption from the per-IP window, because the negotiate endpoint is exactly what opens a circuit; it is kept out of the concurrency ceiling only, as above (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:93-96). An unresolvable client IP fails open rather than collapsing every unattributable request into one shared bucket, which would throttle an in-process TestServer to a standstill (:156-162).

  • Forwarded headers come first, with one framework posture shared by every host. The composed UI pipeline opens with UseCommonUiForwardedHeaders() (MMCA.Common/Source/Presentation/MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:185), and both UI hosts run that pipeline (MMCA.ADC.UI.Web/Program.cs:128,130, MMCA.Store.UI.Web/Program.cs:92). The method is defined in MMCA.Common.API (MMCA.Common/Source/Presentation/MMCA.Common.API/Startup/CommonForwardedHeadersExtensions.cs:24-25, shipped in v1.211.0, MMCA.Common/CHANGELOG.md:2117). It applies CommonForwardedHeaders.Create(): X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host by default, with the known-proxy and known-network allow-lists cleared because cloud ingress reaches the container from addresses in neither default list (.../MMCA.Common.API/Startup/CommonForwardedHeaders.cs:14-20,33-34,42-53). The service pipeline's ForwardedHeaders step builds its options from the same factory (.../MMCA.Common.API/Startup/Pipeline/MiddlewarePipelineBuilder.cs:68), and the Gateway package keeps its own dependency-free copy of the same values (CommonForwardedHeaders.cs:22-24, MMCA.Common/Source/Hosting/MMCA.Common.Gateway/ForwardedHeadersExtensions.cs:59-63), so all three hosts read the scheme, host and client address the same way. That ordering is what makes the partition key below the caller's IP rather than the ingress's.

  • Both limiters go in after forwarded headers and before request localization, antiforgery and the component endpoints that open a circuit or render a page. Neither host calls the kit directly: both register through the composed builder.AddMmcaBlazorWebHost(...) (MMCA.ADC.UI.Web/Program.cs:26, MMCA.Store.UI.Web/Program.cs:30) and build their pipeline through app.UseMmcaBlazorWebPipeline(...) (MMCA.ADC.UI.Web/Program.cs:128,130, MMCA.Store.UI.Web/Program.cs:92), shipped in v1.289.0 (MMCA.Common/CHANGELOG.md:550). The registration half calls AddUiRateLimiting (MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:96), and the pipeline runs, in a fixed order, forwarded headers, security headers and UseUiRateLimiting() (:185-187), then outside Development UseExceptionHandler (:193-196; in Development the head's optional DevelopmentPipeline callback runs in its place, :189-192, and ADC's net11.0 head passes none, MMCA.ADC.UI.Web/Program.cs:125-128), UseStatusCodePagesWithReExecute("/not-found") (:198), MapDefaultEndpoints (:199), UseHttpsRedirection (:200), request localization (:201) and antiforgery (:202). The limiter therefore sits ahead of the exception handler and the status-code re-execute in both hosts, so a throttled request answers 429 without re-rendering a page (rationale at :166-170). The circuit ceiling is registered beside it, with the retention half applied to AddInteractiveServerComponents from the same section so the two numbers cannot drift apart (RetentionFrom at :92, AddBoundedBlazorCircuits() at :95, both through MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitExtensions.cs:28-41,51-61).

  • One framework kit, consumed by both hosts, with the same section names and the same shape. The kit ships in MMCA.Common.UI.Web from v1.206.0 (MMCA.Common/CHANGELOG.md:2337) and binds UiRateLimiting (MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:36) and BlazorCircuitLimits (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:20). It ships the limiter enabled by default with one escape hatch for a load or capacity proof driven from a single runner IP (UiRateLimitingSettings.cs:38-43; the early return that honours it at UiRateLimitingExtensions.cs:239-242), and defaults MaxActiveCircuits = 200 (BlazorCircuitLimitSettings.cs:38) and GlobalConcurrencyLimit = 200 (UiRateLimitingSettings.cs:76). The kit is deliberately separate from the Gateway's limiter even though it is shaped like it, because MMCA.Common.Gateway is the reverse-proxy kit and a UI host is not a reverse proxy (UiRateLimitingSettings.cs:18-25).

  • The two hosts tune the kit differently through configuration, and the tuning is the point. The kit's per-IP window defaults to 300 per minute, set well above a single visitor because an office or mobile-carrier NAT presents many visitors as one IP, and its documentation tells a host whose audience sits behind one address to raise it (MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:45-58, window at :60-62). Store keeps 300 (MMCA.Store.UI.Web/appsettings.json:38). ADC sets 1200 per minute, four times the storefront's, because on conference day the attendees are physically in one venue behind one NAT and present to this limiter as a SINGLE client IP (MMCA.ADC.UI.Web/appsettings.json:15-21, restated at MMCA.ADC.UI.Web/Program.cs:74-76). A conference-day deployment widens it again: the conferenceMode parameter overrides the window to 12000 per minute per replica through the environment (MMCA.ADC/infra/main.bicep:3153). Every value is also written out explicitly in each host's appsettings.json, so the deployed posture is stated rather than inherited (MMCA.ADC.UI.Web/appsettings.json:19-24,28-32, MMCA.Store.UI.Web/appsettings.json:36-41,51-55).

Rationale

  • A separate origin is a separate edge. The Gateway cannot defend a hostname it never receives a request for, so the choice was between routing the UI through the Gateway and letting the UI carry its own limiter. The host carries it, which leaves the browser's front door as the direct origin it already is (MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:11-16).
  • A circuit is resident state, so it needs a count and not a rate. The rate limiter and the circuit ceiling bound different resources, and each leaves the other's failure mode open: this is why both exist rather than one (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:9-16).
  • CircuitHandler is the documented extension point that sees a circuit open and close, which is why the count lives there rather than in middleware or in CircuitOptions (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:20-21).
  • Throwing is the framework's own refusal vocabulary here. The client sees the standard Blazor reconnect UI rather than a crashed page, and the count is decremented before the throw so a refusal never leaks a permit (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:27-29,70-80).
  • The ceilings are abuse ceilings, not capacity plans. 200 active circuits per replica is derived from the container the host runs in (0.25 vCPU / 0.5 GiB, roughly 300 MiB left for circuit state against a MudBlazor render tree of a few hundred kilobytes up to about a megabyte), and it sits far above real demand because Interactive Auto moves a returning session to the WebAssembly runtime after the first render. The instruction that follows from that framing is written next to the number: raise it only together with the container's memory (MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:26-38). ADC's busiest measured conference day peaked near 67 concurrent users, and its UI container scales between one and two replicas by default and runs a fixed four under conferenceMode (the floor is raised to the ceiling), which also doubles the container to 0.5 vCPU / 1 GiB (MMCA.ADC.UI.Web/appsettings.json:25-27, MMCA.ADC/infra/main.bicep:3190-3191 defined at :213-214, resources at :3098 defined at :204, the uiApp container app at :3062).
  • Binding is validated at startup, and the hot path does not pay for it. Both sections go through ValidateDataAnnotations().ValidateOnStart(), and the limiter then closes over the already-bound instance rather than resolving IOptions on every request, precisely because an out-of-range value has already failed the start-up validation (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:222-231, MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitExtensions.cs:55-58).

Trade-offs

  • Both ceilings are per replica, in memory. The effective allowance is the configured number multiplied by the replica count (two at most for ADC's UI by default, a fixed four under conferenceMode, MMCA.ADC/infra/main.bicep:214,3190-3191), so two replicas carry an abuse ceiling of 400 circuits and four carry 800, against a real peak of well under 100. That is the same trade the Gateway kit documents and is accepted for the same reason: an edge limiter has to answer in microseconds on every request, and a shared counter would put a network round trip in front of the whole site (MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:27-31, MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:23-27).
  • One kit moves both hosts at once. Because the limiter, the circuit ceiling and the forwarded-header posture are framework code, a behaviour change reaches both UI hosts together at the lockstep version bump (ADR-016). Both hosts also run the same composed pipeline, so the limiter's placement is framework code too (MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:181-216), and the per-host differences are configuration values plus the head-specific callbacks the pipeline accepts. The cost is the other side of the same coin: a host that needs a different shape, not just a different number, has no local copy to bend and must change the framework.
  • A refusal is an exception on a framework contract, so the diagnostic is a Warning log rather than a typed result a caller can branch on, and the user-facing signal is the standard Blazor reconnect UI rather than a message the app controls (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:24-29,111-114).
  • Fail-open on an unresolvable client IP is a deliberate hole. A caller the host cannot attribute takes the no-limiter partition, which is the right call for an in-process TestServer and is a gap if anything else ever reaches this host without a remote address (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:156-162).
  • The static-asset exemption depends on endpoint routing running first. A static asset is told apart from a page route by the endpoint routing selected, not by the shape of the path, which a WebApplication resolves ahead of the whole user pipeline because it inserts UseRouting first; only a path in the static-asset manifest qualifies, so a dotted page route or a missing file is counted (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:114-128). A host that composed its pipeline without that implicit routing step would lose the StaticAssetDescriptor exemption (:127) for every manifest asset outside the exempt prefixes; assets under /_framework and /_content stay exempt by prefix whatever routing does (:80,102-104,126).
  • A per-IP window is the wrong shape for a venue, and is widened rather than replaced. ADC's fourfold default widening buys a margin over one NAT'd venue at the cost of letting a single scripted client burn four times as many requests before it is shed, and the conference-day override to 12000 per minute makes that forty times the storefront's window for the day (MMCA.ADC.UI.Web/appsettings.json:15-21, MMCA.ADC/infra/main.bicep:3153, MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:52-55).

Revision (2026-09-25): one framework kit, one forwarded-header posture

The hardening kit this record decides now lives once, in MMCA.Common.UI.Web/Hardening/, first shipped in v1.206.0 (MMCA.Common/CHANGELOG.md:270-282). ADC and Store each import it (MMCA.ADC.UI.Web/Program.cs:31, MMCA.Store.UI.Web/Program.cs:23) and carry no Hardening/ folder of their own, so the settings, the handler and the limiter are one implementation and the hosts differ only in the configuration values recorded above. Two facts moved with it. The /hubs exemption became the kit's default and so applies to both hosts rather than to ADC alone. And both hosts now adopt forwarded headers through Common's UseCommonUiForwardedHeaders() (v1.211.0), which honours For, Proto and Host with the allow-lists cleared, the same posture as the service pipeline and the Gateway, where Store's host previously honoured For and Proto only. Every anchor in this record was repointed to the framework files and to the hosts' current call sites.

Revision (2026-10-01): the circuit transport and the circuit count

Two behaviours of the kit changed in v1.213.0 (MMCA.Common/CHANGELOG.md:82,145,148), and the Decision above now states both. First, the chained limiter no longer applies the replica-wide concurrency ceiling to the Blazor circuit transport: a circuit WebSocket held its concurrency permit for the circuit's whole lifetime, so open circuits could starve page loads of permits. /_blazor now takes the no-limiter partition of the concurrency half while staying inside the per-IP window, and open circuits are bounded by MaxActiveCircuits alone (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:33-39,132-147, MMCA.Common.UI.Web/Hardening/UiRateLimitingSettings.cs:64-76). Second, BoundedCircuitHandler tracks the circuits it admitted and releases a permit only when one of those closes, because the framework also runs the close callback for a refused circuit, which used to release a permit another circuit held (MMCA.Common.UI.Web/Hardening/BoundedCircuitHandler.cs:32-39,47,83,92-98). The rest of the decision and its rationale stand. The UiRateLimitingExtensions.cs, BoundedCircuitHandler.cs, UiRateLimitingSettings.cs, Store appsettings.json, CHANGELOG and main.bicep citations in the Context, Decision, Rationale and Trade-offs sections were refreshed to current lines.

Revision (2026-10-06): the proxy prefix and conference mode

  • The extension-bearing-path exemption now applies only outside the same-origin API proxy prefix, and proxied hub traffic is exempt at {SameOriginApiProxy:PathPrefix}/hubs rather than at a literal path, both since v1.232.0 (MMCA.Common/CHANGELOG.md:37, MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:82-94), which both consumers pin (MMCA.ADC/Directory.Packages.props:137, MMCA.Store/Directory.Packages.props:24). The Decision exemptions bullet and the Trade-offs heuristic bullet now say so.
  • ADC's two-replica, 0.25 vCPU / 0.5 GiB and 1200-per-minute figures are the default deployment only: under conferenceMode the UI container runs up to four replicas at 0.5 vCPU / 1 GiB and the per-IP window is 12000 per minute per replica (MMCA.ADC/infra/main.bicep:182,191,2603-2606). Context, Decision, Rationale and Trade-offs now state both postures.
  • The v1.213.0 entries the 2026-10-01 Revision cites now sit at MMCA.Common/CHANGELOG.md:423,486,489, and the v1.206.0 kit entry the 2026-09-25 Revision cites at MMCA.Common/CHANGELOG.md:815-827.
  • Every path:line anchor in the live sections was re-verified against current source and repointed.

Revision (2026-10-07)

Re-verified against current source. The three layers, their defaults, the /_blazor carve-out, the proxy-prefix exemption rules and both hosts' configuration are unchanged, and both consumers pin MMCA.Common.UI.Web 1.233.0 (MMCA.ADC/Directory.Packages.props:129, MMCA.Store/Directory.Packages.props:20). Two statements moved (items 1 and 2), and anchors were re-pointed (item 3).

  1. Under conferenceMode ADC's UI container does not scale up to four replicas: its floor is raised to the ceiling, so it runs a fixed four (MMCA.ADC/infra/main.bicep:2691-2692, ceiling defined at :192). By default it scales between one and two (:191-192). The Rationale and Trade-offs now say so.
  2. The UI hosts do not join the ADR-079 pipeline: that record scopes itself to REST and gRPC service hosts, and the UI hosts hand-compose their own, reusing two of its pieces through public methods: the forwarded-headers posture (MMCA.ADC.UI.Web/Program.cs:210, MMCA.Store.UI.Web/Program.cs:200) and the request-localization half (MMCA.ADC.UI.Web/Program.cs:238, MMCA.Store.UI.Web/Program.cs:233). UseUiRateLimiting() sits in the hand-composed pipeline (MMCA.ADC.UI.Web/Program.cs:221). The Related entry now says so.
  3. Anchors re-verified against current source: MMCA.ADC/infra/main.bicep:2651-2654 (conference-day window, value at :2654), :2563 (uiApp), :2599 (resources), :2691-2692 (scale), :191-192; MMCA.ADC.UI.Web/Program.cs:139-141 (registration statement), :146-147 (NAT restatement), :148 (AddUiRateLimiting), :82 (AddBoundedBlazorCircuits), :210 (UseCommonUiForwardedHeaders), :218-220 (use-site comment), :221 (UseUiRateLimiting), :75,139 (ADR-088 comments); MMCA.Common/CHANGELOG.md:62 (v1.232.0 proxy-prefix entry), :602-605 (v1.211.0 forwarded headers), :840-852 (v1.206.0 kit).

Revision (2026-10-21)

Re-verified against current source. The three layers, their defaults, both hosts' configuration and ADC's conferenceMode posture (a fixed four UI replicas at 0.5 vCPU / 1 GiB, one to two at 0.25 vCPU / 0.5 GiB by default, and the 12000-per-minute window) are unchanged; both consumers now pin MMCA.Common.UI.Web 1.250.0 (MMCA.ADC/Directory.Packages.props:128, MMCA.Store/Directory.Packages.props:20). Only anchors moved.

  1. Anchors re-verified against current source: MMCA.ADC/infra/main.bicep:2810 (conference-day UiRateLimiting__PermitLimit override, previously cited at :2651-2654, which now holds the Gateway's own window), :2719 (uiApp), :2755 (resources, defined at :182), :2847-2848 (UI scale, defined at :191-192); MMCA.Common/CHANGELOG.md:381 (v1.232.0 proxy-prefix and hub-exemption entry), :921-924 (v1.211.0 forwarded headers), :1159-1168 (v1.206.0 kit).

Revision (2026-10-26)

Re-verified against current source. The three layers, their defaults, the /_blazor carve-out, the proxy-prefix exemption rules, both hosts' configuration and ADC's conferenceMode posture are unchanged; both consumers now pin MMCA.Common.UI.Web 1.260.0 (MMCA.ADC/Directory.Packages.props:142, MMCA.Store/Directory.Packages.props:25); the cited UI host and framework source is unchanged between v1.260.0 and v1.261.0, and the MMCA.Common/CHANGELOG.md lines below are those of the v1.261.0 CHANGELOG. Two statements moved (items 1 and 2), and anchors were re-pointed (item 3). The Trade-offs bullet on one kit moving both hosts now names the limiter placement as a per-host difference alongside configuration.

  1. A rejection from the per-IP fixed window now carries a Retry-After header in whole seconds; a concurrency rejection has no retry hint and sends none (MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:45-64, wired at :216; v1.252.0, MMCA.Common/CHANGELOG.md:180). The Decision's chained-limiter bullet now says so.
  2. The two hosts do not place the limiter at the same point. ADC's UseUiRateLimiting() runs before UseExceptionHandler, UseStatusCodePagesWithReExecute("/not-found"), MapDefaultEndpoints and UseHttpsRedirection (MMCA.ADC.UI.Web/Program.cs:227, those at :236-240); Store's runs after all four (MMCA.Store.UI.Web/Program.cs:219,227-229, limiter at :235), so Store's status-code re-execute middleware wraps the limiter's 429. Both still sit after forwarded headers and before request localization and the component endpoints. The Decision's placement bullet now states both orders instead of one shared placement.
  3. Anchors re-verified against current source: MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:232-238 (chain), :215 (429), :180-185 (QueueLimit = 0), :37-43,158-186 (/_blazor transport), :66-78,80-116 (exemptions), :107 (proxied hubs), :113-115 (/api/report.csv), :224-230 (proxy options), :94-98 (/_blazor remark), :140-146 (fail open), :202-211 (validation), :219-222 (Enabled early return), :86-98,104-116 (extension heuristic); MMCA.Common.UI.Web/Hardening/BlazorCircuitLimitSettings.cs:23-27 (per-replica ceiling, previously cited at :34-35); .../MMCA.Common.API/Startup/Pipeline/MiddlewarePipelineBuilder.cs:68; MMCA.ADC.UI.Web/Program.cs:78 (RetentionFrom), :81,145 (ADR-088 comments), :88 (AddBoundedBlazorCircuits), :145-147 (registration statement), :152-153 (NAT restatement), :154 (AddUiRateLimiting), :216 (UseCommonUiForwardedHeaders), :224-226 (use-site comment), :227 (UseUiRateLimiting), :244 (request localization); MMCA.Store.UI.Web/Program.cs:84 (RetentionFrom), :92 (AddBoundedBlazorCircuits), :94-96 (registration statement, ADR-088 at :94), :101 (AddUiRateLimiting), :206 (UseCommonUiForwardedHeaders), :231-234 (use-site comment), :235 (UseUiRateLimiting), :239 (request localization); MMCA.ADC/infra/main.bicep:2846 (conference-day window), :2755 (uiApp), :2791 (resources), :2883-2884 (UI scale); MMCA.Common/CHANGELOG.md:596 (v1.232.0 proxy-prefix and hub-exemption entry), :1136-1139 (v1.211.0 forwarded headers), :1374-1386 (v1.206.0 kit).

Revision (2026-10-28)

Re-verified against current source. The three layers, their defaults, the /_blazor carve-out, the proxy-prefix exemption rules, both hosts' configuration values, both hosts' limiter placement (before the error-handling middleware in ADC, after it in Store) and ADC's conferenceMode posture are unchanged; both consumers now pin MMCA.Common.UI.Web 1.265.1 (MMCA.ADC/Directory.Packages.props:142, MMCA.Store/Directory.Packages.props:25), and no commit since v1.260.0 touches the cited Hardening/ kit or forwarded-headers files, so the framework anchors stand. Only host, infrastructure and CHANGELOG anchors moved.

  1. Anchors re-verified against current source: MMCA.Store.UI.Web/appsettings.json:35-40 (UiRateLimiting, PermitLimit at :37), :50-54 (BlazorCircuitLimits, retained at :52, retention at :53); MMCA.ADC.UI.Web/Program.cs:79 (RetentionFrom), :82,146 (ADR-088 comments), :89 (AddBoundedBlazorCircuits), :146-148 (registration statement), :153-154 (NAT restatement), :155 (AddUiRateLimiting), :217 (UseCommonUiForwardedHeaders), :225-227 (use-site comment), :228 (UseUiRateLimiting), :237-241 (exception handler, status-code re-execute at :239, MapDefaultEndpoints, HTTPS redirection), :245 (request localization); MMCA.Store.UI.Web/Program.cs:85 (RetentionFrom), :93 (AddBoundedBlazorCircuits), :95-97 (registration statement, ADR-088 at :95), :102 (AddUiRateLimiting), :207 (UseCommonUiForwardedHeaders), :220,228-230 (exception handler, status-code re-execute, MapDefaultEndpoints, HTTPS redirection), :232-235 (use-site comment), :236 (UseUiRateLimiting), :240 (request localization); MMCA.ADC/infra/main.bicep:2843 (conference-day window), :2752 (uiApp), :2788 (resources, defined at :182), :2880-2881 (UI scale, defined at :191-192); MMCA.Common/CHANGELOG.md:639 (v1.232.0 proxy-prefix and hub-exemption entry), :1179-1182 (v1.211.0 forwarded headers), :1417-1429 (v1.206.0 kit).

Revision (2026-11-23)

Re-verified against current source. The three layers, their defaults, the /_blazor carve-out, the proxied hub exemption, both hosts' configuration values and ADC's conferenceMode posture are unchanged; both consumers now pin MMCA.Common.UI.Web 1.315.0 (MMCA.ADC/Directory.Packages.props:199, MMCA.Store/Directory.Packages.props:51). Three statements moved (items 1 to 3), and anchors were re-pointed (item 4).

  1. Neither UI host composes its own registration or pipeline any longer. Both call the composed builder.AddMmcaBlazorWebHost(...) (MMCA.ADC.UI.Web/Program.cs:26, MMCA.Store.UI.Web/Program.cs:30) and app.UseMmcaBlazorWebPipeline(...) (MMCA.ADC.UI.Web/Program.cs:128,130, MMCA.Store.UI.Web/Program.cs:92), shipped in v1.289.0 (MMCA.Common/CHANGELOG.md:550), which register RetentionFrom, AddBoundedBlazorCircuits and AddUiRateLimiting (MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:92,95,96) and run forwarded headers, the limiter and request localization (:185,187,201). The Decision's forwarded-headers and placement bullets, the Trade-offs bullet on one kit, and the Related entry for ADR-079 now say so; the UI host still does not join the ADR-079 service pipeline.
  2. The two hosts no longer place the limiter at different points: the composed pipeline runs UseUiRateLimiting() before UseExceptionHandler, the /not-found status-code re-execute, MapDefaultEndpoints and UseHttpsRedirection (BlazorWebHostExtensions.cs:187,195,198-200) in both, so a throttled request answers 429 without a re-rendered page in Store as well as ADC (:166-170). This replaces the 2026-10-26 Revision's item 2.
  3. The extension-bearing-path exemption is gone. A request is exempt by prefix (/health, /alive, /_framework, /_content, /hubs, plus {SameOriginApiProxy:PathPrefix}/hubs; MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:80,102-104) or when its matched endpoint carries StaticAssetDescriptor metadata (:122-128), and a file extension alone exempts nothing (:88-93). The Decision's exemptions bullet now says so, and the Trade-offs bullet on the extension heuristic is replaced by one on the static-asset rule's dependence on endpoint routing (:114-121).
  4. Anchors re-verified against current source: MMCA.Common.UI.Web/Hardening/UiRateLimitingExtensions.cs:252-258 (chain), :235 (429), :47-66,236 (Retry-After), :200-205 (QueueLimit = 0), :39-45,178-206 (/_blazor transport), :68-80 (exempt prefixes), :244-250 (proxy options), :93-96 (/_blazor remark), :156-162 (fail open), :222-231 (validation), :239-242 (Enabled early return); MMCA.ADC.UI.Web/Program.cs:73-74 (registration statement), :74-76 (NAT restatement), :51,74 (ADR-088 comments; Store's Program.cs carries none); MMCA.Store.UI.Web/appsettings.json:36-41 (UiRateLimiting, PermitLimit at :38), :51-55 (BlazorCircuitLimits, retained at :53, retention at :54); MMCA.ADC/infra/main.bicep:3153 (conference-day window), :3062 (uiApp), :3098 (resources, defined at :204), :3190-3191 (UI scale, defined at :213-214), :179 (conferenceMode); MMCA.Common/CHANGELOG.md:2337 (v1.206.0 kit), :2117 (v1.211.0 forwarded headers), :1546 (v1.232.0 proxy-prefix and hub-exemption release).

ADR-019 (the layered rate-limiting posture this adds a layer to), ADR-088 (the Gateway edge whose limiter this host is outside of, and which ADC's head comments name directly at MMCA.ADC.UI.Web/Program.cs:51,74), ADR-056 (the Interactive Auto strategy that makes a first render a Server circuit and a returning session a WebAssembly one, which is what makes the ceiling both necessary and generous), ADR-079 (the shared service pipeline the UI hosts deliberately do not call: the composed UI pipeline reuses two pieces of it through public methods, its forwarded-headers posture and its request-localization half (MMCA.Common.UI.Web/Hosting/BlazorWebHostExtensions.cs:185,201), and this middleware sits in that composed pipeline after forwarded headers and before the component endpoints), ADR-016 (the lockstep bump that moves both hosts onto a kit change together).