Knight Capital lost roughly $460M in 45 minutes in 2012 after a deployment reached seven of eight servers. Which architectural failures made that possible, and which one would you fix first?
Show the full answer Hide the answer
The case, as publicly reported
Per the SEC's 2013 order, Knight Capital deployed new order-routing code to eight production servers ahead of a NYSE programme launch on 1 August 2012. The deployment reached seven. The eighth kept running old code.
The new code reused a configuration flag that, in the old code still present on that eighth server, activated a dormant function called "Power Peg" — test logic from years earlier that had never been removed. When the flag was set at market open, that one server began sending unintended orders. Roughly four million executions in 45 minutes. Knight took a pre-tax loss of about $460 million and was effectively sold within days.
The architectural failures
Five, and they are all reusable lessons rather than trading-specific ones:
1. The deployment was not atomic and nothing verified it. Seven of eight succeeded and nothing in the system knew. A deployment that can partially succeed without failing loudly is the root cause here.
2. Dead code was left in the binary. Power Peg had been unused for eight years. Code that cannot be reached under any intended configuration is still one configuration change away from being reachable.
3. A flag was repurposed rather than retired. The same flag meant two different things in two different code versions, which is only safe if every version is identical everywhere — the exact assumption that had just been violated.
4. There was no kill switch. Staff reportedly spent much of the 45 minutes trying to diagnose rather than stop. The system had no single control that halted outbound order flow.
5. Alerts existed but were not actionable. Emails were generated; nobody had defined them as a condition requiring immediate cessation.
What I would fix first
The kill switch, and not because it is the deepest problem — it is not — but because it bounds the loss for every future incident including the ones nobody has predicted.
The deepest problem is the partial deployment, and the fix is immutable artefacts: deploy a new set of instances and cut traffic over, rather than mutating existing ones. Then no instance can be running last month's code, because no instance is ever modified.
Then, in order: retire flags rather than reuse them (a flag is part of the contract between code and configuration), delete dead code (a build check for unreachable code is cheap), and define alert-to-action mappings so that "unexpected order volume" has a documented response of "stop" rather than "investigate".
What a strong answer adds
Noting the general principle: the blast radius of a deployment should be bounded by design, not by the deployment succeeding. Canary releases, immutable infrastructure and kill switches are all instances of assuming the deploy will go wrong.