A clean monolith beats microservices: seven arguments
Microservices have long become the standard answer to every architectural question: the team grows, the product gets more complex, so it is time to split the system into dozens of services. In practice, such a step often adds more operational complexity than benefit. For most products a clean modular monolith remains the more rational choice: it is faster to develop, easier to maintain and cheaper to run.
It is important to distinguish a monolith as a form of deployment from a monolith as chaos in the code. A bad monolith relies on global state, hidden dependencies and endless edits to the same files. A clean monolith is built differently: the domain is split into modules, the contracts between them are explicit, the infrastructure code is isolated, and changes go through tests and review.
1. A single data model reduces the number of errors
In a microservice architecture data quickly spreads across several databases, queues and caches. Eventual consistency appears, along with duplicated reference data, contract migrations and separate rules for recovering from failures. This is justified when the business really requires autonomous contours. But if the product model is still changing every week, a single transactional database helps you move faster and keep the invariants in one place.
In a clean monolith the orders module must not reach directly into the billing tables, and the users module must not know the details of the warehouse logic. The boundary runs not along a separate process but along the module's public API. This approach preserves data integrity and does not make the team pay the distributed-systems tax too early.
2. The team ships changes faster
When the whole domain sits in one codebase, it is easier for a developer to see the full path of a change: types, business rules, migrations, UI contracts and tests. A refactoring goes through one pull request, not through a chain of releases across five repositories. This matters especially for startups, internal platforms and product teams, where the speed of testing hypotheses matters more than the formal autonomy of services.
Microservices give independent deployment, but they take away the simplicity of changing an end-to-end scenario. If scenarios keep changing together, splitting them too early is economically unprofitable.
3. Operations stay predictable
A single service is easier to observe: fewer network hops, fewer points of failure, clearer profiling and cheaper infrastructure. Logs, metrics, alerts and traces are still needed, but you do not have to assemble them from dozens of independent processes with different SLAs and life cycles.
For most B2B products the bottleneck is not the number of services but the quality of database queries, background job queues, caching and the horizontal scaling of the read-heavy parts. These problems are solved inside a monolith: with PostgreSQL replicas, Redis, worker processes, a CDN and a careful separation of the read/write paths.
4. Less DevOps overhead
Every new service needs a build, a deploy, secrets, monitoring, limits, network policies, documentation and an owner. If the team is small, these costs quickly eat the time that should go into the product. A clean monolith does not cancel CI/CD, IaC and observability, but it makes them more compact: one release pipeline, one set of environments, one rollback scheme.
This lowers the cost of ownership. The business does not need to maintain a platform team just to support an architectural choice that does not yet bring measurable returns. This is especially noticeable when a product outgrows an old system: we have discussed why an MVP is better than patching legacy.
5. Modularity can be enforced with tests
The main risk of a monolith is the gradual blurring of boundaries. It has to be closed off with engineering discipline: import rules, architecture tests, linters, code owners and contract tests at the module level. In TypeScript projects this can be reinforced with separate packages inside a workspace, public barrel exports and a ban on reaching into the internal directories of a neighboring module.
src/
modules/
billing/
public.ts
domain/
infrastructure/
orders/
public.ts
domain/
infrastructure/
shared/
kernel/
ui/
Such a structure does not prevent building the application as a single artifact, but it makes the team think in terms of domain boundaries. If a module ever has to be extracted into a separate service, it will already be prepared for the split.
6. Performance is more often limited by something other than the architectural style
Microservices do not speed up a system automatically. They add serialization, network latency, retries, idempotency and separate handling of partial failures. If the problem is a slow SQL query or a heavy synchronous operation, moving the code into a separate service will only make diagnosis harder.
A clean monolith lets you exhaust the cheaper measures first: indexes, profiling of hot spots, background jobs, caching, denormalization, batching and separate read models. A service is worth extracting when there is a concrete reason: an independent scale of load, different availability requirements, a separate owning team or the need to isolate risk.
7. The path to microservices stays open
A clean monolith is not a dead end. It can be the first stage of a mature architecture: the team finds the domain boundaries faster, validates the business model and learns the real load profiles. After that, services are extracted not by a fashionable template but by production data.
A good criterion is simple: if a module often changes independently, has a separate life cycle, creates a different type of load and has a clear owner, it can be extracted. If these conditions are not met, it is better to leave it inside the monolith and invest in the quality of the boundaries.
What we recommend
- Start a new product with a modular monolith and an explicit domain structure.
- Fix the public APIs of the modules and forbid bypassing the internal layers.
- Keep CI fast: type checking, linting, unit tests, integration checks.
- Move background and heavy tasks into workers, without splitting the domain for no reason.
- Decide about services based on metrics of load, release cycle and team.
Architecture should lower the cost of change. For most teams a clean monolith does exactly that: it keeps the system understandable, preserves the speed of development and does not close the path to further splitting when it is really needed.