From Monolith to Microservices: Our 2-Year Journey
Two years ago our entire product ran on a single Rails application. Today we run 43 microservices. This post is the unfiltered retrospective.
Why we started
Not because microservices are trendy — because our deploy pipeline took 55 minutes and a bug in the billing module could crash the entire product.
The strangler fig pattern
We never did a big-bang rewrite. Instead, we extracted services one at a time using the strangler fig pattern: new traffic goes to the extracted service, old traffic still flows through the monolith, both behind an API gateway that routes based on path.
What hurt most
Distributed transactions. What used to be a database transaction spanning 3 tables became a saga pattern across 3 services. We spent 4 months building compensating transaction infrastructure before it felt solid.
If you're starting a decomposition today: extract the team boundaries first, then the service boundaries. Conway's Law is real.