ION DocsV3
  • Architecture
    • ION Architecture V2
      • ION V2 — Architecture Overview
      • V2 context
        • V2 capacity model
        • V2 constraints
        • V2 integration boundaries
        • V2 requirements
        • V2 solution strategy
      • V2 Structural Design
        • ION V2 Landscape
        • ION V2 Platform Views
          • ION V2 Delivery and Runway
          • ION V2 Incident-Processing Pipelines
          • ION V2 Platform Networking
          • ION V2 Platform Observability
          • ION V2 Platform Security
        • ION V2 System Context
        • ION V2 Systems
          • Alya System Topology
          • Cogs System Topology
          • Ion IQ System Topology
          • Kingsman System Topology
          • Pigeon System Topology
          • Veritas System Topology
          • Watchtower System Topology
      • V2 evolution and platform lineage
        • Tiberium Origins
          • Tiberium Architecture Overview
          • Tiberium Components Architecture Overview
        • Voyager and the V2 Merge
          • Voyager Architecture Overview
          • Voyager Identity Architecture Overview
          • Voyager Services Architecture Overview
      • V2 Platform Architecture
        • Alya Workbench
          • Mission Brief: Alya (Workbench for Cyber Defenders)
        • Asset Discovery
        • Automation
        • Customer Communications
          • Notification and Escalation Design
        • Reporting and Dashboards
        • Vulnerability Mitigations
      • V2 Well-Architected
        • V2 Reliability
          • Availability Architecture
        • V2 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V2 Security Architecture
          • Teams Notification Security
          • Customer Data and PII
          • V2 Identity
            • Applications and Authorization
            • V2 Identity Architecture
            • Microsoft Entra ID
            • V2 Identity Standard
            • V2 Identity Implementation
              • Application Registration
              • Application Roles
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Managed Identity
            • V2 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Portal Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Customer Environment Access Architecture
            • Customer Environment Access Guidelines
            • Customer Environment Access How-to
    • ION Architecture V3
      • ION V3 Architecture Overview
      • V3 context
        • V3 capacity model
        • V3 constraints
        • V3 integration boundaries
        • V3 requirements
        • V3 solution strategy
      • V3 Structural Design
        • Data and events
          • Archival and retention
          • Event model
          • Event sourcing
          • Event store
          • Micro-frontend interaction
          • Recovery and disaster recovery
          • Replay and reconstruction
          • Reporting and customer analytics
          • Event-sourcing requirements
          • Snapshots
          • UI interaction
        • ION v3 domains
          • Assets domain
            • Assets domain flows
            • Assets domain implementation
            • Assets domain model
          • Customer Collaboration domain
            • Customer Collaboration domain flows
            • Customer Collaboration domain implementation
            • Customer Collaboration domain model
          • Incident domain
            • Incident domain flows
            • Incident domain implementation
            • Incident domain model
          • Investigation domain
            • Investigation domain flows
            • Investigation domain implementation
            • Investigation domain model
          • Remediation domain
            • Remediation domain implementation
            • Remediation domain model
          • Ticket domain
            • Ticket domain flows
            • Ticket domain implementation
            • Ticket domain model
        • ION V3 Landscape
        • ION V3 Platform Views
          • Internal API
            • Internal API architecture
            • Internal API consumer guide
            • Internal API identity and access
            • Internal API implementation
          • Micro-Frontends
            • Micro-Frontends architecture
            • Micro-Frontends capability service (Signet)
            • Micro-Frontends composition
            • Micro-Frontends identity and access
            • Micro-Frontends implementation
            • Micro-Frontends real-time (SignalR)
            • Micro-Frontends routing and ingress
            • Shells and MFEs
          • SOAR Integration
            • SOAR Integration architecture
            • SOAR Integration customer onboarding
            • SOAR Integration Identity and Access Design
            • SOAR Integration implementation
            • SOAR Integration operations
        • ION V3 System Context
        • ION V3 systems
          • Alya
          • Cogs
          • ION IQ
          • Kingsman
          • Pigeon
          • Veritas
          • Watchtower
      • V2 to V3 evolution
        • V2 to V3 architecture delta
        • V2 to V3 decision changes
        • V2 to V3 migration guidance
        • V2 to V3 service impact
      • Well-Architected
        • Cost Optimization
          • Cost Governance
            • Cost Governance Architecture
            • Cost Governance Guidelines
            • Cost Governance Implementation
          • SKU Strategy
            • SKU Strategy Architecture
            • SKU Strategy Guidelines
            • SKU Strategy Implementation
        • Operational excellence
          • Audit Logs
            • Audit Logs Architecture
            • Audit Logs Guidelines
            • Audit Logs Implementation
          • CI/CD Runway
            • CI/CD Runway Architecture
            • CI/CD Runway Guidelines
            • CI/CD Runway Implementation
          • Feature Flags
            • Feature Flags Architecture
            • Feature Flags Guidelines
            • Feature Flags Implementation
          • Incident management
            • Incident management architecture
            • Incident management guidelines
            • Incident management implementation
          • Azure Landing Zone
            • Azure Landing Zone Architecture
            • Azure Landing Zone Guidelines
            • Azure Landing Zone Implementation
          • Notifications
            • Notifications Architecture
            • Notifications Guidelines
            • Notifications Implementation
          • Observability
            • Observability Architecture
            • Observability Guidelines
            • Observability Implementation
        • Performance efficiency
          • Capacity, sizing, and scaling
            • Capacity, sizing, and scaling architecture
            • Capacity, sizing, and scaling guidelines
            • Implement capacity, sizing, and scaling
          • UI responsiveness
            • UI responsiveness architecture
            • UI responsiveness guidelines
            • Implement UI responsiveness
        • V3 reliability
          • Application resilience patterns
          • Critical flows
          • Customer reliability assurance
            • ION Platform reliability and service continuity
            • Customer reliability slides
          • Disaster recovery
            • Disaster recovery architecture
            • Disaster recovery guidelines
            • Disaster recovery implementation
              • DR implementation: API Management
              • DR implementation: App Configuration
              • DR implementation: Application Gateway
              • DR implementation: Azure SQL Database
              • DR implementation: Container Apps
              • DR implementation: Container Registry
              • DR implementation: Cosmos DB
              • DR implementation: Event Hubs
              • DR implementation: Azure Front Door
              • DR implementation: Function Apps
              • DR implementation: Key Vault
              • DR implementation: Log Analytics and Application Insights
              • DR implementation: MySQL Flexible Server (Temporal)
              • DR implementation: PostgreSQL Flexible Server
              • DR implementation: Azure Managed Redis
              • DR implementation: Service Bus
              • DR implementation: SignalR
              • DR implementation: Storage accounts
            • Operational-data replication
            • Disaster recovery operations
          • Edge and routing
            • Azure Application Gateway
              • Azure Application Gateway architecture
              • Azure Application Gateway guidelines
              • Azure Application Gateway implementation
              • Azure Application Gateway resiliency
              • Azure Application Gateway security
            • Azure Front Door
              • Azure Front Door architecture
              • Azure Front Door guidelines
              • Azure Front Door implementation
              • Azure Front Door resiliency
              • Azure Front Door security
          • Event-store disaster recovery (moved)
          • Failure mode analysis
          • Graceful degradation
            • Graceful degradation architecture
            • Graceful degradation guidelines
            • Graceful degradation implementation
          • V3 reliability maturity model
            • V3 reliability maturity assessment
            • Maturity level 2: self-preservation
            • Maturity level 3: recovery readiness
            • Maturity level 4: maintain stability
            • Maturity level 5: stay resilient
          • Multi-region replication
            • Multi-region replication architecture
            • Multi-region replication guidelines
            • Multi-region replication implementation assessment
          • Reliability testing
          • Scaling and headroom
          • Targets and health model
          • Trade-offs and accepted risks
        • V3 Security
          • API Management
            • API Management Architecture
            • API Management Guidelines
            • API Management Implementation
              • API Contracts and Asynchronous Operations
              • APIM Deployment and Debugging
              • APIM Global Policy Implementation
              • APIM Platform Provisioning
              • APIM Policy Authoring
              • APIM Service Onboarding
              • APIM Webhook Flow Implementation
            • API Management Policy Model
          • V3 Security Architecture
          • Data protection
            • Data protection architecture
            • Data protection guidelines
            • Data protection implementation guidelines
              • API Management
              • Application Gateway
              • Azure SQL Database
              • Azure Container Apps
              • Azure Cosmos DB
              • Azure Front Door
              • Azure Function Apps
              • Azure Database for MySQL
              • Azure Database for PostgreSQL
              • Data protection procedures
          • V3 Security Guidelines
          • V3 Identity
            • Applications and Authorization in ION V3
            • V3 Identity Architecture
            • Capabilities
            • Microsoft Entra ID for ION V3
            • V3 Identity Standard
            • V3 Identity Implementation
              • App Service Authentication
              • Application Registration
              • Application Roles
              • Customer Azure RBAC
              • Customer Identity Onboarding
              • Identity Lifecycle and Operations
              • Mailbox-Scoped Access
              • Managed Identity
              • Workload Identity Federation
            • V3 Identity Workflows
              • Alya Workbench Identity Workflow
              • Customer Azure RBAC Identity Workflow
              • Customer Portal Identity Workflow
              • Mailbox Access Identity Workflow
              • Microservices Identity Workflow
              • ServiceNow Inbound Identity Workflow
              • Shell and MFE Identity Workflow
              • Microsoft Teams Identity Workflow
          • Customer Environment Access
            • Azure Lighthouse
              • Azure Lighthouse implementation
            • GDAP and Tenant Governance
              • Access Packages (legacy)
              • GDAP human access implementation
            • Customer environment access guidelines
            • Multi-tenant Entra apps
              • Multi-tenant Entra apps implementation
            • Teams B2B Direct Connect
              • Teams B2B Direct Connect implementation
          • Network Security
            • Network Security Architecture
            • Network Security Guidelines
            • Network Security Implementation
              • Egress and Static IPs
              • Resource Access Restrictions
          • V3 Security Patterns
    • ION Architecture V4
      • How V4 evolves from V3
  • Principles
  • Patterns
    • Application Permissions Only
    • Async REST
    • Audit Logs (Pattern)
    • Auth / AuthZ
    • Dead Letter Queue (DLQ)
    • Dual Writes (and how to avoid them)
    • ECST — Event-Carried State Transfer
    • Event Hubs Throttling
    • Feature Flags (Pattern)
    • Idempotent Write
    • MFE UI Interaction
    • Notifications (Pattern)
    • Private Data Store Access
    • Schema Evolution
    • Service Bus Topic Throttling
    • UI Interaction with an Event-Sourced Backend
  • Standards
    • API Standard
    • API Standards
    • Coding Standard
    • Coding Standards
    • Documentation Standard
    • Documentation Standards
    • Microservice Standard
    • Microservice Checklist
    • Operational Readiness Standard
    • ORR — Operational Readiness Review Checklist
  • Decisions
    • ADR-0001
    • ADR-0002
    • ADR-0003
    • ADR-0004
    • ADR-0005
    • ADR-0006
    • ADR-0007
    • ADR-0008
    • ADR-0009
    • ADR-0010
    • ADR-0011
    • ADR-0012
    • ADR-0013
    • ADR-0014
    • ADR-0015
    • ADR-0016
    • ADR-0017
    • ADR-0018
    • ADR-0019
    • ADR-0020
    • ADR-0021
    • ADR-0022
    • ADR-0023
    • ADR-0024
    • ADR-0025
    • ADR-0026
    • ADR-0027
    • ADR-0028
    • ADR-0029
    • ADR-0030
    • ADR-0031
    • ADR-0032
    • ADR-0033
    • ADR-0034
  • Services
  • Governance
    • Assumptions
    • Discrepancies
    • V3 reference coverage and conflict matrix
OntinueION Docs
  1. Architecture
  2. ION Architecture V3
  3. Well-Architected
  4. V3 reliability
  5. Edge and routing
  6. Azure Application Gateway
  7. Azure Application Gateway resiliency

Azure Application Gateway resiliency

reliability
architecturev3

Azure Application Gateway resiliency

Application Gateway is a regional, zone-redundant service. It is a single shared resource per environment, so ION’s resiliency work covers four things:

  1. The gateway must survive an instance or zone failure and scale with load.
  2. It must detect and remove an unhealthy backend quickly.
  3. Changes must not break every hostname at once, because the gateway is shared.
  4. The gateway must be the fallback path when Front Door is down.

Targets come from ADR-0017 (99.9% SLO and the per-scenario recovery objectives). Capacity numbers come from the capacity model.

Failure modes

FailureDetected byGateway behaviorUser impactRecovery
Instance failurePlatform health, CapacityUnits and request metricsRemaining instances take the load. Autoscale adds instancesNone to brief latencyAutomatic
Availability zone failureResource Health, platformInstances in the other two zones keep servingPossible brief errors on in-flight connectionsAutomatic
Autoscale ceiling reachedCapacityUnits near maximum, rising latency and 5xxRequests queue or fail when load exceeds maximum capacitySlow or failing requests on every hostnameRaise the maximum, shed load
Backend pool has no healthy hostProbe, UnhealthyHostCount, 502 responsesThe gateway returns 502 Bad Gateway for that listenerOne portal or the API is unavailableFix the backend (graceful degradation)
Probe too slowDelayed UnhealthyHostCount, user reportsThe gateway keeps sending traffic to a dead host until the probe flipsErrors for 90 s or more per failureTighten probes (probe design)
Bad listener, rule, or rewrite changePost-deploy regression suite, error alertsServes the misconfiguration to every hostname that shares the rule setAnything from one path to every portalRevert the PR and redeploy (change safety)
Certificate expired or Key Vault unreadableCertificate expiry alert, Key Vault logsTLS handshake fails on every listenerEvery agw-* hostname fails, and Front Door fails over to priority 2Rotate the certificate, restore the identity role
Gateway failure or 502 on the health pathFront Door origin health on multi-origin groupsNot servingREST fails over to priority 2. SignalR WebSocket stopsInteraction with Front Door
Zonal public IP or DDoS eventDDoS telemetry, public IP metricsPlatform mitigationShort degradationAzure DDoS protection
Regional (Switzerland North) outageResource Health, synthetic checksNot availableWhole platform downRegional DR, not the gateway

Zones and capacity

The gateway runs across zones 1, 2, and 3 with autoscale.

SettingGuidelineCurrent
ZonesMUST be 1, 2, and 3 in every environment["1","2","3"], hardcoded in the module
Minimum capacityMUST be 2 or more in mgtgma and mgtprd2, hardcoded in the module
Maximum capacityMUST be sized from the capacity model10, hardcoded in the module
Capacity alertMUST alert at 80% of the maximumNone
ConfigurabilityMinimum and maximum MUST be Terraform variablesNot variables
Flexibility in alpha and beta

mgtapa and mgtbta hold no customer data. Their minimum capacity MAY be lower than in mgtgma and mgtprd to optimize cost. Zones stay on, so the topology in alpha and beta matches production. A lower minimum is a tfvars value with a PR note, not a module change.

Capacity is not unlimited. A maximum that is too low turns a traffic spike into errors on every hostname, because they share the gateway. Size the maximum from the peak request rate and TLS connection rate in the capacity model, and revisit it when a new frontend is added.

Probe design

Application Gateway probes each backend directly, from each gateway instance. A host that fails the configured number of consecutive probes is removed from the pool until a probe succeeds again.

SettingGuidelineCurrent
Interval10 to 15 s30 s on every probe
Timeout5 to 10 s, always below the interval30 s on every probe, equal to the interval
Unhealthy threshold2 or 33 on every probe
Success codesThe narrowest set the endpoint returns200-399 (SignalR probes 200; blob probes also accept 400)
Host headerThe backend FQDN, matching the HTTP settingsMatches

Use real health paths

BackendProbe pathNotes
Shared APIM/status-0123456789abcdefThe APIM gateway status endpoint. It does not call backends
Azure SignalR/api/healthThe managed service health endpoint
SPA hosts (App Service and Static Web Apps)/Returns the SPA shell
Blob storage backends/The blob service root returns 400 for anonymous requests, so the probe accepts 400 as reachable
Current probe values are a gap

Every probe uses 30 s interval, 30 s timeout, and threshold 3. A dead backend can keep receiving traffic for about 90 s, and longer when each probe waits for its timeout. The target values give about 20 to 45 s. The gap and its fix are in implementation.

Connection draining

Connection draining lets existing requests finish when a backend host is removed from a pool, for example during App Service scale-in or a deployment. It is not configured today.

  • Connection draining SHOULD be enabled on any backend pool with more than one instance, with a timeout that covers the longest normal request (the request timeout is 30 s today).
  • Single-instance and managed-service pools (SignalR, Static Web Apps) gain nothing from it.
  • The gap is tracked in implementation.

Interaction with Front Door failover

Front Door treats Application Gateway as priority 1 and a direct origin as priority 2. The Front Door health probe for the API group travels through the gateway to APIM. So the gateway is detected as failed when any of these is true:

  • the gateway is unreachable or returns 502;
  • the certificate fails TLS validation;
  • APIM is down, because the probe path ends at APIM.

Failover speed depends on the Front Door probe interval, not the gateway probe. The Front Door timing is in the Front Door resiliency page. The priority-2 path skips the gateway and therefore skips its rewrites, so priority-2 origins need their own header and CORS handling.

SignalR has no failover

The SignalR WebSocket leg goes directly to the gateway, so Front Door has no failover for it. If the gateway fails, REST traffic fails over and real-time updates stop. Shells and MFEs fall back to reconnecting state, REST catch-up, and polling, as described in the real-time design.

Change safety

One gateway serves every agw-* hostname in an environment. A bad change to a shared object affects all of them. Shared objects include the gateway-rewrite-ruleset CORS set, the gateway-pool, certificates, probes, and routing-rule priorities.

There is one gateway per environment, and ION does not run a second gateway for now. Blast radius is limited by process instead.

The regression suite

rome-ion/infrastructure/hub/hub-test-suite is the post-deployment gate for both Front Door and Application Gateway. It is asynchronous (asyncio and httpx), measures latency, checks TLS certificate expiry, and writes an HTML report.

AspectState
Entry pointmain.py --infra agw --env <apa, bta, or gma>
Route definitionsagw_routes.yaml (gateway) and afd_routes.yaml (Front Door)
CoverageThe default and agw-api listeners (health path, plus a Bondi BFF call), Alya shell API calls (customers, incidents, service requests, SignalR negotiate modification), and the web listeners for the Alya shell, automation workbench, Ioniq, service management, customer, incidents management, security posture improvement, and investigation workbench
Not coveredPortal shell, portal core, and lobotomy listeners, the docs-site listener, the SignalR WebSocket hostnames, rewrite parity with Front Door, and CORS headers
ProductionThe route files define apa, bta, and gma. There is no prd run, so production relies on gamma plus a manual smoke test

Extending the suite to cover every listener is an implementation task. A listener that the suite does not test is a listener whose breakage is found by users.

The gateway as the outage bypass

When Front Door fails, the gateway is the fallback. It is already prepared for this:

  • every agw-* hostname resolves to the gateway;
  • the Alya shell hostname has path rules that mirror Front Door’s /api/* rewrites;
  • the per-app header set adds security headers when X-Azure-FDID is absent;
  • the Alya Entra callback URL and the APIM CORS list include the gateway hostname.

The steps and the approval path are in the Front Door manual bypass runbook. The gateway NSG allows internet traffic on 443 today, so no NSG change is needed. Once Front Door-only enforcement exists (target state, see security), the bypass is a human change that makes the gateway reachable from the internet for the declared incident.

Validated for Alya only

A portal is bypass-capable only if its agw- hostname has the Entra callback URL, the APIM CORS origin, and the API path rules. That is validated for the Alya shell. The bypass has no WAF.

Observability and alerts

Diagnostic settings are applied through Azure Policy. They send access and performance logs to the Switzerland North Log Analytics workspace. These alerts MUST exist in every environment, routed to the CPE action group:

AlertSignalWhy
Resource HealthGateway health degraded or unavailableDetects a platform incident. In production only today
Unhealthy host countUnhealthyHostCount above zero, per backend poolA backend was removed from a pool
Backend 5xxBackendResponseStatus with status group 5xx above baselineBackend failures and bad deployments
Failed requestsFailedRequests above baselineThe gateway itself failed to serve
Capacity unitsCapacityUnits above 80% of the maximumAutoscale is close to its ceiling
Backend connect timeBackendConnectTime above baselineA backend is slow to accept connections before it fails
Certificate expiryKey Vault certificate near-expiry, 30 days or lessAn expired certificate fails every listener

Today only the production Resource Health alert exists. There are no metric alerts. scripts/get_cert_renewal_status.py checks App Service Certificate orders and posts to Teams, but nothing schedules it. It is not an expiry alert.

Drills

  • Stop one gateway instance, or force a zone failover in a non-production environment, and confirm no user-visible errors.
  • Disable a backend and measure the time until UnhealthyHostCount rises and the listener returns 502. Compare it with the probe settings.
  • Run the Front Door bypass end to end at least once a year in a non-production environment, including sign-in, MFE load, API calls, and SignalR.
  • Deploy a harmless change through all four environments with the regression suite and confirm each gate runs.

Related pages

  • Architecture
  • Security
  • Guidelines
  • Front Door resiliency
  • Disaster recovery
  • Graceful degradation
  • Microsoft Learn: Application Gateway health probes
  • Microsoft Learn: Autoscaling and zone-redundant Application Gateway v2
  • Microsoft Learn: Application Gateway metrics

On this page

  • Failure modes
  • Zones and capacity
  • Probe design
  • Use real health paths
  • Connection draining
  • Interaction with Front Door failover
  • Change safety
  • The regression suite
  • The gateway as the outage bypass
  • Observability and alerts
  • Drills
  • Related pages
PreviousAzure Application Gateway implementation
NextAzure Application Gateway security
Edit on GitHubSecurity