DR implementation: Function Apps
Tier: T0 to T3, depending on the service. Function Apps run the ingestion, integration, BFF, and replication work. They are stateless: their durable state is in Service Bus, Event Hubs, Cosmos DB, SQL, and Storage.
Current configuration (prd)
| Plan SKU | Plans | Zone-redundant | Notes |
|---|---|---|---|
Y1, Linux Consumption | 46 | 0 | Consumption does not support zone redundancy. Accepted LOW-severity gap |
FC1, Flex Consumption | 3 | 1 | Vishnu uses zone_balancing_enabled = true |
EP1, EP2, Elastic Premium | 2 | 2 | |
P0v3 | 4 | 2 | |
P1v3 | 1 | 0 | |
S1 | 3 | 0 | |
B1, B2 | 3 | 0 | Basic does not support zone redundancy |
WS1, Logic Apps Standard | 1 | 0 |
Every Function App also depends on its host storage account
(AzureWebJobsStorage) for triggers, leases, and deployment packages. A
function on a zone-redundant plan whose host storage is LRS is still exposed
to a zone loss. See Storage.
Why Y1 is accepted as LOW
The functions are stateless, and every trigger source is durable and zone-redundant. When a zone is lost, the Consumption scale controller places new instances in healthy infrastructure, and the messages that are in flight are redelivered. The expected effect is a short delay, not data loss. Consumption is also much cheaper for spiky workloads. The gap is recorded once as DR-12, at LOW severity.
Failure scenarios
| Scenario | Behaviour | Recovery | RTO and RPO |
|---|---|---|---|
| Zone loss, zone-redundant plan | Instances in the other zones carry the load | Automatic | Minutes. RPO 0 |
Zone loss, Y1 plan | Executions in the lost zone fail. The scale controller reallocates. Messages are redelivered | Automatic | Minutes, best effort. RPO 0 for durable triggers |
| Zone loss, non-zone-redundant dedicated plan | Instances in the lost zone are gone until Microsoft reallocates them | Microsoft-managed | Until reallocation. RPO 0 |
| Host storage unavailable | Triggers stop. The app cannot start | Restore the storage account. See Storage | Storage RTO |
| Bad code deployment | Errors, or bad data written downstream | Redeploy the previous version through Runway. If bad data was written, follow the data recovery flow | Deployment time |
| App or plan deleted | The function stops. Messages build up in the queues | Redeploy the infrastructure and code through Runway. Deleted-app restore is not supported for Consumption and Elastic Premium | Under an hour. RPO 0, the messages wait in the queues |
| Poison messages | Dead-letter queue grows | Fix, then re-submit from the dead-letter queue | Not applicable |
Recovery procedures
Roll back a bad deployment
Owner: Owning service team
Re-run the Runway deployment for the last good version. If a deployment slot
is used, swap back. Pause the trigger with
AzureWebJobs.<function>.Disabled = true if the function is still writing bad
data.
Rebuild a deleted app
Owner: Owning service team with CPE
Run the service’s Terraform through Runway. Then deploy the code. Check that the managed identity, the Key Vault references, the App Configuration connection, and the role assignments are recreated, before you re-enable the triggers.
Drain after recovery
Owner: Owning service team
Re-enable the triggers. Watch the queue depth and the dead-letter count. Scale-out limits SHOULD be set so that the drain does not overload the downstream stores.
Rules
- T0 and T1 Function Apps SHOULD run on a zone-redundant plan. New apps
SHOULD use Flex Consumption with
zone_balancing_enabled = true. - The host storage of a T0 or T1 app MUST be ZRS.
- Function Apps MUST NOT hold state on the local disk or in memory that survives an execution.
- Every app MUST be redeployable from Runway without manual steps.
Gaps
| ID | Severity | Gap | Owner |
|---|---|---|---|
| DR-11 | MEDIUM | Dedicated plans without zone redundancy | Owning service teams |
| DR-12 | LOW | 46 Y1 plans without zone redundancy | Owning service teams |
| DR-16 | MEDIUM | LRS host storage, for example aspelecprdfa01 | Owning service teams |
Validation and drills
- Zone-down test in
gma: measure the error spike and the redelivery for oneY1app and one Flex app. - Yearly: delete and rebuild a non-critical
gmaapp from Runway, and time it.