When One Monolith Would Have Saved Millions
Why a modular monolith can be the lower-cost choice when service boundaries, team capacity and independent scaling needs are not proven.
When One Monolith Would Have Saved Millions
TL;DR: Microservices have a break-even point most mid-size organizations haven’t reached. Segment ran 140 microservices, hit the operational ceiling, and consolidated back into a single service. Shopify deliberately chose a modular monolith over microservices and scaled to handle Black Friday traffic. The conservative annual cost difference for a premature microservices adoption: $200K–$400K. Before decomposing, verify: team count > service count ÷ 2, at least 3 services with different scaling profiles, a domain model validated in production for 12+ months, and deployment coordination as the actual bottleneck.
The Common Belief
“Monoliths are legacy. They don’t scale. They create deployment bottlenecks. They prevent team autonomy. Any serious engineering organization should be decomposing into microservices. The cost of microservices is worth the agility they unlock.”
This is the consensus in 2020. Monoliths are the thing you escape from. Microservices are the thing you escape to. The only question is how fast you can make the transition.
Nobody asks whether the transition should happen at all.
Why It’s Wrong
The monolith-bad-microservices-good narrative ignores a fundamental economic reality: microservices have a break-even point, and most organizations haven’t reached it.
Microservices trade one type of complexity (in-process coupling) for another (distributed system complexity). This trade is profitable when the organizational and scaling benefits exceed the distributed system costs. For large organizations with dozens of teams and hundreds of services, the trade pays off. For mid-size organizations with 3–5 teams and 8–15 services, the trade often doesn’t.
Here’s what the trade actually costs:
| Cost Category | Monolith | Microservices (12 services) |
|---|---|---|
| Infrastructure | 2 App Service instances, $140/month | AKS cluster + monitoring + ingress, $500+/month |
| CI/CD pipelines | 1 pipeline, ~15 min build/deploy | 12 pipelines, ~8 min each, 96 min total compute |
| Observability stack | Application Insights, $50/month | Distributed tracing + centralized logging + per-service metrics, $300+/month |
| On-call complexity | 1 application to understand | 12 services, service map, inter-service failure modes |
| Developer onboarding | 1 codebase, 1 architecture | 12 repos, service contracts, deployment topology, distributed debugging |
| Staffing for platform | 0 dedicated platform engineers | 1–2 engineers maintaining the microservices platform |
Conservative annual cost difference: $200K–$400K in infrastructure, tooling, and engineering time — for a mid-size system that could have run as a well-structured monolith.
The Evidence
Case 1: Segment — 140 Microservices Back to a Monolith
The company: Segment, a customer data platform that collects analytics events and forwards them to hundreds of downstream integrations (Google Analytics, Salesforce, Amplitude, etc.).
The decision: In their early architecture, Segment built a separate microservice for each integration destination. By 2017, they had over 140 microservices — one per destination — each running its own queue, worker process, and deployment pipeline.
The team: A mid-size engineering organization that did not have 140 teams. A handful of engineers were responsible for all 140 services.
What happened:
-
Operational overhead exploded. Each microservice had its own queue, retry logic, error handling, and deployment configuration. A bug in the shared event-processing logic had to be patched across 140 repositories. Rolling out a single cross-cutting change (e.g., updating the retry backoff strategy) took weeks of coordinated deploys.
-
Reliability suffered. When a single destination’s queue backed up, it could cascade into resource contention affecting other services on the same infrastructure. Debugging required correlating logs across dozens of services. On-call engineers had to understand the topology of 140 services to diagnose a single customer-facing issue.
-
Feature velocity collapsed. Adding a new destination required copying an existing microservice, modifying the integration logic, configuring a new pipeline, and deploying — a process that took days for what was conceptually a few hundred lines of integration code. The architecture turned a simple problem (“forward this event to a new API”) into an infrastructure problem.
The fix: In 2018–2019, Segment consolidated all 140 microservices into a single service called Centrifuge — effectively a monolith that handled all destinations through a shared worker pool with per-destination configuration. The result: a single deployment pipeline, a single codebase, unified retry logic, and a dramatic reduction in operational burden.
The outcome: Segment reported that the consolidated architecture was easier to operate, faster to extend, and more reliable than the 140-microservice design it replaced.
Reference: Alexandra Noonan, “Goodbye Microservices: From 100s of Problem Children to 1 Superstar”, Segment Engineering Blog, 2018. (https://segment.com/blog/goodbye-microservices/)
Case 2: Shopify — The Deliberate Modular Monolith
The company: Shopify, one of the largest e-commerce platforms in the world, powering over 1 million merchants by 2020.
The decision: By 2019, Shopify’s monolithic Ruby on Rails application had grown to millions of lines of code. The conventional industry playbook would have been to decompose it into microservices. Shopify explicitly chose not to.
What they did instead: Rather than splitting into microservices, Shopify invested in making their monolith modular. They introduced componentization — enforcing clear boundaries between domains (orders, inventory, payments, shipping, etc.) within the single codebase. They built internal tooling to enforce dependency rules, prevent cross-boundary coupling, and ensure that modules communicated through well-defined interfaces.
Why they rejected microservices:
-
Team size vs. service count. Shopify had hundreds of engineers, but they recognized that microservices would create coordination overhead that outweighed the autonomy benefits. A single deployment pipeline for one application was simpler than hundreds of pipelines for hundreds of services.
-
Distributed system complexity was unnecessary. The monolith ran on a single technology stack (Ruby on Rails). There was no need for polyglot services or independently scaled components at the service level — they scaled the monolith horizontally with sharding (per-shop routing) and by scaling the infrastructure.
-
Developer experience mattered more. In a monolith, engineers could search, refactor, and test across module boundaries in a single codebase. In a microservices world, the same refactor would require coordinating changes across multiple repositories, services, and deployment pipelines.
The outcome: By 2020, Shopify’s modular monolith supported one of the highest-traffic e-commerce events in history (flash sales, Black Friday / Cyber Monday). Their architecture proved that a well-structured monolith, combined with infrastructure-level scaling, could handle enormous load without the operational overhead of microservices.
The lesson: Shopify demonstrated that the alternative to a messy monolith is not microservices — it’s a well-organized monolith. Decomposition into modules within a single codebase delivered the code-level boundaries and team autonomy that microservices promise, without the distributed system tax.
Reference: Kirsten Westeinde, “Deconstructing the Monolith: Designing Software that Maximizes Developer Productivity”, Shopify Engineering Blog, 2019. (https://shopify.engineering/deconstructing-monolith-designing-software-maximizes-developer-productivity)
Case 3: The Pattern Across Both
Segment and Shopify arrived at the same conclusion from opposite directions:
-
Segment learned the hard way. They decomposed aggressively into microservices, hit the operational ceiling, and consolidated back into a monolith. The cost of distributed system complexity — 140 deployment pipelines, cross-service debugging, coordinated rollouts — exceeded the benefit of separation.
-
Shopify avoided the mistake entirely. They recognized that decomposition into microservices would create coordination overhead without proportional benefit, and invested in modular boundaries within a single codebase instead.
-
Both confirm the break-even principle. Microservices are not inherently better. They are a trade-off that pays off at a specific scale of team size, traffic diversity, and organizational complexity. Below that threshold, a well-structured monolith delivers faster, costs less, and is easier to operate.
The Break-Even Heuristic
Microservices earn their cost when:
Team count > Service count ÷ 2
AND
At least 3 services have genuinely different scaling profiles
AND
The domain model has been validated in production for 12+ months
AND
Deployment coordination is the actual bottleneck (not a theoretical one)
If any of these conditions is false, the microservices overhead likely exceeds the benefit. A monolith — properly structured with module boundaries, dependency inversion, and clean interfaces — will deliver faster, cost less, and be easier to operate.
The New Model: Architecture Economics
Stop evaluating architecture by modernity. Start evaluating it by economics.
| Question | Monolith Answer | Microservices Answer |
|---|---|---|
| What’s the total platform cost? | Low (1 pipeline, 1 deployment, 1 log stream) | High (N pipelines, N deployments, distributed observability) |
| What’s the developer onboarding time? | Days (1 codebase) | Weeks (N repos, service topology, distributed debugging) |
| What’s the mean time to diagnose? | Minutes (single stack trace) | Hours (distributed trace across services) |
| What’s the feature velocity per engineer? | Higher (no cross-service coordination) | Lower (contract negotiation, deployment sequencing) |
| When does this flip? | When deployment bottlenecks are real and teams need autonomy | When the monolith is genuinely preventing team independence |
The flip point exists. For large organizations, it’s real and microservices are the right call. But for mid-size organizations in 2020, the flip point is further away than the industry narrative suggests.
The Bottom Line
The most expensive architectural decision in enterprise software isn’t choosing the wrong database or the wrong cloud provider. It’s adopting an architecture designed for 200-engineer organizations when you have 15 engineers.
Microservices at the wrong scale don’t just fail to deliver their benefits. They actively consume the budget, time, and cognitive capacity that would have gone into building the product. The monolith wouldn’t have been exciting. It wouldn’t have impressed the architecture review board. But it would have shipped faster, cost less, and done the job.
Sometimes the most courageous architectural decision is the boring one. And in 2020, for most mid-size teams, the boring decision is a well-structured monolith.
Has your organization done the economics? If you switched from a monolith to microservices, did you measure the total cost — not just infrastructure, but engineering time, onboarding, debugging, and coordination overhead? I’m collecting real numbers because the gap between perceived cost and actual cost is consistently larger than teams expect.
Related Posts
Monolith vs Microservices - should we start with microservices?
Monoliths and microservices compared through modular boundaries, extraction signals, scaling, team ownership, distributed failure, and practical starting criteria for growing teams.
The "Microservices Too Early" Anti-Pattern
Why microservices should follow domain understanding and proven pressure points instead of being the starting architecture for a team.
Microservices - Part 1
Microservices Part 1 explains Conway's Law, modular monoliths, service ownership, distributed data, deployment independence and the hidden costs of service boundaries.