Mental Models204 cards · 12 fields

Mental Models/Systems

Tight Coupling and Cascading Failure

紧耦合与级联失效

When every link waits on the last with no slack, one failure runs all the way down.

On the afternoon of August 14, 2003, in Ohio, several high-voltage lines belonging to the power company FirstEnergy sagged into trees and tripped, one after another. The alarm system in the control room had already failed, and the operators did not see in time that the grid was getting worse. The current from the tripped lines shifted onto nearby lines, which became overloaded in turn and dropped out of service one after another. The failure spread east to New York and north into Ontario, Canada. About 50 million people lost power, and in New York some passengers were trapped on the subway.

You're rushing from work to catch an evening flight, and the trip is a three-leg relay: the subway, the airport express train, the check-in counter. The express runs every half hour, the counter closes forty minutes before takeoff, and you were going to make it just in time. A route like this is tightly coupled: every leg waits on the one before, and there is no slack anywhere in between. The subway runs ten minutes late, you miss this express and have to wait half an hour for the next, and by the time it arrives the counter has closed. Take a taxi straight to the airport instead, and there is no next departure to wait for: ten minutes of traffic only makes you ten minutes late.

At 80 each, losing one line trips all four
Each after one is out106.7
Left at the end0 lines
0 lines1 lines2 lines3 lines4 linesNormalOne out234RoundLines still runningStill running
0 lines2 lines4 linesNormalOne out234RoundLines still runningStill running

Each of four lines carries at most 100. Drag the load per line: up to 75, one outage stays at one line; above 75, the rest can't take it and drop out one by one.

The fuller the lines are, the less the rest can take

Four lines run side by side, and each can carry at most 100 units. When each carries 60 and one drops out, its 60 is shared among the other three, and each rises to 80. That is still within capacity, so the failure stops at that one line. When each carries 80 and one drops out, its 80 is shared among three, and each has to carry about 106.7, over capacity. So another line trips, and the whole 320 lands on the remaining two, 160 each, and they drop out too.

When failure spreads faster than it's noticed, people can't act in time

On a production line, a fault reaches the next station every 10 minutes, and it takes the person on duty 25 minutes to notice it and pull the switch. By the time they act, two stations downstream have already stopped, at the 10th and 20th minutes. If half-finished goods enough for 30 minutes of the downstream station's work are stored between every two stations, the person on duty pulls the switch at the 25th minute and not a single station downstream stops.

When you can't see the connections, the slack goes on working out what's happening

A row of dominoes is tightly coupled too, but dominoes only stand in a single line. You can see at a glance which one has fallen, and pulling out one ahead stops it. In a nuclear power plant there are hundreds or thousands of pipes and valves, and the people on duty can only guess from indicator lights which path the fault has taken. The fault spreads along paths no one ever drew, and while people are still working out what has happened, the slack time runs out.

This model is most useful for power grids, payment and settlement, and logistics that relies on on-time handoffs, where each link can only wait minutes to hours. It only answers how a failure spreads, not why it happens: when the root cause is a defect in some part itself, no dependency map, however clear, will find it. It is also wrong to read "has dependencies" straight as "will collapse completely": in a system whose dependencies are clear and whose failures can be cut off in time, tight connections actually save inventory and waiting.

Predict
When a supplier stops work, estimate which companies the effect will reach: draw out who waits on whom, and write down, link by link, how many days the stock on hand can last.
Design
When planning the rollout of a system upgrade, leave room between steps that must happen back to back to stop and roll back, so the step that goes wrong doesn't drag the steps after it along.
  1. Which link, if it stops, leaves the next one with nothing to work with right away? Go count how long its stock or backup supply can last.
  2. When a link drops out, whose job does its work fall to? How far is that link from full load?
  3. From the moment something goes wrong to someone noticing and cutting it off, how long does it take? Is that shorter or longer than the slack?

Software

Eleven lines of code

In March 2016, a developer pulled a batch of his packages from the npm registry. One of them, called left-pad, was only eleven lines long; it added blank spaces to the left of a string. The packages that depended on it were depended on by other packages in turn, and several big projects, Babel among them, began failing to build. Builds only ran again once npm put the package back up.

Home renovation

The tiler who started late

You're renovating a two-bedroom apartment with four trades: plumbing and wiring, tiling, carpentry and painting. Each starts the day after the one before finishes. The painter was booked for a fixed slot three months ahead, and missing it means waiting until next month. The tiler ran into a stretch of rainy days and worked four days longer. The carpenter started four days late, the painter's slot that week went unused, and you rebooked for the first week of the next month.

Finance

A fund falls below one dollar

In September 2008, Lehman Brothers filed for bankruptcy. The next day, the Reserve Primary money market fund, which held Lehman's short-term debt, saw its value fall to 97 cents a share, below the 1 dollar it had promised. Investors in other money market funds rushed to pull their money out too, and the funds stopped buying companies' short-term debt. Companies that relied on that kind of debt to keep cash flowing couldn't raise money. A few days later, the US Treasury announced a guarantee for money market funds.

Tight Coupling and Cascading FailureRedundancyKeep a spare of anything vital, so one failure doesn't stop everything.A chemical plant wants to add a backup pump beside its main pump, along with a switchover valve and interlock controls. Redundancy sees that the chance of a single pump failure has been pushed down; tight coupling sees that the switchover gear adds a new connection, the two pumps' states now pull on each other, and a false trip of the interlock becomes a new reason for the pumps to stop. If the backup can start on its own and the switchover logic is simple, add it; if switching over needs a whole system of interlocks, first leave plenty of slack.Tight Coupling and Cascading FailureFeedback LoopsResults circle back into the next round, and either snowball or get pulled back.A city's subway line stops running, and passengers pour onto the buses. Tight coupling asks how much the bus routes can take and whether they have enough room to spare; feedback loops ask whether full buses will make the roads more crowded and slow the buses further, so that the more people the backup takes on, the worse the backup gets. After working out the spare room, look for this loop that comes back and makes things worse.Tight Coupling and Cascading FailurePremortemBefore you start, pretend it already failed and have everyone say how.A lab is moving into a new building over the weekend, and before the move it holds a premortem: assume the move went badly and have everyone write down why. Most of what's on the paper is the first thing to go wrong, like "the refrigerated truck arrives late" or "the new building's wiring hasn't passed inspection." Tight coupling pushes further: once the refrigerated truck is late, what else stops with it? The samples warm up on the truck, the freezers in the new building aren't powered yet, and Monday's experiments can't be scheduled. Add the things it brings to a halt to the list as well.

A hospital has only one CT scanner, shared by the emergency department, inpatients and outpatient appointments, which wait in line in order of arrival. In the afternoon a badly injured patient comes into the emergency department, and the scan plus extra tests take up three hours. The outpatients with appointments have nothing to do with this injured patient's case.

What is most likely to happen to that afternoon's outpatient appointment scans?

One morning after a cold snap, the elevators in three buildings in the same apartment complex stopped at almost the same time. The three buildings' power and control systems are not connected to each other, and each is repaired separately. The property manager found that all three elevators used the same batch of guide-rail lubricant from the same maker.

Which judgment about these stoppages makes more sense?

The three hospitals in a city take turns receiving ambulances at their emergency departments. One closes its emergency department because of a power cut, and all the ambulances are sent to the other two. On a normal night, those two already have 90% of their beds in use.

What is most likely to happen tonight?