r/programming • u/speckz • Jul 26 '16
A DevOps Cautionary Tale or how a company with nearly $400 million in assets went bankrupt in 45-minutes because of a failed deployment.
https://dougseven.com/2014/04/17/knightmare-a-devops-cautionary-tale/249
u/wanderingbilby Jul 26 '16
Odds are the admins on duty weren't empowered to take the whole system down or didn't have the right access.
If you're going to do high speed trading, your response level needs to be as fast as possible - if that means keeping a VP on site on duty during all "up" hours, so be it. It's not like these places run on thin margins.
135
Jul 26 '16
As much as Knight screwed the pooch on this, this wasn't the case. It is more related to poor deployment practices and Ops staff that were either having a bad day, or were poorly trained (I haven't met anyone who was working on it that day, so I don't like to armchair quarterback on what specifically happened).
JessiArr's post, point 15, pretty clearly highlights what happened. I think this one is safely in the camp of "Oh shit, we had no idea that was happening" until it was too late. Almost any trading company (who I've had a chance to chat with) will fully permit their ops guys the ability to flat out stop trading from happening if they identify something is wrong.
27
u/wanderingbilby Jul 26 '16
Ah, cool. I'll go back and read, thanks. I don't work in the industry but I've worked in plenty that emasculated their IT admins to the point where they couldn't cut production for anything short of a fire.
24
u/CyclonusRIP Jul 26 '16
I doubt the OPS guys really understood what was happening anyways. If you're in a situation where the company is going to die if you don't shut down production, then you are probably not super worried about exceeding your authority. If you do nothing you definitely lose your job, if you exceed your authority maybe you lose your job.
12
Jul 26 '16
Sometimes that's the case, yep. I'm speculating here (because I have no inside knowledge), but it was likely a low-staffing period (Aug 1; summer is traditionally a dead period for trading; everyone is on holiday). Likely you had someone who was overworked, or under trained (or both).
Here the problem though seems to be more about how long it took anyone to notice there was a problem, and their choices (related to how to recover the system) after they saw they had an issue, not empowerment.
9
u/swattz101 Jul 26 '16
You would think if they were deploying out new software updates that would have a major impact on a new exchange program, that they would have someone on site in case something went wrong.
Of course, 45 minutes doesn't seem that long to me, but I don't work in that kind of high paced environment.
7
Jul 26 '16 edited Jul 26 '16
Depends on whether or not they thought it was a high impact change. For all we know (and I say this specifically about Knight) they could have thought it was rather innocuous (and so pushing it specifically during this period wouldn't have been a big deal).
Just in case you're curious (since you mentioned not working in the space), typically there are additional systems built on top of the "Is the harddrive working?"/"Did we get this log alert?" HP Openview-kinds of things you'd expect in a typical tech deployment. Usually these monitor the "business logic"...how many orders there are outstanding, what the total invested and potential invested exposure is, are orders being responded to in a timely fashion (by the markets you are sending the orders to). If you read the SEC notice there's mention of an email stating an issue, that were ignored, that are of a similar vein (though for trading ops email alerts are typically too slow). Typical problem identification should be under 2 1/2-5 minutes. MTTR should be under 15 minutes (but I'd say that's even a bit slow; shouldn't be much longer than 5 minutes after identifying you have an issue). At the very least you should be plugging the gusher as quickly as possible, and simply not trading until you can reliably sort things out.
The summer months are sometimes the most dangerous because trading is slow, and so your volume of alerts/issues is drastically lower than normal, and people are focused on project work. Depending on how well tuned your team is, it's quite possible to miss something like this for longer.
12
u/flee_market Jul 26 '16
In many companies, the IT admins would be quite seriously expected to physically throw themselves onto the fire in an attempt to smother it, because pulling the HALON system would cost money.
5
25
Jul 26 '16 edited Jul 26 '16
No, you're totally right. And I've had to suggest to certain companies within the finance space (I moonlighted in an advisory capacity for a bit) that emaciated ops guys would end up causing them far more harm. You need to empower your staff to perform the steps necessary to mitigate risk.
The problem is, this often requires more training than most firms are willing to commit to. And, more importantly, in this sort of environment if your Ops guys don't feel invested in the company (or the work) their apathy is going to flat out screw you. Not to mention the burn out rate is higher because of the added responsibility and stress. It makes managing operations a much more hands on process, and for many firms the cost isn't worth it (because they often don't fully understand the risks; or the risk is deemed insignificant relative to the cost of managing ops/other errors).
→ More replies (1)2
u/corobo Jul 27 '16
I think in that situation I'd have lit a fire if a fire was needed..
If I'm ever in the situation of designing these systems I think the emergency red button will release a physical cut off - little guillotines that can sever the network cables.
→ More replies (2)2
u/Krillo90 Jul 26 '16
JessiArr's post, point 15, pretty clearly highlights what happened
For goodness' sake Reddit, can we please read at least some of the articles before we comment? Point 15 from that post is also quoted in full with the exact same words in the OP's original post.
2
Jul 26 '16 edited Jul 26 '16
Yes, sorry, it was easier to point to that one because I felt it was a good write up. Next time this comes up in /r/programming I'll be sure to just link to the SEC Order which is the source of all of these articles.
Appreciate you calling me out for lacking reading skills though. Admittedly I did not read the posted article, because this thing is years old and anyone who has run financial systems before has read the order end-to-end multiple times.
→ More replies (1)1
u/toaster13 Jul 27 '16
As someone who has worked in finance technology and other tech sectors.... Honestly, many of them aren't that good. Very strict siloing tends to let subpar engineers have more influence than they should and that tends to chase away some of the best talent. I don't think I've ever hired someone out of finance for all the times I've interviewed people in that sector. There must be a few good people but they are super rare.
→ More replies (1)38
u/randomguy186 Jul 26 '16
And I'd bet my annual paycheck that the company culture didn't reward acknowledging mistakes. I know a few folks who work in financial programming; it's a high-stakes job and they hire excellent people. I can't see any way for a deployment on a server to be missed without the person doing the deployment being aware, and a safe culture would have allowed that person to acknowledge their mistake at 9:31 AM rather than after the company was bankrupt.
3
Jul 27 '16
Admit when you have failed, and own up to your mistakes. Doing so makes you an adult. I've noticed that a lot of developers are barely adults, though. I guess I wasnt very mature at 25 either, but I was delivering pizzas and boning waitresses back then, so... I always wonder what it must be like to be fast tracked through the ivy league and hired into a financial firm right out of college. My guess: terrifying.
1
u/Jonne Jul 27 '16
If he didn't realise he made the mistake in the first place he wouldn't even know to own up to it.
0
Jul 26 '16
[deleted]
13
u/randomguy186 Jul 26 '16
Spot on. It's why I believe that it's necessary to actually reward people for acknowledging mistakes.
4
u/foobar5678 Jul 27 '16
The company needs to foster an environment where people are willing to admit their mistakes. You can have "honest folk" who are willing to admit and own up to their mistakes, but when the boss berates you and humiliates you every time, those "honest folk" are going to be reluctant to come forward next time.
Point is, it has nothing to do with honesty. If the company has a toxic environment where people aren't willing to admit their mistakes, then the blame lies on the company. It doesn't mean the employees are dishonest.
5
u/jonjonbee Jul 27 '16
If the company has a toxic environment where people aren't willing to admit their mistakes, then the blame lies on the company. It doesn't mean the employees are dishonest.
This, multiple times this. I got into the mistake-coverup mindset at my last employer because they worked on fixed cost/fixed time contracts and thus anything that required additional work (mistakes, refactoring) was seen as waste. (Unsurprisingly, most of the devs were the lowest common denominator and the codebases were utter shit.) My current employer is a big corporate but the dev environment is a lot friendlier; mistakes are accepted as part of the development cycle and aren't frowned upon unless they remain uncorrected.
→ More replies (1)6
u/toomanybeersies Jul 26 '16
You would think that once you realised what was going on, you would start taking a fireaxe to the servers if need be in order to get it to stop.
1
u/jonjonbee Jul 27 '16
The problem was that they didn't realise what was going on until far too late.
1
u/wanderingbilby Jul 26 '16
A disadvantage to "the cloud". No way to just pull the damned plug, already.
6
u/never_safe_for_life Jul 26 '16
I run 60 servers in EC2 and can send any number of shutdown signals to them in one command: stop the process, shut down the box, kill the virtual machine entirely.
3
u/Decyde Jul 26 '16
My friend works as an admin at a place during the night shift. The place works from 9-5 normally with 2 techs.
They require a person to be there around the clock in the event something happens one day so something like this does not happen.
He said the most he does is pull cable or rerun some things a couple hours a week. Other than that, he just brings things to do and gets on Reddit all night.
2
89
u/kairos Jul 26 '16
I'd put the emphasis on the Dev part... It seems wrong to me that they'd repurpose a flag from code which hasn't been used in ~8 years for something not related to its intended use.
65
u/notafuckingcakewalk Jul 26 '16
Yeah, as soon as I read "repurposed a flag" all kinds of warning bells went off. You want it to be really really difficult for people to accidentally do something they don't mean to do.
If you're replacing x with y and x and y are very different things, a good way to avoid problems is to have y demand very different input from x.
Like, if for some reason you decided your new variant of Linux is going to have a "new" command, completelypulverize (or
cpfor short — the normal cp will be replaced with a newcopycommand) that deletes and then zeroes out a file, you'd better make sure it doesn't allow any input that's accepted by the familiarcpcommand. So anything in the formatcp oldfile newfileshould break, hard.21
59
u/tankfox Jul 26 '16
I love how similar Power Peg is to Powder Keg
13
u/marvin02 Jul 26 '16
Wow. Until I read this comment, I thought they actually called it "Powder Keg". How could you know that code was so dangerous that you actually named it Powder Keg but then not be more careful with it?!>?
→ More replies (1)36
u/Chandon Jul 26 '16
When you're packing bits for performance, repurposing flags is a pretty likely outcome.
The real problem is having code that understands the old meaning of the flag anywhere near production when you start to deploy the new version. This is a "remove old code, replace with version that aborts if the flag is set, test the abort, wait a month and several versions, then deploy new meaning for flag" sort of situation.
14
u/Dr_Legacy Jul 26 '16
" ... replace with version that aborts if the flag is set, test the abort, wait a month and several versions"
Simple best practice policy. Often you don't even need to abort; just log the problem and carry on.
26
u/immerc Jul 26 '16 edited Jul 26 '16
There are so damn many things they did wrong:
Alerting via emails
Repurposing a flag
Not purging dead code from the source control system
No kill switch, either in the software or something in front of it
Manual upgrades to a production system
Upgrading servers in a unknown state rather than wiping them and starting from a known good clean install
No incremental rollout / AB testing / canarying
No dark / simulated launch
Using shitty names like "Power Peg"
Edit: another one
No algorithmic cut off, i.e. something that watches trading traffic and automatically pulls the plug / engages the brake and sounds an alarm (not via email) when the volume or other characteristics are far different than normal
8
u/Fhajad Jul 26 '16
Alerting via emails
What methods are better than e-mails?
→ More replies (4)15
u/elHuron Jul 27 '16
text, phone call, dashboards, a literal klaxon
9
u/RICHUNCLEPENNYBAGS Jul 27 '16
I'm guessing these guys have thousands of meaningless alerts a day, so that'd have to be fixed first.
→ More replies (5)2
u/immerc Jul 27 '16
When hundreds of millions of dollars are at stake, all those at the same time.
→ More replies (6)1
u/keef_hernandez Jul 26 '16
The linked article indicates that they did in fact do a partial rollout.
2
u/immerc Jul 27 '16
A partial rollout only counts when every system you're using is identical. When you're hand-installing things onto systems that haven't been wiped, you can't guarantee that.
6
u/zanidor Jul 26 '16
From a DevOps perspective, you have to assume some dev mistakes can make it to the production pipeline, and you need to have procedures to mitigate. That's a huge part of the DevOps job description.
The developers made a boneheaded mistake, and the DevOps people had systemic failures that let the mistake do maximal damage. Not sure it's right to emphasize either party, but I would say the DevOps mistake was much larger in scope -- their entire system was broken.
9
u/ismtrn Jul 26 '16
This is HFT. They rent servers in specific locations because they have lower latency to the exchange. They can't just keep adding bits to their message format.
2
Jul 27 '16 edited Jul 27 '16
They own the servers, and the racks (depending on which of the three facilities), and they just rent the space (sorry for being pedantic). Not sure on the adding another bit bit. Depends on how many flag bytes they had to spare. Clearly they thought they were being economical by reusing one they believed was fully dead.
This system was routing retail orders, so depending on how much load it was carrying for other Knight strategies an extra 8 bit flag flag field probably wouldn't have killed them.
124
u/JessieArr Jul 26 '16
46
u/uep Jul 26 '16
If a larger firm had this kind of bug, wouldn't they just roll back the transactions? I know erroneous trades have been rolled back in the past.
Actually, in searching for a link, the one I found above is perfect. It specifically discusses Knight capital and how questionable selective rollbacks are.
57
u/JessieArr Jul 26 '16
I'm sure it's very tricky. No firm would bother to report a computer trading error if it made good trades on their behalf. So they will only request that the transactions be rolled back in the event of bad/illegal trades being made. And being able to undo bad trades after the fact is the most exploitable ability you could have in the stock market.
8
u/immibis Jul 26 '16
It's not really relevant to KCG, but this reminds me of the recent Ethereum rollback.
13
Jul 26 '16
Well, Knight was a pretty substantially sized firm to begin with. The problem here unfortunately wasn't as easy as traditional clearly erroneous trades. When these orders made it down to market they were marketable, executable, and in terms of price bands on the market totally within bounds. Typical CEEs are in a single instrument and often represent a horribly mispriced order, and the subsequent market impact (people trading at that level assuming they missed a news event). It's very easy to say "These trades at 10% away from the last 'sane' price, and shall be undone".
With Knight though these were a high number of trades, in a range of instruments, priced at normal levels. Counterparties would have not questioned the transactions at all, and would have moved on to commit capital or shares elsewhere. It would have kneecapped the market while people tried to figure out what in the hell was going on.
On a more "administrative" basis, the exchange did not have the authority to issue CEEs because the trades did not meet their rulebook criteria. They would have had to reach out for voluntary busts to every single counterparty (a not insignificant task), and the counterparties would have been under no obligation to accept.
→ More replies (2)20
u/short_vix Jul 26 '16
Not sure why this isn't upvoted more, this is the most accurate analysis next to the official report https://www.sec.gov/litigation/admin/2013/34-70694.pdf
→ More replies (2)8
u/RyanSmith Jul 26 '16
The best part is the fine: $12m, despite the resulting audit also revealing that the system was systematically sending naked shorts.
16
u/curious_skeptic Jul 26 '16
I remember almost buying a few hundred shares of their stock in the days leading up to this. phew
5
u/foobar5678 Jul 27 '16
They got $400 million in investment the next day and were later purchased by a larger trading company. I'm sure the stock has bounced back by now.
8
u/curious_skeptic Jul 27 '16
No, they dropped from $10 to $3-4, and never really recovered before being bought out for not much more.
27
Jul 26 '16
(BTW – if there is an SEC filing about your deployment something may have gone terribly wrong).
That is a fair point.
7
69
u/WhisperSecurity Jul 26 '16
The code that that was updated repurposed an old flag
What?
Do not do this. Never do this.
Never, never, never, never allow any variable in code, message field, or protocol flag to have more than one meaning. Never.
3
u/IcarusByNight Jul 27 '16
Dude this is HFT where optimization of message format is critical to being faster than your competitors...
1
Jul 27 '16
Yes and no. It depends on how much system overlap there was at Knight. The orders that kicked this whole fiasco off were retail orders, so by their very nature they were significantly less time sensitive than what most people would consider to be a HFT strategy (never mind that it was 212 orders, so hardly high frequency).
3
0
Jul 26 '16
[deleted]
8
0
Jul 26 '16
[deleted]
23
u/ismtrn Jul 26 '16
There is a huge difference between having bloat, in the form of dead code, in the code which runs on your servers and bloat in the messages you pass between servers. Only one of those makes the system slower.
3
Jul 26 '16 edited Jul 26 '16
If they decided to repurpose it, wouldn't that mean it was being passed along all those years? The performance race is kind of already lost here.
Foresight is 20:20, but with stuff like this it's better to sacrifice performance if it can result in this kind of a catastrophe.
→ More replies (2)12
u/ismtrn Jul 26 '16
I obviously don't know the technical details, but I imagine they had a fixed length, say 8 bit, field containing configuration flags. If all the flags have been used their choice is to increase the size of the data format by adding an extra byte, slowing the system down and costing profit, or repurposed one of the old unused flags provided there was one.
→ More replies (5)
7
Jul 26 '16
I like the DevOps culture, hell it's part of my title, but I don't see how this is a "DevOps cautionary tale". Basic Software Development and ITIL practices would've prevented this from happening.
13
Jul 26 '16
I once was deployed to a foreign office for a remote deployment that sucked ass. After 17 hours I was asked to patch some web.configs with some new handlers. I messed that up and we were loosing $20K an hour. Someone figured out I fucked up after 2 hours.
Never again will I work those hours. As a comparison I recently got a loan for a house of $60k which I will pay in 30 years.
→ More replies (4)8
u/merreborn Jul 26 '16
Never again will I work those hours.
Yes, I always push hard to avoid long hours or off-hours work. We need to be working at peak alertness; the increased error-rate of off-hours work is too risky.
17
Jul 26 '16
One day I will talk of my front row seat to a server crash that cost a company $300,000,000
6
u/Blimey85 Jul 27 '16
For the love of God don't just tease us!
3
Jul 27 '16
Haha I would love to, but it's too soon. I don't think I can get into this story for another year or two, sadly. I can't wait to post it though. As it was going on I was thinking of this sub. There are a lot of details of incompetency across the board that this sub would enjoy.
→ More replies (1)
5
9
u/DJDavio Jul 26 '16
Does anyone know why they spell out seven as well as using the digit?
The seven (7) servers
16
u/Kapow751 Jul 26 '16 edited Jul 26 '16
It's used in legal/formal documents to make any alterations or errors more apparent. It's generally much harder to tell from context if a number is wrong, and much easier to alter it, as opposed to a word or phrase.
Not sure why it's used in this article, but that's where the convention originated. Some people seem to think it looks fancier or more authoritative or something.
7
u/isorfir Jul 26 '16
Just a guess here, but maybe it's due to the fact that it's more proper to spell out the number (if I remember my English classes correctly) but more difficult to compare a spelled out number versus a digit?
0
4
4
u/llIIlIllIIllIIIllIIl Jul 26 '16
Manual file copies during a critical deployment?
They were asking for it.
6
u/LiberalSexist Jul 26 '16
Can someone explain why the company was not using continious deployment in the first place?
12
u/llIIlIllIIllIIIllIIl Jul 26 '16
There's nothing more reliable than the human touch of engineers while copying deployment artifacts manually.
4
2
Jul 27 '16
Incompetence and resistance by those in control of the SDLC.
2
u/jonjonbee Jul 27 '16
This is the correct answer. Management will say "it works fine right now, we won't invest time and money in changing it", when it breaks they'll say "why didn't you take measures to prevent it from breaking?" The problem is never them, always the devs.
→ More replies (1)→ More replies (1)1
u/nomercy400 Jul 27 '16
Maybe 2012 has something to do with it? Maybe it is too critical to automatically update your production servers as they could bring down your company? Maybe you are not allowed by the SEC? I wonder if continuous deployment would have caught the missing 8th server.
3
3
u/stmfreak Jul 27 '16
Automated deployment is no panacea. There are other stories of bad deployments rolling out automatically and tanking many, many, if not all clients.
Test your code better, folks.
4
u/LetMeClearYourThroat Jul 26 '16
Just a few months prior to OP's article a similar fortune-melting code debacle crippled another high volume trader here in Kansas City. It was in March 2012. I used to work with the CEO (Joe Ratterman) at an earlier position and got a pretty personal detail of the event through a mutual friend. It was absolutely brutal for them and he's still personally recovering financially and emotionally.
There are tons of articles but here's a couple that came up first:
http://www.bloomberg.com/news/articles/2012-03-23/bats-the-epic-fail-of-the-worst-ipo-ever
http://www.huffingtonpost.com/2012/03/25/joe-ratterman-bats-ceo_n_1378597.html
1
2
u/Dragonsoul Jul 26 '16
Okay, call me an idiot...but what stopped someone from just..idk? Unplugging the server/turning it off/cutting the internet supply? Fuck, if they knew where the servers were, just rip the wires out the back. You're losing millions a minute! You can buy a new server.
2
u/s1lv3rbug Jul 26 '16
correct, they should have called the data centre have that server unplugged ASAP or kill the n/w connection to it. I'm not sure why it took 45 mins.
2
2
Jul 26 '16
Knight handled the hand-held computers traders used on the floor of the stock exchange. Always found them to be arrogant and rude and unprofessional. Not surprised, in my experience those attitudes trickle down from the top.
2
Jul 27 '16
trading over 21 billion dollars…daily.
On July 31, 2012 Knight had approximately $365 million in cash and equivalents
And that's the real problem, not the DevOps failure. If you're involved in a high-risk, high-leverage operation like they are, any kind of hiccup can bankrupt your company.
2
2
u/RedSpikeyThing Jul 27 '16
Good lord, so many things wrong here. This is literally the reason why you don't repurpose flags. The rollout procedure looks like a mess. No canaries? No dry runs? Surely you would run it with a version that logs what it would have done without actually doing it.
And then this gem
they were left trying to diagnose the issue
Well there's the last problem. Don't diagnose. Mitigate. When things are burning you make them stop burning and let the forensics team the over after. Shut off the power, pull the plugs, bang it with a hammer, whatever. All of that will cost less than $385 million.
3
u/clickclickboo Jul 26 '16
is this the same type of tale as the guy who deleted his entire company?
1
4
u/PlNG Jul 26 '16 edited Jul 26 '16
Oh yeah, I remember this story.
Edit: that wasn't the link but I remember it being big news at the time.
1
u/merreborn Jul 26 '16
Looks like the SEC filing was dated October 16, 2013 -- so I'd wager the story initially broke somewhere around then.
2
u/elfdom Jul 26 '16 edited Jul 26 '16
8 years prior, a similar type of bug at a similar financial cost, resulted in the self-destruction of Ariane 5, Flight 501, 39s after launch.
In short, a "dead code" calculation resulted in an unchecked conversion from a 64-bit number into a 16-bit number. The overflow killed the guidance computers, including the backup, caused the onboard computer to mistakingly course-correct, and engage an automatic self-destruct.
Wiki: https://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_failure
1
u/argv_minus_one Jul 26 '16
Good. If the rest of the HFT crooks could also go bankrupt, that'd be great.
1
1
u/dankwartrustow Jul 26 '16
Reminds me of an old client of mine migrating ERPs which had major EDI components (80% of their business). They were annoyed that purchasers would charge them $X,XXX fees in per EDI Test order, but the cost of not testing them and assuming the XML would take would be business-ending. Never did hear if they were successful or not.
1
u/s1lv3rbug Jul 26 '16
That is just terrible. The whole operations dept should be canned. There was just so many failures at all levels. Most importantly, if they are going live with such an important code upgrade, why not have someone be there in the data centre. They could have removed the touble machine immediately.
3
Jul 27 '16
Why wasn't someone manually unplugging the servers within 5 minutes of market open?
1
u/HopeFox Jul 27 '16
Well, the physical servers were probably in a building right next to the stock exchange itself, and the company may not have been allowed into that building.
But "why weren't they on the phone to their agent in that building and telling him to unplug the server?" is a very good question. They should have had their agent's finger on the killswitch throughout the entire first day of deployment.
2
u/cparen Jul 27 '16
The whole operations dept should be canned
I wouldn't be so sure. The way I remember reading it was that the ops team objected to the change, but were forced by upper management. I can't find a source though, but my point is to caution against jumping to conclusions.
There was just so many failures at all levels.
Spot on about this once though.
1
u/mex1can Jul 27 '16
If it would be in my home country there would be a bunch if people of "unknown location" involved in the event.
Here? I'm expecting a movie to come in a few years.
1
u/jones77 Jul 27 '16
they reacted by uninstalling the new code
Instead of running ls -l on 8 machines.
1
u/cowardlydragon Jul 27 '16
Ah, yes, because having to dictate commands to admins and watch them fat fingering them is much safer...
Of course a good devops strategy should allow rollback...
1
u/1234567890123456789x Jul 27 '16
I suppose it's because I am still fairly new to programming but I am really impressed that 8 year old code, possible with new devs comming and going, was able to run and not crash. And communicate with whatever system is used for stock selling / buying with 8 year old api code.
1
u/gospelwut Jul 27 '16
Seriously. IDC if it's a shell/powershell script wrapping an ENV variable + rsync/robocopy; you need a process that isn't people manually copying code. Jenkins and Teamcity (limited) are free.
The problem with manual deployments isn't that scripted/automated ones don't fail; they do. They fail confusingly sometimes. But they are (hopefully) consistent and can be audited. You also want to recover faster from a failure during those "45 minutes of hell" when your fight-or-flight instincts are going to 11.
I also concur with peoples' notions of a ripcord for Ops.
1
u/Jonathon662 Jul 27 '16
I knew it was about this before I even clicked it... I lost quite a bit of money on this stock!
1
1
u/ajd187 Jul 26 '16
I would be curious to see if anyone who decided it was a good idea to leave 8 year old code running in a system that handled high speed trading and moved billions of dollars was fired. I would hope so. That's the definition of "stupid".
7
u/Dr_Legacy Jul 26 '16
In high-volume, big-money applications, there's a strong motivation to change as little as possible with each update.
But as shown in this story, there is hell to pay when that technical debt catches up.
1
u/IronWolve Jul 26 '16
As an Ops guy, a detailed nagios alarming system that shows 8 actual servers in a group, test harness alarms on transactions, transaction queue too high/low alarms, and failed processing, has helped me run telecom services that have tens of thousands of transactions a sec during commute hours, and pinpoint issues asap. And hit the stop button if needed.
-18
u/BigPeteB Jul 26 '16
/r/devops is that way.
From the sidebar: "Just because it has a computer in it doesn't make it programming. If there is no code in your link, it probably doesn't belong here."
16
u/dsn0wman Jul 26 '16
The main issue here is developers not cleaning up old code, and not developing automated deployment methods.
13
u/awj Jul 26 '16
...and reusing a feature flag. If you want to make a list of "simple things that can royally screw you over", that should definitely go on it.
13
Jul 26 '16
[removed] — view removed comment
2
u/HandshakeOfCO Jul 26 '16
Yeah, I'm sure all the developers on that doomed team were saying "hey this code is totally well maintained! We don't need any time for a refactor!"
This is kinda like blaming the guys who built the bridge when it collapses, due to neglect, 200 years later. "Well they should have engineered it better!" Um no.
-3
-2
u/remimorin Jul 26 '16
I'm always surprised that this don't happen more often at smaller scales, probably it does but CIE are able to cover up.
In big CIE softwares "priority and maintenance" are guided by budget, by business goal, by CEO vision etc. What developpers think of it is not very important. That why the biggest corporation have the biggest technological dept.
That's why you have deprecated technologies running deprecated dirty code maintained by... not my kind of devs.
They see the upgrade/refactor as a risk (and it is) but don't see the weight of the latent risk raising over their heads.
Many of these system are huge only to deal with the said depts. They build bridges applications around them, maintenance script, emergency procedure, man-made data fix, etc. But the whole system is actually quite simple if rewritten from scratch using modern technology. Instead of night batch, flat-files-as-transaction-queues, record fixing script, bridge application, you can have a real time server, replicated, scalable, cloudable, with 10% of the code. With 100 times mores qualified dev on the market (and available for more than 10 years). Better tools, better machines (that big machine the size of 10 home frigo can be emulated on this 200$ desktop linux...)
This is kind of sad.
→ More replies (1)18
Jul 26 '16
The cost of rewriting a huge codebase from scratch is quite large, and is a very difficult and risky process. Many such efforts have failed. I don't think the solution to the issue is nearly as clean as you make it out to be.
4
Jul 26 '16
Agreed, full rewrites are often wishful thinking in my opinion. I think it's a way of avoiding the actual problem, why the codebase got to this point in the first place. The key take away I think is that we should see codebases as living, evolving entities that should be maintained, and improved over time. That means tracking, quantifying and addressing technical debt. With that said, the best course of action in dealing with a large nasty legacy codebase is to try and decouple/replace 1 piece at a time.
→ More replies (3)4
u/dccorona Jul 26 '16
This is one of the great advantages of service-oriented architectures...you can ground-up rewrite individual components far more easily. Though perhaps the latency demands of HFT systems are incompatible with such a network-heavy system architecture.
519
u/[deleted] Jul 26 '16 edited Jul 26 '16
Why were they unable to power down or kill the system?
There were 8 servers, all of which they apparently had access to so why were they uninstalling software?
edit: I am reminded of this scene.