Decommissioning legacy systems
This course covers removing a feature, an endpoint, a table or column, or a whole service while the code keeps serving requests. It starts with proving a feature is dead through production instrumentation, since a grep only shows that code is reachable. It then covers the strangler fig pattern run in reverse, shadow and dark reads, and flag ramp-down with flag cleanup. Later lessons treat public APIs with Deprecation and Sunset headers, the safe order for jobs, tables and columns, and a decommission runbook.
What you'll learn
- ✓Proving a feature is unused with production counters and an observation window that covers its usage cycles
- ✓Running the strangler fig pattern in reverse, with shadow reads and dark reads
- ✓Ramping a removal flag down in increments and deleting it on a tracked deadline
- ✓Retiring a public endpoint with Deprecation and Sunset headers and zero-traffic evidence
- ✓Removing jobs, tables and columns in order: stop writes, stop reads, remove code, drop storage
- ✓Following a decommission runbook and a decision tree for the four removal targets
The feature nobody will admit is dead
An engineer proposes deleting the CSV export button. It has been broken for eight months: the background job that generates the file raises on every run, silently, into a queue nobody watches. Someone greps the codebase for csv_export and finds twelve call sites. The pull request gets a "let's not…
Read the full lesson free →Curriculum
7 lessonsThe feature nobody will admit is dead
Why deleting code is harder than adding it, and the four removal targets with their shared order of steps.
Instrumentation before deletion
Using production counters and a long enough observation window to prove a feature is unused, since grep cannot.
The strangler fig in reverse, and shadow reads
Running the strangler fig pattern backwards and using shadow and dark reads to check a path before cutting traffic.
Flag ramp-down, and the flag that outlives the feature
Ramping a removal flag down in increments, deleting it after the code, and giving every flag an expiration date.
Retiring an endpoint or a public API
Retiring endpoints with external callers using Deprecation and Sunset headers, a long window and zero-traffic evidence.
Killing jobs, tables, and columns in order
Removing jobs, tables and columns in order: stop writes, stop reads, remove code, then drop storage.
The decommission runbook
A runbook and decision tree that put the course's techniques in order, and how the CSV export example ends.