Skip to content

Our monolith slows every release

Aspect Aspect
Typical organization A product company or internal IT team that has grown from a few developers to several teams on one codebase
Symptoms Slow, risky releases; changes in one area break another; long onboarding
Root cause No enforced boundaries inside the codebase, so everything depends on everything
Usual fix Modularize first; extract services only where a module needs to scale or release independently
Patterns Modular monolith, microservices, strangler fig
  • Releases happen every few weeks, need a coordination meeting, and are often rolled back.
  • A change to pricing breaks invoicing, and nobody saw it coming.
  • The test suite takes an hour and fails at random.
  • New developers take months before they can change anything safely.
  • Teams queue behind each other to deploy.

The application started small, when one team could hold it all in their heads. As teams were added, nothing stopped code in one area from calling into, or reading the data of, any other area. The problem is usually missing boundaries, not the fact that it’s one deployable. Splitting it into services without fixing the boundaries just gives you a distributed monolith: the same coupling, plus network calls.

Option When it fits Cost and risk
Fix the release process only (better tests, CI/CD, feature flags) Boundaries are mostly fine; the pain is in the pipeline Low. Often the quickest win, and needed anyway
Modular monolith: enforce boundaries inside one deployable Most teams on one product; pain comes from coupling Medium. Needs tooling to keep boundaries honest
Extract services for parts that must scale or release on their own A few areas with very different load, release pace or ownership Medium to high. Adds network, data and operational complexity
Full rewrite Almost never Very high. Years without new value, and the old system keeps changing
  1. Measure first. Track lead time from commit to production, deployment frequency, change failure rate and time to restore. They show whether each step helps.
  2. Map the domains. Group the code by business capability, such as orders, billing and catalog, not by technical layer.
  3. Create modules with public interfaces, and give each module sole ownership of its tables.
  4. Enforce the boundaries automatically, with architecture tests or a dependency checker in the build.
  5. Extract a service only where it pays: a module with a different scaling profile, release pace or owning team. Route traffic to it gradually, comparing results with the old path.
Modularize first, extract only where it pays1. Requests still enter through one application. 2. Modules call each other only through public interfaces, checked in the build. 3. Each module owns its own schema; no module reads another's tables. 4. Only a module with different needs, here search, becomes a separate service.One deployable application Web and API layerone entry point Orders moduleowns its tables Billing moduleowns its tables Catalog moduleowns its tables Shared databasea schema per module Search serviceextracted: scales alone1234
Modularize first, extract only where it pays Most of the codebase stays in one deployable with enforced boundaries; one module with different needs becomes a service.
  1. Requests still enter through one application.
  2. Modules call each other only through public interfaces, checked in the build.
  3. Each module owns its own schema; no module reads another's tables.
  4. Only a module with different needs, here search, becomes a separate service.
  • Boundaries erode without enforcement. In one codebase it is always easy to reach into another module.
  • A modular monolith still deploys as one unit, so one module can’t be scaled or released on its own.
  • Every extracted service adds operations work: monitoring, on-call, versioned APIs and data consistency across a network.

Lead time and change failure rate fall, releases stop needing coordination meetings, and a change in one module rarely breaks tests in another.

  • Shopify kept one deployment and built tooling to enforce boundaries between components.
  • Airbnb extracted services gradually, comparing each against the monolith on live traffic.
  • Segment went the other way, merging 140 services back into one.

Written and edited by Abhinav Taduka, enterprise software architect.