DR implementation: Storage accounts
Tier: T0 to T3, depending on the content. Storage accounts are often a hidden dependency. They hold:
- Function App host storage;
- Event Hubs checkpoints;
- static portal content;
- Terraform state;
- the GitHub repository backup;
- the operational-data replica.
Current configuration (prd)
| Redundancy | Count | Accounts |
|---|---|---|
| ZRS | 48 | Most accounts |
| RA-GZRS | 1 | stvshnprdchn01, the operational-data replica |
| LRS | 11 | stghbkp, stoptmn, stoptes, stcnvyr 01, 02, and 03, stsocra, stbcinv, stthms, stzge, aspelecprdfa01 |
An LRS account keeps all its copies in one zone. A zone loss can make it unavailable, and a zone that is destroyed can lose its data. Each LRS account needs either ZRS or a recorded acceptance (DR-16).
Data protection features
| Feature | Protects against | Use on |
|---|---|---|
| ZRS | Zone loss | Every T0 and T1 account |
| Blob soft delete | Deleted blobs | Accounts with authoritative or hard-to-regenerate data |
| Container soft delete | Deleted containers | Same |
| Blob versioning | Overwrites and corruption | Same, and Terraform state |
| Point-in-time restore for block blobs | Bulk corruption | Accounts where many blobs can be corrupted at once. It needs versioning, change feed, and soft delete |
| Account recovery | Deleted account | Every account. Microsoft supports recovery within 14 days, as long as no new account has taken the name |
CanNotDelete lock | Accidental account deletion | Every stateful prd account |
Accounts that hold only regenerable content, such as host storage or build artefacts, need ZRS and a lock. Versioning is optional for them.
Failure scenarios
| Scenario | Behaviour | Recovery | RTO and RPO |
|---|---|---|---|
| Zone loss, ZRS or GZRS | No effect | Automatic | Not applicable |
| Zone loss, LRS | The account is unavailable until the zone returns. Data loss is possible if the zone is destroyed | Wait. Regenerate the content where you can | Until the zone returns |
| Blob deleted | Missing data | Undelete from soft delete | Minutes. RPO 0 within the window |
| Blob overwritten or corrupted | Wrong data | Promote an earlier version, or restore the container to a point in time | Minutes. RPO is the version or restore point |
| Container deleted | Missing data | Restore from container soft delete | Minutes |
| Account deleted | Every dependant fails | Recover the account within 14 days. Otherwise, recreate it and regenerate the content | Hours. A request to Microsoft may be needed |
| Host storage lost | The Function App cannot start, and its triggers stop | Recover the account, or recreate it and redeploy the app | Under an hour |
| Checkpoint store lost | Event Hubs consumers restart from their configured start position | See Event Hubs | Minutes |
Recovery procedures
Recover deleted or overwritten blobs
Owner: Owning service team
Undelete the blobs from soft delete, or promote the last good version as the current version. For bulk corruption, run a point-in-time restore on the affected container prefix. This is an operation on the whole account, so pause the writers first.
Recover a deleted account
Owner: CPE
In the portal, use Restore deleted account for the subscription, within 14 days. If the account is not listed, open a Microsoft support request. Then re-apply the role assignments and network rules from Terraform.
Rules
- T0 and T1 accounts MUST be ZRS (or GZRS) in
gmaandprd. - Accounts with authoritative or hard-to-regenerate data SHOULD enable blob soft delete, container soft delete, and versioning.
- Terraform state accounts MUST be ZRS with versioning.
- Every stateful
prdaccount MUST haveprevent_destroyand aCanNotDeletelock. - Shared-key access SHOULD be disabled, as data protection requires. This also limits the blast radius of a leaked key during an incident.
Gaps
| ID | Severity | Gap | Owner |
|---|---|---|---|
| DR-16 | MEDIUM | 11 LRS accounts in prd | Owning service teams. CPE for stghbkp |
| DR-19 | LOW | No versioning or soft delete on the Vishnu replica | Vishnu team |