ADR-0026 — Host ION single-page applications on Azure App Service
Forces / Drivers
- Requirement / Constraint: ION needs a consistent hosting model for browser-delivered web applications across platform teams.
- Principle(s) embodied: § 14 Independent scalability, § 17 Failure containment, and § 23 Blast-radius containment.
- WAF pillar optimized:
operational-excellence(primary);security,reliability,performance-efficiency, andcost-optimization(secondary).
Context
ION web applications are interactive browser clients and do not require server-side rendering. A platform standard is needed so teams do not independently select frontend rendering and hosting models, create inconsistent deployment pipelines, or operate unnecessary infrastructure.
Azure App Service provides a managed platform for web applications and APIs, including runtime management, autoscaling, deployment slots, built-in authentication options, custom domains, managed certificates, networking integration, and CI/CD support. It can host an SPA by serving its compiled HTML, CSS, JavaScript, and image assets from an application runtime or custom container.
This decision established the initial platform baseline. It has been superseded by ADR-0027, which selects the service purpose-built for static SPA delivery.
Decision
All ION browser-delivered web applications SHALL be implemented as single-page applications (SPAs) and SHALL host their compiled frontend assets in Azure Web Apps on Azure App Service.
This decision applies to application shells and independently deployed frontend bundles, including the micro-frontends defined by ADR-0023. It does not require BFFs, APIs, or other server-side workloads to share the frontend’s App Service resource or plan.
Production deployments SHALL use supported App Service tiers and platform-standard controls for TLS, custom domains, observability, identity, network access, infrastructure as code, and CI/CD.
Web apps do not implement APIs
Azure App Service instances used for ION web hosting SHALL host only the compiled SPA (HTML, CSS, JavaScript, images, and runtime composition metadata). They MUST NOT expose APIs, act as BFFs, terminate user or service tokens, perform domain authorization, or contain domain logic. API surfaces, BFFs, and domain services are separately deployed workloads governed by ADR-0013, ADR-0014, ADR-0020, and ADR-0023.
Traffic path (per ADR-0015)
The ION Platform edge topology in ADR-0015 is the sole authoritative traffic pattern and applies here, including its bounded edge exceptions:
Browser HTML/JS/CSS request:
user → Azure Front Door (platform WAF) → Application Gateway → App Service (SPA assets)
Browser XHR / fetch to an API:
user → Azure Front Door (platform WAF) → Application Gateway → APIM → BFF → downstream service
App Service instances hosting SPAs SHALL be reachable only through Front Door. Front Door normally reaches them through Application Gateway, and directly only as a priority-2 failover origin that accepts only ION’s Front Door (AzureFrontDoor.Backend service tag plus X-Azure-FDID). Direct public exposure and any “API route on the web app” pattern are prohibited. Any API-shaped request from the browser SHALL traverse Front Door → Application Gateway → APIM → BFF as defined in ADR-0015 and ADR-0014.
Alternatives considered
- Azure Static Web Apps — Purpose-built static hosting with globally distributed content, repository integration, preview environments, managed certificates, SPA fallback routing, and API integration. Initially not selected in favor of using the broader App Service operational baseline; subsequently selected by ADR-0027 because it better matches static SPA workloads.
- Azure Storage static website with Azure Front Door/CDN — Can efficiently serve static assets, but requires teams to assemble more routing, certificate, deployment-preview, and security capabilities than the integrated Static Web Apps service.
- Server-side rendered applications — Rejected as the platform default because ION’s authenticated application surfaces are interactive clients and no platform-wide SEO or server-rendering requirement justifies the added runtime and operational complexity.
- Containers or virtual machines dedicated to frontend assets — Rejected because static frontend delivery does not justify container orchestration or operating-system management.
Rationale
App Service provided a familiar, managed Azure hosting substrate and a uniform path for teams already operating runtime-backed web applications. Its deployment slots, autoscaling, networking, identity, monitoring, and CI/CD integrations reduced infrastructure management compared with self-hosted web servers.
The service was technically capable of hosting SPAs, but capability alone did not make it the best workload fit. Serving immutable static assets through an always-on application runtime introduced avoidable compute, patching, scaling, and cost concerns. That mismatch is the reason this decision was superseded by ADR-0027.
Consequences
Positive
- Teams initially had one familiar managed hosting platform for frontend and runtime-backed web workloads.
- App Service supplied mature deployment slots, network integration, identity, autoscaling, and observability capabilities.
- The SPA standard separated browser rendering from BFF and domain-service responsibilities.
Negative
- Static assets required an application runtime or container that added no business capability.
- Always-on compute and App Service Plan capacity could cost more than purpose-built static hosting, especially when plans could not be efficiently shared.
- Global edge delivery and pull-request preview environments required additional configuration or services.
- Runtime and web-server configuration increased patching, scaling, and operational responsibilities for an otherwise static workload.
Neutral / follow-ups
- Existing App Service-hosted SPAs require an assessed migration rather than an automatic cutover.
- App Service remains valid for BFFs, server-rendered applications, and frontend workloads whose runtime requirements cannot be met by Static Web Apps, subject to an explicit exception ADR. Any such App Service instance that serves API traffic does so as a backend behind APIM per ADR-0015 and ADR-0014, never as a public API endpoint and never co-located with SPA assets.
WAF Pillar Impact
- Security: App Service supports TLS, managed certificates, built-in authentication, managed identity, access restrictions, and VNet integration. The trade-off is a larger runtime configuration surface than static asset hosting requires.
- Reliability: Managed platform features, autoscaling, deployment slots, SLA-backed tiers, and zone-redundancy options support availability. Teams must still size, scale, health-check, and recover the serving runtime.
- Performance Efficiency: App Service can scale dynamically, but serving cacheable static assets from regional application workers is less direct than globally distributed static delivery.
- Cost Optimization: Shared App Service Plans can improve utilization, but dedicated or underused plans create standing compute cost for static content.
- Operational Excellence (primary): A common managed service and reusable deployment pattern simplify operations, while runtime maintenance and capacity management add toil that is unnecessary for SPAs.
- Trade-offs: The decision favored platform familiarity and runtime flexibility over workload fit, globally distributed static delivery, and reduced operational cost.
Amendments
- 2026-10-15 — Edge path aligned with ADR-0015. This record is superseded, but App Service SPAs remain in production during migration to Static Web Apps. Their traffic path was corrected:
- Front Door Premium WAF is the platform WAF; Application Gateway runs without WAF.
- A direct Front Door→App Service origin is permitted only as a priority-2 failover origin, locked to ION’s Front Door.
References
- Microsoft Learn: App Service overview
- Microsoft Learn: What is Azure Static Web Apps?
Related ADRs
- Superseded by: ADR-0027
- Related: ADR-0023 — SPA/MFE composition and ownership model.
- Related: ADR-0024 — standard CI/CD and infrastructure-as-code runway.
- Related: ADR-0015 — authoritative edge topology. Web traffic reaches App Service through Front Door → Application Gateway, or directly from Front Door only as a priority-2 failover origin. API traffic goes Front Door → Application Gateway → APIM → BFF.
- Related: ADR-0014 — APIM is the sole API policy boundary; web apps never publish APIs.
- Related: ADR-0016 — private networking baseline.
- Related: ADR-0021 — platform observability baseline.