Software Infrastructure 2.0: A Wishlist
There will not be a massive productivity boost in the next 10 years. We haven&#x27;t had a productivity boost in the past 20 years. In fact, we&#x27;re much less productive now. But I digress.<p>We&#x27;re still largely making and running software the same way we did 20 years ago. The only major differences are the principles that underpin the most modern best practices.<p>&quot;What the fuck does that mean,&quot; you say? It means that I can take a shitty tool and a shitty piece of infrastructure, and make it objectively more reliable, faster, and easier, by using modern practices. Conversely, I can take the latest tools, infrastructure, etc, and make them run like absolute dogshit, by using the practices of a decade ago.<p>Let&#x27;s take K8s for example. It&#x27;s like somebody decided to take the worst trends in software development and design-by-committee and churned out something that is simultaneously complicated and hard to use [correctly]. Setting it up correctly, and using it <i>correctly</i> (no, Mr. I&#x27;m A Javascript Developer, however you <i>think</i> you&#x27;re supposed to use it, you are wrong), for a medium-scale business, requires banging your head against a hodge-podge of poorly designed interfaces and bolting on add-on software for at least a month.<p>This is ridiculous, because what you actually needed was something whose <i>principles</i> match those of K8s. You want immutable infrastructure as code. You want scalable architecture. You want (in theory) loosely joined components. Do you need <i>K8s</i> to do that? No! K8s is literally the most complicated way that exists to do that.<p>Next let&#x27;s take Terraform. A clunky DSL that is slowly becoming sentient. Core functionality that defeats itself (running <i>terraform apply</i> is unpredictable, due to the nature of the design of the program, even though it was created with the opposite intention). Kludgy interfaces that are a chore to cobble together. Dependency hell. Actual runtime in the 10s of minutes (for the infra of a single product&#x2F;region&#x2F;AWS account). And no meaningful idea if the state of the infrastructure matches its state file matches the code that generated it all. To say nothing of continuous integration.<p>Do you need all of that to do infrastructure as code? Of course not. A shell script and <i>Make</i> could do the same thing.<p>So, you have a kludgy Configuration Management tool (terraform), and a kludgy Cluster Management tool (k8s), and all just to run your fucking Node.js webserver, make sure it restarts, and make sure a load-balancer is updated when you rotate in new webservers. Did you <i>need</i> all of this, really? No. The end result is functionally equivalent to a couple of shell scripts on some random VMs.<p>To get the best out of &quot;Software Infrastructure&quot; you don&#x27;t need to use anything fancy. You just need to use something <i>right</i>.<p>---<p>But there&#x27;s a different problem with infra, and it&#x27;s big. See, Cloud Infrastructure works like a server. Like a physical server, with a regular old OS. To manage it, first you &quot;spin up&quot; the physical server. Then you &quot;configure&quot; the server with some &quot;configuration management&quot; software. Then you &quot;copy some files to it&quot;. Then you &quot;run something on it&quot;. And while it&#x27;s running, you change it, live. This is how all Cloud Infra is managed. This is known as Mutable Infrastructure. Modern best practices have shown that this is really bad, because it leads to lots of problems and accidental-yet-necessary complexity.<p>So what is the solution? The solution is for cloud vendors to supply interfaces to manage their gear immutably. And that is a really big fucking problem.<p>Say I have an S3 bucket. Let&#x27;s say I have a bucket policy, lifecycle policy, ACLs, replication, object-level settings, versioning, etc. The whole 9 yards. Now let&#x27;s say I make one change to the bucket (a policy change, say). Production breaks. Can I &quot;back out&quot; that change in one swift command, without even thinking about it, and know that it will work? No.<p>Assuming an AWS API call even has versioning functionality (most don&#x27;t) I can use some API calls to query the previous version, apply the previous version as the current version, change some other things, and hope that fixes it. But there&#x27;s no semblance of <i>`rm S3-BUCKET ; cp -f S3-BUCKET-OLD S3-BUCKET`</i>. You have to just manually fix it &quot;live&quot;. Usually with some fucked up tool with a state file and a DSL that will randomly break on you.<p>There is literally no way to manage cloud infrastructure immutably. Cloud vendors will have to re-design literally <i>all of their interfaces</i> for a completely new paradigm. And that&#x27;s just interfaces. If trying to do the S3 bucket copy fails for &quot;mysterious reasons&quot; (AWS API calls fail all the time, kids), then your immutable change didn&#x27;t work, and you still have a broken system. So they actually have to change how they <i>run</i> their infrastructure, too, to use operations that are extremely unlikely to &quot;misbehave&quot;.<p>Do you know how much shit that covers? It took them like 20 years to make what we have now. It may take another 10 to 20 years to change it all.<p>Therefore, for a very, very long time to come, we will be stuck with shitty tools, trying to shittily manage our infrastructure, the way we used to manage web servers in the 90s. Even though we know for a fact that there is a better way. But we literally don&#x27;t have the time or resources to do that any time soon, because it&#x27;s all too big.