News for hackers. Stuff that matters.
Re:A terrible, horrible, no-good, very bad day at Slack by m12k on Tuesday July 07, 2020 @04:20AM (#23756890)
TL;DR First a performance bug was caught during rollout, and rolled back within a few minutes. However this triggered their auto-scaling of web apps to ramp up to more instances than a hard limit they had. This in turn triggered a bug in how they update the list of hosts in their load balancer, causing it to not get updated with new instances, and eventually go stale. After 8 hours the only real remaining instances in the list were the few oldest ones, so when they then scaled down the number of instances again, these old instances were the first to be shut down, causing the outage, because the instances that should have taken over were not listed in the stale load balancer host list.
Re:A terrible, horrible, no-good, very bad day at Slack by vondur on Tuesday July 07, 2020 @03:37PM (#23763147)
It almost seems like no one group understands the system as a whole, so when one part fails, no one has a clear idea of the domino effects that can happen. I'm guessing this is the result of really complex systems interactions.
Re:A terrible, horrible, no-good, very bad day at Slack by Nextgrid on Tuesday July 07, 2020 @08:22PM (#23765778)
Which is what always happens when the company aims to build an "engineering playground" full of microservices and other moving parts without a clear technical justification and balancing the pros & cons and why I personally don't like working on such projects - it makes me feel uneasy not having a good understanding of the entire system.

To be fair to Slack, at their scale, lots of moving parts might make sense, but I see a lot of companies (including startups with very few customers) going down the microservices route and exposing themselves to such a risk when there is no major upside beyond giving engineers lots of toys to play with and slapping the "microservices" and related buzzwords on their careers page.

Re:A terrible, horrible, no-good, very bad day at Slack by bstar77 on Wednesday July 08, 2020 @01:38AM (#23767184)
I think you are drawing the wrong conclusions here... Microservices is not the boogyman here. It more likely has to do with speed of development, developer turnover and a plethora of other things that result in insufficient knowledge transfer.

Microservices (like just about anything) can be implemented well or poorly. There's a reason we have sophisticated orchestration solutions like Kubernetes... it exists to tame large scale deployments that has sensible failover processes.

The benefits you get are services that can be scaled independently, deployments that only affect isolated pieces of code, horizontal scaling, dockerized environemnts, etc. All of these advantages should exist in well designed systems, but systems that have been executed hastily will likely have critical problems crop up at some point.

Re:A terrible, horrible, no-good, very bad day at Slack by Nextgrid on Wednesday July 08, 2020 @07:27AM (#23768847)
I think that all other things considered equal, a microservices architecture has more moving parts and is more complex to learn than a monolith. The same applies for Kubernetes, it's one extra layer of abstraction and moving parts that you need to understand and keep into account when developing or making changes to an existing system.

I am not saying that microservices is a problem for Slack (at their scale it can make sense), but I am expressing my overall concern about smaller companies going down the same route when their scale or the problem being solved doesn't justify it and they end up having to deal with the (self-inflicted) problems of a massively distributed system with no major upside as well as my personal opinion of why I feel uneasy working on systems where I don't have a full overview of how it works and its potential failure modes.

When it comes to the benefits of microservices I am not sure whether those are all worthwhile considering the overhead and extra complexity of development on a microservices architecture.

In a monolithic application, most data and functions you might need are just a function call away and you typically have one or a handful of databases to interact with, often abstracted away by an ORM. In a microservices architecture, you suddenly need to worry about serialization, authentication and communication between services (and its failure modes, etc) and might require coordinated changes across several services, each of which might use a different language/framework and deployment process.

In terms of getting started, it has always been easier for me to work on a monolith where the codebase makes up for bad/no documentation because my IDE can resolve the majority of the symbols and allows me to see where the data I need lives and where it's being used. In a microservices architecture all of that goes out the window and you need to do a lot more manual "discovery" work searching through the documentation (if there is documentation, which is not a given) and manually figuring out the RPC calls because IDEs typically can't resolve cross-service communications.

Running a monolithic application locally is a lot easier than a microservices architecture. For the former you can typically get away with just a database and cache server all running natively. The latter pretty much imposes a container-based stack where you are now running 10 databases, caches, reverse proxies and everything involved around service discovery, which adds yet another layer of abstraction and makes you spend more time on this useless plumbing than actually getting work done and delivering business value.

Re:A terrible, horrible, no-good, very bad day at Slack by gutino on Thursday July 09, 2020 @04:44AM (#23778193)
Kubernetes is for scaling, the microservice complexity is about the spaghetti relation graph between them, the mis-consistency effects and so on. Believe me, you better have a infrastructure/development process that justify them.
Re:A terrible, horrible, no-good, very bad day at Slack by Wheaties466 on Wednesday July 08, 2020 @09:09AM (#23769502)
I like your statement but I don't think it has to do with the speed of development either.

In a monolithic architecture the devs that deal with it, have to deal with the program as a whole. So if something doesn't work, its their problem. Where as in a micro service architecture it can be easy to spin up a service and not know the systems that integrate with it.

The problem here is with documentation and understanding of architecture. Its just the nature of the beast that the monolithic dev knows how thing communicate with the monolithic program because he needs to know, in order to do his job. In this instance the problem isn't with micro services, its with the execution. And that execution is a very easy trap to fall into with micro services.

Re:A terrible, horrible, no-good, very bad day at Slack by thebean11 on Wednesday July 08, 2020 @10:23AM (#23770135)
The same thing can happen in a monolith. Make a change, run tests, and make sure your new feature works, while breaking some untested behavior you didn't know about in some other part of the monolith.
Re:A terrible, horrible, no-good, very bad day at Slack by please-reread on Wednesday July 08, 2020 @03:22AM (#23767693)
Re:A terrible, horrible, no-good, very bad day at Slack by arthurcolle on Wednesday July 08, 2020 @05:10AM (#23768212)
Obviously he means boogeyman. Even on your page, it suggests another spelling. What a useless comment.
Re:A terrible, horrible, no-good, very bad day at Slack by jzoch on Tuesday July 07, 2020 @11:41PM (#23766681)
Its a load balancer bug. Thats it. Everything else functioned totally normally from what I can see. I think people are blowing this out of proportion saying everything is so complex or its all microservices oh no!

This exact bug could have bit a large monolithic app running on a VM.

Re:A terrible, horrible, no-good, very bad day at Slack by a2tech on Wednesday July 08, 2020 @09:09AM (#23769498)
No, its not a load balancer bug. It was a bug with the home built program they built for managing config load ins TO the load balancer. The load balancer did exactly what it was instructed to do--but the slack developed app for helping the load balancer deal with their overly complicated back end discovery problems failed to keep the load balancers updated with accurate information on backend servers available for serving.
Re:A terrible, horrible, no-good, very bad day at Slack by rclayton on Wednesday July 08, 2020 @01:48AM (#23767241)
My sentiments exactly.
Re:A terrible, horrible, no-good, very bad day at Slack by staticassertion on Tuesday July 07, 2020 @05:33PM (#23764357)
Feels like you've just described every single bug ever.
Re:A terrible, horrible, no-good, very bad day at Slack by m463 on Tuesday July 07, 2020 @06:04PM (#23764621)
Even at the start I'm sure Grace Hopper didn't anticipate a computer with a moth in it.

https://upload.wikimedia.org/wikipedia/commons/8/8a/H96566k....

Re:A terrible, horrible, no-good, very bad day at Slack by ueli on Wednesday July 08, 2020 @03:00PM (#23773136)
Woods' Theorem: As the complexity of a system increases, the accuracy of any single agent's own model of that system decreases rapidly.

from: https://snafucatchers.github.io/

Re:A terrible, horrible, no-good, very bad day at Slack by lloydatkinson on Wednesday July 08, 2020 @05:09AM (#23768210)
Possibly, but I think it's equally if not more likely a result of "agile" and teams not communicating due to product owners and the like not wanting other teams to work together etc.
Re:A terrible, horrible, no-good, very bad day at Slack by dahfizz on Tuesday July 07, 2020 @10:05PM (#23766251)
Microservices are really cool™
Re:A terrible, horrible, no-good, very bad day at Slack by Polylactic_acid on Tuesday July 07, 2020 @11:33PM (#23766645)
This is far from a micro service problem. I work on a medium sized monolithic rails app and regularly I have issues due to not understanding the whole situation. Even when working in a small part of the app I know super well sometimes other devs change things so the way it works in my mind is not how it works anymore.
Re:A terrible, horrible, no-good, very bad day at Slack by debt on Tuesday July 07, 2020 @07:11PM (#23765287)
TL;DR meta point is: "The reason that we haven’t been doing any significant work on this HAProxy stack is that we’re moving towards Envoy Proxy for all of our ingress load-balancing"

The legacy system supporting Slack in production was heavily resource-constrained as they were moving to a new fancy system. Slack admits here that the legacy system likely wasn't getting the attention it needed and lo-and-behold it started failing in mysterious ways.

Organizational failure by not properly calculating all the risks caused by rotating out part of their load-balancing system. They probably should've asked for more budget here to keep their existing system functional as they slowly transitioned to their new system.

They admit that COVID caused all their systems to become stressed, they probably had appropriately budgeted for the transition to Envoy whenever they asked management(probably pre-covid). The team likely was never meant to support both the load they're now seeing during COVID while transitioning to a new system.

Either way during any transition, there's a period where you must support both systems at full capacity until the legacy system can be gracefully decommissioned.

Re:A terrible, horrible, no-good, very bad day at Slack by sailfast on Tuesday July 07, 2020 @11:34PM (#23766652)
I really feel this comment. Especially during transition it’s hard to see the “to-be legacy” system as worthy of the effort because the new stuff will be here so soon! Until it isn’t because life happens and you’re left with a really shaky platform. These are tough investment decisions especially when resource constrained. As a rule, perhaps ensuring that current state platforms are secure, as you say, before attempting a migration is the best way to go, but one person’s critical work is another person’s “too much insurance.”
Re:A terrible, horrible, no-good, very bad day at Slack by cuu508 on Tuesday July 07, 2020 @04:23AM (#23756906)
That's an excellent TL;DR, thank you!

Postmortems should start with a summary paragraph like the above, and then go into story and full details below.

Re:A terrible, horrible, no-good, very bad day at Slack by yawaramin on Tuesday July 07, 2020 @07:49PM (#23765584)
BLUF style–Bottom Line Up Front. Often used by the military for field action reports.
Re:A terrible, horrible, no-good, very bad day at Slack by pradn on Tuesday July 07, 2020 @11:05PM (#23766523)
The internal Google postmortem format does require a 1-2 sentence summary. Absolutely vital for being able to learn from mistakes. No one is going to parse walls of text when browsing through post-mortems.
Re:A terrible, horrible, no-good, very bad day at Slack by antoinealb on Wednesday July 08, 2020 @06:32PM (#23774933)
Here is an example of such a postmortem format if people wonder: https://landing.google.com/sre/sre-book/chapters/postmortem/
Re:A terrible, horrible, no-good, very bad day at Slack by kergonath on Tuesday July 07, 2020 @04:30PM (#23763684)
This. The linked post is unreadable.
Re:A terrible, horrible, no-good, very bad day at Slack by jacksonpollock on Tuesday July 07, 2020 @02:20PM (#23762331)
agreed!
Re:A terrible, horrible, no-good, very bad day at Slack by aagha on Wednesday July 08, 2020 @05:24PM (#23774402)
I used to work for an Independent System Operator (ISO)[0] and we used to have a sometimes painful process for rolling out any changes to production. It's been a while and I don't remember it all, but it went something like this:

1. Fill out out a change request (CR) form and print it.

2. Have it signed by your manager and the managers of every system it touched, including business owners.

3. Attend the 2x a week meeting and explain your CR. In this meeting, explain what was happening, why, who authorized it, what to do if it failed, what to do if it initially worked but failed later (e.g, on a weekend).

4. Hope your CR passes the vote.

5. Implement your roll-out plan.

This is a robust process. Where it breaks down--I felt--is when you need to fix a typo on the public-facing website that's managed by a CMS.

0 - https://www.eesi.org/files/070913_Jay_Caspary.pdf

Re:A terrible, horrible, no-good, very bad day at Slack by kinow on Tuesday July 07, 2020 @04:40PM (#23763793)
Thanks! They should include this TL;DR in their post!
Re:A terrible, horrible, no-good, very bad day at Slack by devit on Wednesday July 08, 2020 @08:13AM (#23769107)
Seems the root cause is that instead of using an established system like Kubernetes, they rolled their own and didn't engineer and test it as well as such an endeavor would have required.