I’m so sick of hearing about microservices.
As I walked out out of the conference hall after DHH’s RailsConf keynote this morning, I felt this vibe that people are regarding him as out of touch with reality. Indeed, DHH did give off this sort of church sermon-like tone in his keynote, railing (pun sort of intended) against microservices and JS frameworks.
For some reason, SOAs and JS frameworks have gotten a reputation for being something you want to use instead of something that you have to use. From what I’ve seen with each, I struggle to understand how they got to be in vogue.
SOA proponents will make the usual arguments. When apps are made of small services it’s easier to scale them individually. If your app hits big enough scale a monolith would be crushed under its own weight. That sort of thing. But I’m also hearing proponents discuss how small services are better because each app is simpler and it lets its developers move faster and with less cognitive load. And that’s a load of bullshit.
Architecting your application as a set of microservices adds a large upfront cost in the form of new complexity, and it takes a lot of traffic for that to pay off. Your uptime is reduced with every codependent service running at the same time, so you need systems engineers to help keep as many nines as possible in your uptime. You start discussing things like putting your services in a VPC so that they can quickly talk to one another keep traffic private. Each app needs fault tolerance against other services being unreachable. Debugging becomes wildly more difficult. You need to be on your monitoring game.
Oh, and by the way, you need to consider your application-level architecture. Applications don’t break up easily into super independent components; in the real world these components tend to deeply intermingle with one another. It’s challenging to design the services in a way that adding one feature doesn’t end up touching 3-4 services.
I feel like no one ever talks about these application-level issues. I hear people speaking in generalities about ensuring apps only have a single responsibility, but I’ve yet to hear a real-world story of a real-world app that is built with an SOA and takes business need changes in stride and the developers are happy and work with minimal cognitive load.
Big companies like Google and Amazon aren’t using services because it’s faster or more productive; they’re doing it because they have to.
DHH isn’t trying to cling to some foregone notion of cowboys taming the wild west on their own with their Rails monoliths; he provides real examples of large scale monoliths (Basecamp, GitHub, Shopify). I hate seeing those 3 examples getting reused, but those apps remain successful, and I am not hearing about equivalent SOA-based counterparts.
I’m not snubbing what other frameworks have to offer, but I take comfort in that I can ship real products using Rails with minimal developer manpower. If the app is just as nice, customers won’t care or notice. As everyone around me is levitating toward over-engineered collections of microservices I can see it going two ways, both positive for me. If the world ends up being right and microservices are a productivity panacea, I’ll embrace them with open arms (using Rails 5’s new API mode that DHH was none too excited to announce). If they’re wrong, then I’ll churn out more value faster while they spin their wheels with services.