Architecture & Patterns68 min total · 17 parts
Microservices vs. Monolith: The Trade You're Actually Making
Part 1 of 17 · ~2 min
Overview
Here's the pitch you'll hear for microservices, more or less verbatim, from whoever is currently annoyed at your monolith: independent deploys, independent scaling, teams that stop stepping on each other's toes. All of that is true. What the pitch tends to leave out is where the complexity you're trying to get rid of actually goes once you split — it doesn't disappear, it moves. It moves from inside one process, where a debugger could always find it eventually, out onto the wire between two processes, where a debugger mostly can't. Microservices are sold as the fix for a complicated system. Often what they actually do is relocate the complexity somewhere less convenient, and hand you a second, harder problem — distributed systems — as the price of admission.
This is a complete reference on that trade, and we're going to watch one company make it for real reasons, in a real order, and then find out exactly what it bought them and what it cost. You're the fourth engineer at Furrow, a subscription box service that works with local farms: sign up once, and a box of whatever's actually ready to harvest that week shows up at your door every Saturday. In chapter one, Furrow is one codebase talking to one database, run by four people who all sit in the same room and can just shout a question across it. By the closing chapters, it's four services, three teams that don't share a room anymore, and a standing argument about who gets paged when a box ships without the lettuce the app promised. Every pattern below earns its place in this reference because Furrow hit a real wall that forced it — mostly in the order those walls actually showed up, and in at least one case, a wall Furrow built for itself on purpose and had to tear back down a few months later. Work through it start to finish, or jump straight to whatever chapter is giving you trouble — each one tells you, in its first couple of sentences, which version of Furrow it's picking up.