Skip to the guide

Circuit breakers, bulkheads and load shedding

IntermediateConcept3 pages

Three defences against the same disaster: one part's trouble spreading until everything is down. A circuit breaker stops calling a dependency that's failing. A bulkhead caps how much of a server any one dependency can tie up. Load shedding refuses some work when a server is overloaded, so the work it accepts still finishes in time. Interviewers raise them whenever a design has a slow or flaky dependency.

The electrics in a house

Every room in a house draws on the same supply, but each room's wiring runs through its own switch in the fuse box. A faulty kettle shorts and the kitchen's breaker trips: the kitchen goes dark, the rest of the house stays lit. After a moment you flip it back; if it trips again, you leave it off and call an electrician. And on the hottest day of the year, the power company cuts some neighbourhoods for an hour at a time, so the whole grid doesn't collapse.