Feb 27 2023 GCP Outage Incident Report
status.cloud.google.com
status.cloud.google.com
I think this is the most understated part of the whole report. The bad thing happened due to "automated clever thing" and then the system "automagically" mitigated it in ~7 minutes. Likely before a human had even figured out what had gone wrong.
Getting a complex system to a level of maturity where this is feasible to do at scale in real life and actually work well is a respectable and non-trivial achievement.
I don't know if Amazon or Azure are able to confidently and effectively put in such automatic remediation measures globally. My sense is there are humans involved to triage and fix unusual types of outages at every other cloud provider, including the other bigs.
Leaving a comment on a message board saying how things ought to work is one thing (there's nothing wrong with your comment, I like it!); I only want to highlight, bold, and underscore how successfully achieving this level of automatic remediation atop a large and dynamic system is uncommon and noteworthy.
I wish this went into more detail about how an incomplete snapshot was created and how the incomplete snapshot was valid-enough to sort-of work.
I'm supposing that whatever interchange format was in use does not have any "END" delimiters (e.g. closing quotes/braces), nor any checksumming to ensure the entire message was delivered. I'm mildly surprised that there wasn't a failsafe to prevent automatically replacing a currently-in-use snapshot with one that lacks many of the services. (Adding a "type 'yes, I mean this'" user interaction widget is my preferred approach to avoid this class of problem in admin interfaces.)
Those only ensure you get the whole message, not that the message makes sense.
START <count> <sha1>
.
.
.
END
because it was just slurped up line by line assuming EOF was good.Adding a blockchain to this would slow things down, add surface area for errors, and provide absolutely no value. This is true of every usage of blockchain other than creating tokens.
In all seriousness - just dropping 1gb json file with N million records in one end probably isn't great either. I suppose one could somehow marry js and subresource integrity protection[2] to get a json serialized structure with hash integrity check. It would probably be a terrible idea.
[2] https://developer.mozilla.org/en-US/docs/Web/Security/Subres...
I wonder why not zero?
Apparently jsonlines is only a website, whereas ndjson is a website+spec. Given the conceptual simplicity, this claim seems a bit dubious. Having two of these identical things, each one clawing for mindshare is dumb and counter-productive. Why can't we all be friendly and get along for the greater good? Oh well, it's par for the course.
https://platform.openai.com/docs/guides/fine-tuning/prepare-...
And googled/ducked from there.
Is it really better than just using an array, though? Now you essentially first parse the data/newline files, splitting blindly on "\n" - hoping that a) you've got the data, and b) that each record can be parsed as json - by an entirely different parser.
Meanwhile - a valid json file (Array of records) - can be quite quickly parsed by an optimized json parser, will error on wrong or truncated input, will (have to) handle reasonable whitespace?
In many cases, absolutely yes it's better. Otherwise you can end up being forced to cram several GB or even 10's of GB of JSON into working memory. Not ideal.
Usually each ndjson file is generated by a single process, so there isn't much concern about invalid formatting making it's way in. It's one of those rare win-wins.
I actually recently tried out a python based steaming JSON parser I found on SO and it was actually even more inefficient (for both CPU and memory) than the built-in JSON package (probably because Python and not a C-module). It was also quite a complex state machine, tricky to catch all corner cases. The SO module had some bugs that I fixed, but I ended up abandoning the entire approach because it wasn't saving any memory.
NDJSON certainly is a much simpler approach, which I like and appreciate.
Also, I think the config files for certain off the shelf network devices don't come with end markers or checksums, and might not be very good at handling corrupted configs. The usual practice is to push updates to a small fraction of those, then wait and see what happens before proceeding further.
I suspect it was more a case of incorrect error handling in a loop... Eg.
output = []
try:
for site in sites:
output += process(site)
except:
print("error!")
write_to_file(output)Really there's 1000 ways for this to happen all of which are going to sound obvious in retrospect but are easy to commit.
Again vindicated. YAML needs to go away. It is misery. I'd rather have XSLT than Helm templates.
There is another workaround using unnamed tempfiles on Linux, but I think even that approach doesn't work for replacing files.
And then there is the issue that this creates a new file with the same name, instead of replacing the contents of the existing file. I think that's often not the desired behaviour regarding symlinks or inode ids.
And finally all those workarounds are overly complicated, so almost no application uses them, while pretty much every application that saves some kind of document (image, textfile, etc.) would benefit from atomic saving.
$ echo "File 1" > file1
$ echo "File 2" > file2
$ ln -s file2 file3
$ cat file3
File 2
$ echo "File 4" > file4
$ mv file4 file2
$ cat file3
File 4Each network would have its own config plane and data plane. Changes would only be made to one at once. Perhaps even different teams managing them so that one rogue or hacked employee can't take down the whole lot.
Then, if someone screws up and pushes a totally nuts config, it will only impact one network. User traffic would flow just fine over the other networks.
Obviously there would need to be thought on which network data will be routed over, failover logic between one and another, etc. And that failover logic would all be site specific, and rolled out site by site, so there is again so single point of global failure.
Others can correct me if I'm wrong about this. All I know is that the production network where I work is not air gapped in the way that would be required to truthfully consider testing networks a non production environment, so non prod changes typically wind up in front of the change review board anyway.
Ask your own sites network engineers and see if they have similar constraints because I would be interested to hear more perspectives on that.
One other thing I will say is that the abstractions of "config plane" and "data plane" and "control plane" don't really exist on real physical systems. That is mostly an abstraction created for applications people, those systems are not going to be totally blocked from interacting with eachother, they kind of have to. So if any of your "planes" are shared with production it is a production environment.
Instead, what's commonly done is to provide a Controlled Interface (to borrow a term from those national government networks) that gates which things are at which level of trust. This is where security boundaries are enforced -- and if they are sound security boundaries things on either side can't reasonably damage the other side.
If you use any sort of virtualization: the control plane (infra) vs data plane (apps) will naturally evolve from the architecture. The config plane and control plane can get squashed into the same thing though, but it can also be disparate for at both infra- and application level.
Google's network is complicated, making many assumptions about "what is prod" etc hard to reason about.
Probably you get better independence with smaller providers where the provider isn't yet big enough to actually run a global network. Then, each PoP is likely to run or fail independently. Google and peers have enough scope that they can run a single global network where one can experience the Haiku:
It's not BGP
There's no way it's BGP
It was BGP
(DNS also fits in there; any sort of automation to push DNS or BGP changes will probably fit, if the name was carefully chosen)Recently, AWS seemed to be finally capitulating to sales demand and globalizing things.
I wonder if that will slow now there's a competitor incident report with the answer being region sharding.
Short answer: no. cross-region services are few and far between.
Long answer: https://docs.aws.amazon.com/whitepapers/latest/aws-fault-iso...
If restoration(S3 & snapshots) and networking are both cross region it is possible to avoid outages without much effort.
S3 already supports global endpoint, cross regional replication and even manual failover.
RDS supports cross regional snapshots.
Networking has a bunch of options for crossing regional now.
If you're worried about AWS global endpoints and services going down the design is always around pointing to the global but being able to fall back to a specific region up.
At this point can just run EKS in N regions, have the clusters stateless and treat RDS+S3 for state.
For example why are there no processes to check for snapshot integrity or if they are, why were they not used?
They pointed out several issues that caused this and several mitigations to prevent it from happening again.
I have yet to see anyone else with public RCAs as good as Google Cloud
> During a routine update to the critical elements snapshot data, an incomplete snapshot was inadvertently shared which removed several sites from the topology map.
What you’re saying can go into the lessons learned section.
Done.
They were starting to bend to GCP sales pressure* to globalize.
Fingers crossed this slows that roll.
* actually enterprise I.T. purchasing demand, to be clear