DR implementation: API Management
Tier: T0. APIM is the shared API gateway (ADR-0014). Every portal API call goes through it, including Alya’s, and it runs the Signet validation policy for the MFE products.
Current configuration (prd)
| Setting | Value |
|---|---|
| Instance | apim-rome-prd-chn-02 |
| SKU | Classic Standard, 2 units, autoscale 2 to 3 |
| Zones | None. Classic Standard does not support availability zones. The zones setting in the module is commented out |
| State | APIs, products, policies, named values, and backends, all in Terraform. Secrets come from Key Vault through named values |
| Deletion | APIM keeps a deleted instance in soft delete for 48 hours |
Failure scenarios
| Scenario | Behaviour | Recovery | RTO and RPO |
|---|---|---|---|
| Zone loss | Units in the lost zone fail. The remaining unit may not carry the load, or both units may be affected | Microsoft-managed. Enable degraded-mode to cut load | Until Microsoft recovers. RPO 0, because APIM holds no business data |
| Regional APIM outage | Every portal API fails. Front Door priority-2 origins also point to APIM, so they do not help | Microsoft-managed. Communicate | Microsoft-managed |
| Bad policy or API deployment | Some or all APIs fail or misroute | Revert the Terraform PR and redeploy | Deployment time. RPO 0 |
| Instance deleted | Every API fails | Recover from soft delete within 48 hours. Otherwise, redeploy from Terraform | Recovery is about an hour. A redeploy takes longer, because provisioning is slow |
| Key Vault secret missing | The named value fails, and the policies that use it fail | Recover the secret (Key Vault) | Minutes |
| Signet outage | The MFE product policy cannot validate capabilities, so MFE API calls fail | Recover Signet. See the note below | Signet RTO |
Recovery procedures
Revert a bad deployment
Owner: CPE
Revert the PR in the APIM Terraform stack and redeploy through Runway. Check
the /health-probes-ext/v1/health endpoint through agw-api.<domain> and
through Front Door.
Recover a deleted instance
Owner: CPE, with approval
Within 48 hours, recover the soft-deleted instance through the ARM API
(deletedservices), using the same name and region. Then run a Terraform plan
to confirm there is no drift. After 48 hours, redeploy from Terraform. Expect
provisioning to take a long time.
Reduce load during a zone loss
Owner: Incident commander
Activate degraded mode so
that T2 and T3 calls stop. Watch the APIM Capacity metric and the 5xx
rate.
APIM backup and restore exists in the classic tiers but not in the v2 tiers, so ION does not use it. Terraform is the recovery mechanism. Verify the current tier support on Microsoft Learn before you rely on backup and restore.
Rules
- APIM MUST be zone-redundant in
prd. The target is Premium v2. - All APIM configuration MUST be in Terraform. A change made in the portal MUST be reconciled before the incident closes.
- Secrets MUST come from Key Vault named values. They MUST NOT be inline in policies.
- The
prdinstance MUST have aCanNotDeletelock.
Gaps
| ID | Severity | Gap | Owner |
|---|---|---|---|
| DR-03 | HIGH | Classic Standard, no availability-zone support | CPE |
Validation and drills
- Zone-down test in
gmawith Chaos Studio. This needs a zone-redundant SKU ingmafirst, to be meaningful. - After the Premium v2 migration: measure the error rate during a simulated zone loss.