PATTERN Cited by 1 source
Tainted instance replacement¶
Pattern¶
When an external system detects that a running instance has deviated from its desired state (via security signals, manual access, AWS events, or drift detection), it emits a taint signal that schedules the instance for graceful replacement. The instance is not immediately terminated — it is replaced according to the service's replacement policy and rate limits.
Mechanism¶
- An event occurs that marks an instance as "tainted":
- Security tooling detects a vulnerability or configuration deviation.
- A human SSHs into a production instance (manual access signal).
- An AWS EC2 event indicates hardware degradation or scheduling changes.
- The taint signal is consumed by a lifecycle enforcement system.
- The instance is scheduled for replacement according to service policies.
- Replacement respects rate limits (per-service/region/AZ) to prevent capacity impact.
- The instance continues serving until its replacement is healthy.
- On replacement completion, the tainted instance is terminated.
Benefits¶
- Reinforces immutability: Any deviation from desired state triggers eventual replacement, not remediation.
- Reduces vulnerability window: Tainted instances have bounded remaining lifetime.
- Discourages ad-hoc changes: Operators know manual changes will be reverted via replacement.
- Graceful: Services remain healthy throughout the replacement process.
Slack's implementation¶
The Reaper in Shipyard implements this pattern. Notably, "while manual remote access remains available for emergency scenarios, manually accessing a production-class node will generate a signal that marks the instance for eventual replacement, supporting our immutable infrastructure goals" (Source: sources/2026-07-14-slack-shipyard-next-generation-ec2-platform).
Seen in¶
- sources/2026-07-14-slack-shipyard-next-generation-ec2-platform — The Reaper's taint-signal consumption and graceful replacement scheduling.