Architecture follows the organization
When a company commissions new business software — a custom ERP, an ordering platform, a customer portal — the architecture question comes up early. Microservices are often presented as the default “modern” answer.
Yet a system's architecture should first reflect the size of the team, the maturity of the business domain and the realities of running it in production. A microservice is not just a small program. It is an independently deployed unit with its own database, its own release cycle and its own interface contracts. That independence is valuable, but it carries a cost you pay every single day.
What a modular monolith actually is
A modular monolith is an application deployed as a single unit but organized internally into modules with strict boundaries. Each module maps to a business domain — sales, inventory, billing, HR — and exposes an explicit public interface. Other modules cannot reach into its tables or its internal classes.
That discipline is what separates it from the tangled “big ball of mud” teams rightly fear. In a .NET codebase it typically looks like this:
- one project (assembly) per module, with internal types kept internal;
- one database schema per module, even when every schema lives in the same PostgreSQL or SQL Server instance;
- cross-module communication through public interfaces or in-process events, never through queries against another module's tables;
- automated architecture tests that fail the build as soon as a forbidden dependency appears.
The real costs of a distributed system
Moving to microservices turns function calls into network calls. It sounds like a small change. The consequences are not small.
Data consistency
Inside a monolith, a single database transaction guarantees that an order and the matching stock update succeed or fail together. Across two services, that guarantee is gone. You now need sagas, compensating actions, reliable messaging (the outbox pattern) and a willingness to live with eventual rather than immediate consistency.
Operations and observability
Every service has to be built, versioned, deployed, monitored and secured. You need distributed tracing to follow a request across services, centralized logging, secrets management and, more often than not, a container orchestrator. For a team of a few developers, that overhead can consume a large share of the time that should go to business features.
Contract evolution
Changing the interface between two services means managing version compatibility and sometimes deploying in a specific order. What used to be a simple rename inside a monolith becomes a small coordination project.
Infrastructure cost
More services mean more processes, more databases and more network traffic. Depending on your hosting, the bill and the monitoring effort grow accordingly.
When a modular monolith is the right first step
It is usually the most sensible choice when:
- one team, or a few teams working closely together, builds the product;
- the business domain is still being discovered and module boundaries will shift;
- expected load can be handled by several instances of the same application behind a load balancer;
- the business wants a fast go-live and simple operations;
- transactional consistency matters a great deal, as in finance, inventory or invoicing.
In that context, a modular monolith delivers most of the benefits people look for — separation of concerns, readable code, testability — without the operational cost of distribution.
When microservices earn their keep
They become worthwhile when concrete constraints call for them:
| Signal | What it points to |
|---|---|
| Several teams blocked by a shared release cycle | A need for independent deployment |
| One module with a load profile very different from the rest | A need for independent scaling |
| A component that requires a specific technology or strong isolation | A need for technical diversity or security boundaries |
| A stable domain whose boundaries have not moved in a long time | A low-risk extraction candidate |
If none of these signals is present, splitting into services usually means paying for complexity up front with no immediate return.
Drawing good boundaries
The quality of a modular monolith, like that of a microservices architecture, depends above all on where you draw the boundaries. A few principles from domain-driven design (DDD) help:
- Start from the business vocabulary. When “customer” means one thing to sales and another to accounting, you are usually looking at two distinct contexts.
- Keep together what changes together. A business rule and the data it operates on belong in the same module.
- Limit synchronous dependencies. If a module must call three others to answer every request, the boundary is probably in the wrong place.
- Own your data. Each module is the only one that writes to its tables; others read through its interface or react to its events.
Designing the migration path from day one
A well-built modular monolith is not a dead end. It is a trajectory. If a module ever needs to become a standalone service, the path is already mapped out:
- Isolate the data. The module already owns its schema, so it can move to a dedicated database.
- Replace in-process calls with messages. Internal events become messages published on a broker such as RabbitMQ or Azure Service Bus, with the outbox pattern guaranteeing delivery.
- Extract gradually. Deploy the module separately, run it in parallel, then shift traffic to it step by step. This is the strangler fig approach.
- Measure before and after. Latency, error rate, deployment time: the extraction should deliver an observable benefit, not just a more elegant diagram.
This way you only extract the modules that justify it, at the moment they justify it.
Common mistakes to avoid
- The distributed monolith. Separate services that share one database or must be deployed together combine the drawbacks of both approaches with the benefits of neither.
- Cosmetic modules. Neatly organized folders where any class can still call any other. A boundary that neither the compiler nor automated tests enforce will erode.
- Splitting by technical layer instead of business domain. A “UI” module and a “database” module are not business modules; every functional change will touch all of them.
- Postponing observability. Monolith or services, logs and metrics belong in the design from day one.
The bottom line: start simple, keep the door open
Choosing between a modular monolith and microservices is not a matter of ideology. It is a trade-off between autonomy and simplicity, between future flexibility and present cost.
For most new business systems, particularly in small and mid-sized companies, a disciplined modular monolith is the strongest starting point. It ships sooner, runs more simply and keeps the door open to services on the day the need becomes real.
Planning a custom software project and want a second opinion on your architecture? Tell us about your context through the contact form and we will answer with an engineer's perspective, free of technology bias.
Author
ParadiStack