Video in progress
How do you plan in advance which system features to switch off (graceful degradation) under load or failure?
I split features into tiers by business importance: checkout and payment are protected to the end, while recommendations, reviews and analytics are the first to be switched off. For every second-tier feature, a kill switch and "what do we show when it's missing" are prepared in advance and rehearsed.
📖 Answer
During an incident, spending half an hour looking for the answer to "can we switch off recommendations?" is the most expensive half hour. That decision has to be made on a quiet day.
I build a table like this:
| Tier | Examples | On failure |
|---|---|---|
| 0 — core | login, cart, checkout, payment | protected, at the expense of the others |
| 1 — important | search, order history | simplified (from cache, fewer filters) |
| 2 — extra | recommendations, reviews | switched off, an empty block |
| 3 — background | analytics, reports, email digest | paused, delivered later |
Then the technical preparation for each tier:
- a kill switch: a feature flag or dynamic config that works in seconds without a deploy. Every switch has an owner and a line in the runbook;
- the UI knows the "missing" state: if the recommendations block comes back empty, the page doesn't break;
- calls from tiers 2–3 are in a separate bulkhead or pool, so they can't eat tier 0's threads;
- background work goes through a queue, so it isn't lost when paused and is processed later;
- automation: when load goes up, load shedding drops tier 3 traffic first (by endpoint or a priority header).
Most important is testing it. If a switch hasn't been flipped in a year, nobody knows what will happen on the day it is. In a game day, switching off the recommendations service and seeing that checkout conversion didn't change is the only proof the plan works.
And an agreement with the business: the answer to "is it acceptable if reviews aren't visible for 2 hours on a sale day?" comes from the product owner, not the developer.
Sign up to mark studied questions and save your progress.