Automate recovery without repeating the incident
Design quota-aware scaling, bounded remediation, readiness checks and resumable operations.
Task 5.4 · Automate recovery without repeating the incident
Scaling doubles the errors
At 08:00 a queue surges and new workers need ten minutes to warm. A fixed-rate partner API throttles them, and failing readiness checks cause repeated replacements. The automated repair fires twice. Which control should act on which signal?
Compare your design with the worked answer
Pre-scale a feasible minimum before the known peak and validate quotas. Use useful completions and oldest-message age to tune workers, and enforce downstream concurrency and bounded jittered retries. Distinguish a local health failure from shared dependency degradation. Protect replacement waves with stop conditions. Persist operation and target state so repeated events converge on the same repair.
If backlog continues growing at the maximum sustainable partner rate, calculate the delay and renegotiate throughput or the customer objective. Additional workers alone cannot close a throughput deficit.
5.4.1 · Plan capacity at the point of failure
Project demand through quotas, surviving AZ capacity, downstream throughput and provisioning delay. Route a capacity alarm into a runbook before the hard limit is reached. Use actual successful transactions to validate scaling. A high ceiling in Auto Scaling does not override a regional service quota.
5.4.2 · Bound an automated repair
Define the trigger, target set, idempotency key, retry budget, kill switch and evidence for success. Use backoff with jitter for transient failures, a circuit breaker for sustained failures and bulkheads for isolation. Stop on a customer-health alarm and escalate exceptions. Repeated corrective actions should converge on a safe state.
5.4.3 · Use a scaling signal additional capacity can improve
For workers, convert queue wait into backlog per effective worker. For web services, target a suitable per-target request rate. Track warm-up and scaling lag. For predictable surges, schedule a floor early and retain reactive scaling. If the limit is a downstream service, cap concurrency and buffer work.
5.4.4 · Distinguish a sick replica from a sick dependency
Probe process health, readiness and an end-to-end customer path separately. Replace a demonstrably unhealthy task or instance with a known artifact, allow startup grace, and gate traffic on readiness. A dependency-wide outage can cause futile replacement storms. Preserve durable work and deduplicate retried events.
5.4.5 · Turn the runbook into a recoverable operation
Version a Systems Manager Automation document or equivalent procedure. Require inputs, preconditions, scoped execution roles, concurrency/failure limits, verification, rollback and escalation. Persist operation IDs so a retry can resume without repeating a finished change. Capture who initiated it and the final health result.
Apply the video example
The scaling-policy discussion distinguishes step adjustments from target tracking. Pick a metric that falls when a healthy worker is added; repeat the reasoning when every worker waits on the same throttled dependency.
Automate recovery without repeating the incident quiz
Answer 5 questions. Check each answer for an explanation.