DR implementation: Container Apps
Tier: T0 to T1. Container Apps host the investigations and remediation services, the SOCRA workloads, and the Temporal cluster in the ziege environment (ADR-0019). The apps are stateless. Temporal keeps its state in MySQL.
Current configuration (prd)
| Environment | Zone-redundant | Hosts |
|---|---|---|
coapp-zge | Yes | Temporal server and the ziege workers |
coapp-socra | Yes | SOCRA services |
coapp-bcrem | Yes | Remediation services |
coapp-bcinv | Yes | Investigations services |
The ziege Terraform enables zone redundancy only in gma and prd. apa and
bta are single-zone, which is allowed by the environment flexibility rule.
Failure scenarios
| Scenario | Behaviour | Recovery | RTO and RPO |
|---|---|---|---|
| Zone loss | Replicas are rescheduled in the healthy zones. Apps need at least two replicas to stay up without interruption | Automatic | Minutes. RPO 0 |
| Zone loss while the registry is unavailable | New replicas cannot pull images. Replicas that are already running keep running | Wait for the registry, or fix DR-10 | Registry RTO |
| Bad revision | Errors or bad writes | Move traffic to the previous revision. With single-revision mode, redeploy the previous image tag | Minutes |
| App deleted | The service is down | Redeploy through Runway | Under an hour. RPO 0 |
| Environment deleted | Every app in it is down. For coapp-zge, Temporal stops, and workflows pause with their state safe in MySQL | Recreate the environment and apps from Terraform, then redeploy. Zone redundancy and the VNet are set at creation | Hours. RPO 0 for Temporal history in MySQL |
Recovery procedures
Roll back a revision
Owner: Owning service team
In multiple-revision mode, set traffic to 100% on the last good revision. In single-revision mode, redeploy the last good image tag through Runway.
Recreate an environment
Owner: CPE with the owning team
Run the environment Terraform with zone_redundancy_enabled = true and the
same infrastructure subnet. Then redeploy every app. For coapp-zge, start the
Temporal server first, check that it connects to MySQL, then start the
workers. Workflows resume from their persisted history.
Rules
- Environments MUST be zone-redundant in
gmaandprd. Recreating an environment is the only way to change this setting. - T0 and T1 apps MUST run at least two replicas in
prd, so that they survive a zone loss. - Apps MUST NOT use local or ephemeral volumes for durable state.
- Images MUST be pulled by immutable tag or digest, so that a rollback is exact.
Gaps
| ID | Severity | Gap | Owner |
|---|---|---|---|
| DR-10 | MEDIUM | The registry is not zone-redundant | CPE |
Validation and drills
- Zone-down test in
gma: confirm that the replicas reschedule and that Temporal workflows continue. - Yearly: recreate a
gmaapp from Runway and time it.