An unofficial, read-only Hacker News reader.

Microsoft declares 'Code Red' after historic outage, internal memos show (opens external site)

259 points by thm 4 days ago | www.reuters.com | 245 comments on HN

View full thread · View on Hacker News

Comment thread (61)

  1. Sounds like they could do with so Netflix style chaos monkey engineering
    Replies (9)
    1. I used to do that in an old job.

      AKA I'd unplug the wrong port every single time, even after checking 12 times

      Replies (2)
      1. Honestly any properly set up datacenter you should be able to walk in and yank any single cable, virtually anywhere, without a serious issue. Although I suppose if you do that to the power cable to one of the larger UPCs you might create an arc flash hazard and barbecue yourself.
        Replies (1)
        1. Good point, we need to rotate random-cable-yanking duties among departments and pace so there is sufficient time to replenish staff.
      2. For me it was doing anything remotely that might cause me to lose remote access. Despite carefully thinking about it and proceeding very deliberately, more often than not I'd lock myself out.
    2. It is incredible how effective it is if you get to do it.

      The resistance though can be awe inspiring. Just ask your normal k8s fried mind about “graceful shutdowns”. Way too many people live in a world where they are so obsessed with graceful shutdowns they have no idea what happens when recovering from ungraceful shutdowns, so they leave this unhandled, when in reality that is the standard case and the graceful variant is merely a special case that can perform some optimization.

      Replies (3)
      1. Seems hyperbole every deploy on k8s will do a graceful shutdown surely that will happen more often in your environment then hard crashes.
        Replies (1)
        1. Exactly the brain rot I am on about.

          It doesn’t matter that k8s does graceful shutdowns all the time, the point is you must handle when they do not as well, and if you did that the graceful ones are only a special case. The culture around k8s in practice ignores this to a dangerous degree.

          Replies (2)
          1. I agree wholeheartedly with you that handling abnormal termination is probably the first thing you should do.

            But I disagree with you on "the culture around k8s in practice ignores this to a dangerous degree" — yes, k8s clusters have built-in methods of handling normal termination¹. But that because abnormal termination — while an expected and "normal" consequence of production in the sense that it will, invariably, happen — still has knock-on effects, like 500s. If I SIGKILL your serving process, those requests are dead². The graceful stuff is there to avoid inadvertently nuking requests like that during normal deployments.

            Again, I absolutely agree: your desired workload should survive everything from SIGKILL to the machine just up and vanishing into thin air, and the subsequent delay that it will take health checks to realize "huh, weird, that VM just poofed out of existence". (And you should probably deal with that first, as systemic failures like what MS hit are less preferable than a few 5xxs here and there.)

            ¹which for a workload, amounts to, pretty much "handle SIGTERM", or more practically, "your web framework, if it is worth its salt, should already be doing this for you"

            ²while sometimes an upstream LB can smartly retry idempotent requests, if the requests aren't idempotent, there is no choice but 5xx

            Replies (2)
            1. Still I don't think I figured out graceful shutdowns in k8s (but that is kinda the point, processes are not pets)
            2. You are arguing from idealism, while I am from what people actually do when presented with those mechanisms.

              I know infinitely more SV cos with zero abnormal termination recovery than those with graceful shutdowns for the simple reason one is tested all the time and the other is too hard to deal with so everyone hopes they have moved to the next company before dealing with it.

              Continue this thread (1 replies) →

          2. This isn't my experience at all. In my experience if developers are thinking about anything it's recovery so that's more "baked in". If I were running an SRE function I could see myself making more noise about graceful shutdowns because that's not typically top of mind for developers.

            So you might get the impression I'm brain rotted and obsessed with graceful shutdown to the exclusion of recovery..

            But that honestly seems like not a me problem so much as..

      2. See also:

        Exec: We have this elaborate deployment process that our team must follow every time. To deploy our <inconsequential product>, it has all these fancy gates, CI checks, approval workflows (in several companies, up to and including exec sign-off). Every change in the build is tracked back to Jira tickets, and it can’t ship if they’ve not all been signed off by QA. A “release” to our cloud platform takes hours to do well; it’s a very specialist task, and our whole scrum process is designed to ensure this build goes every 2 weeks without fail. Staff stay late to make sure it happens.

        Engineer: What about hotfixes when we find a bug in prod, and customers are down or were embarrassed or whatever?

        Exec: oh, we have a special _hotfix deployment_ process for that. You don’t use any of the tooling. You cut a branch, build locally and push direct to prod; whatever it takes.

        Eng: so why isn’t that the standard process?

        The number of times I’ve had to explain to dumbfounded management that the existence of this hotfix process with no safeties means it should be the standard deploy process, because it either works fine and doesn’t need all the comfort theatre that’s been engineered around a ship process, or it doesn’t work fine and we need to run it repeatedly to fix its problems before it really causes an issue.

        Sometimes I’m successful.

        Replies (8)
        1. In fairness, a hotfix is a very tactical low risk change so the risk is much different from a feature release.

          That said, generally agree that process heavy release processes with tons of human gates are unproductive.

        2. It took me a while to come round to full only deploy main, use feature flags, ci cd. I now realise I was an idiot about release branches and git flow and all that.
          Replies (1)
          1. Any reading or video you might recommend?
            Replies (1)
            1. Sorry I don't, it was that Dev ops at my job demanded it and got their way. Once I started doing it I realised they were right.
        3. A lot of times the stupid elaborate deployment process needs to be done to check a box in the Three-Letter-Compliance standard (PCI, ISO, SOC or whatever), which you need to follow in order to be "certified" (tm) because your B2B customers REQUIRE you to be bullshit-certified so that their IT can wash their hands in a "not my problem, they were certified" manner when something happens.
          Replies (1)
          1. At least for ISO 27001, this is not correct. You can have a lean approach which allows deploying to prod in minutes after merge to main, and only a peer review as ‘approval ceremony’ before the merge.
            Replies (2)
            1. Yup. Sadly one of the areas B2B software often fails with an own goal is in contractual clauses agreed with customers who insist on being “notified” in advance of any change. Lots of lawyering required to suppress those in standard service agreements in my experience.
            2. Agreed. These regulations are mostly checklists at the end of the day; no reason why they can't be automated.
        4. > Eng: so why isn’t that the standard process?

          Hotfixes are typically very minor changes to fix (or in many cases mitigate) a verified bug that is causing immediate pain. Or, quite often, just a straight rollback commit.

          You follow the process for regular changes, because the process exists for a reason. Ensuring quality and security is important. When you have a customer base, not impacting your customers negatively often is more important than pushing whatever shit you farted in a PR.

          That I have to explain this to someone I presume to be an engineer is weird

          Replies (1)
          1. The mechanism for both should be the same. You just change the speed, based on an informed understanding of the risk.
            Replies (3)
            1. No.

              Sometimes a hotfix needs to be applied quicker. You may not have time to let it soak on a QA environment, go through your usual release approval process, etc.

              The purpose of the process is to reduce the anount of times a hotfix is even needed and evaluate the risk of what is being shipped.

              Continue this thread (1 replies) →

            2. Why should the process be the same when the scale of the change is very different?

              Would you use the same process to build an extension to your home as you would to change a lightbulb or hang a picture?

              Continue this thread (2 replies) →

            3. When you have a broken system the risk/reward changes. If you break it further the users may not notice so you might take more risk to get a hotfix out but then you keep it as simple as possible to limit that risk.

              In normal development one would let through much larger changes, having put them through much more checking.

        5. > so why isn’t that the standard process?

          Because of people. I have once worked at a place that had no CI/CD and people made hotfixes in prod. What they didn't do was commit their changes back to git and when someone deployed a new version from git everything broke.

          CI/CD provides a path from git to prod if you do it right.

          I have worked at another company without CI/CD or tests for their legacy product. Every change by a developer was a shot in the dark. Will it work? Will everything explode? Who knew?

          CI/CD would have given a way to have some confidence. It's not perfect but it's worlds better than nothing.

          Now you might say: people should not forget to commit their stuff to git. True. But they do. Every process that is only written down and not enforced technically will be broken at some point. The more people the easier it happens.

          That of course doesn't mean that there shouldn't never be a way to short circuit the default process. If everything is down you have a good chance you won't make it worse. But that's the point. It should be an emergency route not the norm. Just as the fire exit is not the normal exit even though it might be very fast and convenient.

        6. Half serious rebuttal:

          Because the hotfix is made by the guru Principal who has been there for 12 years and wrote the system, while 80% of "normal" commits are made by juniors.

        7. Because their hotfix process is a smell. Hotfixes like that should go through the same CI/CD pipelines, possibly with a few gates manually skipped. The manual QA signoff is the bottleneck; that should be automated IMO.
        8. To be clear, my point about laptop builds to prod and removing safeties was mostly tongue-in-cheek, although it does happen for "hotfixes" in many environments – more routinely than I'd care to admit.

          The crux of my point is that there should be one deployment path that can go faster or slower as the requirement dictates. We trust the human operating the process to make that decision and empower them with sufficient context to do so. If the automated path isn't safe or quick enough to use in an emergency, that needs fixing, and we only achieve the required levels of reliability and tease out the problems by doing it routinely. Process needs exercising to ensure it's going to work in an emergency situation, where stress is high and we need the reliability of routine the most. It's comforting to add gates, but if they're routinely worked around or there's non-compliance to get work done, they don't add value.

          Resilience engineering and especially Safety-II would call the gated path "work as imagined" while the hotfix path is "work as done". Safety-II advocates for studying and strengthening how work actually succeeds, so closing that gap is a good place to start. Surgeons don't have a "trauma mode" where they skip sterile technique and grab unfamiliar instruments, but in an emergency they can compress the timing because it's drilled. The work of software engineers rarely has the same consequences, but nevertheless, deployments should work the same way.

      3. Because a lot of people get caught in the mindset of "prevent problems from happening" rather than "what to do when problems happen".

        The first can work for a while, but the minute it doesn't, you're just kind of boned because you won't know what to do.

        Whereas with the second, as long as one of the problems you're prepared for is "complete systems failure", the exact nature of the problem isn't an issue.

        Replies (3)
        1. Yep exactly.

          The funniest was seeing people failing to grasp this while simultaneously claiming to love Erlang and the BEAM.

          Replies (1)
          1. "My code knows what to do when something goes wrong, so I don't have to!"
        2. Some organisations become petrified of change, because change causes outages. So they put in Byzantine processes around change, with CABs, go-no-gos, RAGs etc etc.

          Somehow, despite all this, the number of incidents goes up, and the severity increases.

          Tale as old as Internet Time.

        3. >Because a lot of people get caught in the mindset of "prevent problems from happening" rather than "what to do when problems happen".

          About a year ago (after reading simonw's "lethal trifecta" post), I shifted my thinking to "assume I'm already f'ed, and minimize how f'ed I am." I call it minimizing blast radius.

          Just fast forward to worst case scenario and then design it so it's not so bad.

          This allows for radical simplification. Complex agent harnesses that try to stop the agent doing anything wrong? Proxies that inject keys? Containers? Nah, just give it root on $3 VM, and disable auto-charge on the API keys! It goes rogue, I'm down like ten bucks.

          (I'm just one guy though, no idea how or if this works at scale.)

          Similarly, worrying about VM isolation? (They're getting increasingly scary at breaking out of things.) Nah, just give it a $50 Thinkpad :) (anything on my LAN is f'ed too, though, LOL) I think the Mac Mini folks beat me to that one, though...

          Replies (2)
          1. You are describing the fundamental property of engineered systems: knowing what your worst case scenario is and being ok with it. This is literally what real time operating systems are to time, it isn’t about being optimal but always being within acceptable (defined) bounds.
            Replies (2)
            1. Nice. Yeah. I suspect this is a lesson humanity will keep rediscovering for the next several tens of thousands of years.
            2. > knowing what your worst case scenario is and being ok with it.

              Upon reflection, this also applies to like, death.

          2. That's good thinking because it also cuts straight through the bad conclusion many people make after learning of the "Lethal Trifecta", i.e. that it's solvable. It's not. It's fundamental to the nature of general systems, and the sooner people get out of the absolutist, binary mindset of naive cybersecurity (you're either provably secure or not secure at all), the sooner they can get to solving the real problem, which is how to prevent or mitigate the worst outcomes without nerfing the system to the point it's no longer useful.
    3. Chaos Tequila Engineering

      Pied Piper Gets Hacked, Tres Commas Tequila - Silicon Valley

      https://www.youtube.com/watch?v=vvDK8tMyCic

    4. It's called "Azure".
    5. Good luck with chaos monkey on production Azure/EXO machines randomly rebooting hosts hosting paying customer VMs or mailboxes / triggering migration/failover

      the technology was there 10 years ago and was/is used by Bing internally. You can't let chaos money randomly reboot production hosts if your system was designed 20+ years ago assuming that reboot ordinary

      Replies (1)
      1. Agreed. In fact, I believe Netflix has even acknowledged that chaos engineering was uniquely appropriate for their industry. If a simulated outage has an impact in their environment, a subscriber can't watch Gabby's Dollhouse (although my toddler may think that's the end of the world). When a hospital running on O365 encounters an outage, human lives are at risk.

        With that said, I wonder if chaos engineering leaves an organization better equipped to handle this world of AI expanded attack surfaces.

        Replies (1)
        1. I get it, but it's funny: "We can get away with this because face it, what we do doesn't fucking matter." :-)
    6. Interesting. My first thought was that this isn't very deterministic, but I guess that's the idea.
      Replies (1)
      1. Yep that's the idea. This is why the CDC uses zombie outbreak scenario to demonstrate the importance of preparedness.

        The point is not to prepare for the known but the unknown. And zombies tick off a lot of boxes.

        Replies (2)
        1. The what uses the what? Would love a link.
          Replies (1)
          1. Replies (1)
            1. Shoulda added the link, thank you for doing it!
        2. > zombies tick off a lot of boxes.

          And with RFK Jr as Secretary of Health and Human Services a zombie outbreak doesn't even seem that far fetched.

    7. From the sounds of their Azure operations. They are already living chaos engineering. Just unintentionally!
    8. Can someone educate me on what's monkey engineering?
      Replies (4)
      1. https://netflix.github.io/chaosmonkey/

        Basically different size monkeys go through prod systems and take different parts of infra / services down to make sure everything is dynamic and can handle these scenarios. Think service discovery etc .

      2. Testing philosophy/practice.

        > Chaos Monkey is responsible for randomly terminating instances in production to ensure that engineers implement their services to be resilient to instance failures.

        https://netflix.github.io/chaosmonkey/

      3. Chaos monkey.

        It means constantly taking parts of your system offline so that engineers have to make it reliable against partial loses, instead of growing something that needs total availability to a size where any "total" anything is impossible.

      4. The way avionics work. Build for it not to always work, but to fail and keep going.
    9. Microsoft does offer something similar called Azure Chaos Studio

      https://learn.microsoft.com/en-us/azure/chaos-studio/chaos-s...