Monolith vs Microservices: Why Modular Monoliths Are Back

Microservices were once treated as the natural next step for growing software applications. By splitting an application into independently deployable services, engineering teams expected better scalability, faster releases, and greater development flexibility. However, many organisations discovered that distributing an application also introduces significant operational and architectural complexity.
The discussion is now becoming more balanced. Instead of automatically breaking applications into dozens of services, some teams are consolidating related functionality into modular monoliths—applications that run and deploy as one unit but maintain strict internal boundaries.
This is not a rejection of microservices. It is a shift towards choosing architecture based on actual business requirements rather than industry trends.
A traditional monolithic application is built and deployed as a single unit. Its features may include authentication, payments, inventory, reporting, and customer management, all running within one application.
This architecture can be straightforward to develop and operate, particularly for smaller teams. However, poorly structured monoliths often develop tightly coupled components, making changes difficult as the codebase grows.
Microservices take a different approach. An application is divided into smaller services, each responsible for a specific business capability. These services communicate through APIs, messaging systems, or other network-based mechanisms.
For example, an e-commerce platform might separate its functionality into:
User authentication service
Product catalogue service
Order management service
Payment service
Inventory service
Notification service
Each service can potentially have its own deployment lifecycle, database, and scaling strategy.
The challenge is that independent services introduce distributed-system responsibilities that traditional monoliths do not necessarily require.
A modular monolith combines the operational simplicity of a single deployable application with the internal organisation associated with microservices.
Instead of allowing every component to access every other component directly, the application is divided into clearly defined modules. Each module owns a specific business responsibility and exposes controlled interfaces.
Consider an e-commerce application with separate modules for orders, payments, customers, and inventory. These modules can exist within the same codebase and application process while maintaining independent business logic.
A well-designed modular monolith typically includes:
Clear module ownership and responsibilities.
Explicit interfaces between modules.
Controlled access to internal data.
Minimal cross-module dependencies.
Automated tests for module boundaries.
A consistent application deployment process.
The important distinction is that a modular monolith is not simply a large codebase divided into folders. Its boundaries must be enforced through architecture and development practices.
Microservices solve genuine problems, particularly when large engineering organisations need independent ownership and deployment. However, they also introduce costs that are easy to underestimate during the initial architecture design.
Increased infrastructure and operational overhead
A system with dozens of services requires deployment pipelines, configuration management, monitoring, logging, service discovery, and security controls across multiple components.
Each service may need its own container, runtime configuration, health checks, and deployment process. Teams also need reliable observability to understand what happens when a request crosses several services.
For organisations without mature DevOps practices, this can become a substantial burden.
Network communication introduces failure points
In a monolith, two modules can communicate through in-process function calls. In microservices, communication often depends on network requests or message brokers.
Network calls introduce latency, timeouts, connection failures, retries, and partial outages. A checkout operation that depends on separate payment, inventory, and order services must handle the possibility that one component becomes unavailable while the others continue operating.
These distributed failure scenarios require careful resilience engineering.
Data consistency becomes more difficult
Traditional applications can often perform related database changes within a single transaction.
Microservices commonly manage separate data stores. When one business operation updates multiple services, maintaining consistency may require event-driven communication, compensating transactions, or the Saga pattern.
These approaches are useful, but they introduce additional implementation and debugging responsibilities.
Small changes can create large coordination tasks
Microservices are intended to support independent deployment. However, poor service boundaries can create dependencies between releases.
For example, changing an order API may require simultaneous updates to the payment and inventory services. If teams cannot deploy these components independently, much of the expected flexibility disappears.
A modular monolith can simplify coordinated changes when multiple modules participate in the same business transaction.
Architecture factor | Modular monolith | Microservices |
Deployment | One application unit | Multiple independent services |
Communication | Usually in-process | Network or messaging |
Data management | Can share infrastructure with module ownership | Typically decentralised |
Operational complexity | Generally lower | Generally higher |
Independent scaling | Limited | Stronger |
Transactions | Simpler within one database | Often distributed |
Team ownership | Shared codebase with module boundaries | Independent service ownership possible |
Neither architecture is universally superior. A modular monolith can be easier to maintain for a focused product team, while microservices can be more appropriate when business capabilities genuinely need independent scaling, ownership, or release cycles.
The architectural decision should reflect actual system constraints, not simply the number of developers or anticipated future traffic.
Returning to a monolith does not mean returning to tightly coupled application design. A modular architecture requires deliberate boundaries.
Define modules around business capabilities
Use domain-driven design principles to identify meaningful business areas. For example, an online retail platform could have separate modules for customers, orders, payments, and inventory.
Each module should own its business rules instead of allowing unrelated components to manipulate its internal logic.
Enforce communication through interfaces
Modules should interact through defined interfaces rather than accessing each other's internal classes or database structures directly.
For example, the order module might call a payment module's public interface instead of directly modifying payment records.
This makes dependencies visible and reduces accidental coupling.
Establish clear data ownership
Even if modules use the same database, each module should own its tables and control how other modules access its information.
Avoid unrestricted cross-module queries and direct database updates. These shortcuts gradually undermine modular boundaries.
Automate architecture testing
Unit tests verify business logic, while integration tests verify interactions between modules.
Architecture tests can also enforce rules such as preventing the customer module from importing internal payment implementation classes.
Tools and techniques such as dependency rules, package boundaries, and static analysis help prevent architectural drift.
When Should Teams Choose Each Architecture?
A modular monolith is often a sensible choice when:
A product is managed by one team or a small number of closely collaborating teams.
Most features share similar scaling requirements.
Business operations involve frequent transactions across related modules.
Independent service deployment is not a major requirement.
The organisation wants to reduce infrastructure and operational overhead.
Microservices become more attractive when:
Different business capabilities require independent scaling.
Multiple teams need autonomous ownership and release schedules.
Parts of the system have substantially different reliability or performance requirements.
Technology diversity provides a genuine business advantage.
The organisation has the engineering and operational maturity to manage distributed systems.
A practical strategy is to begin with a modular monolith and extract services only when measurable requirements justify the separation. This avoids committing to distributed complexity before the system's boundaries and scaling needs are understood.
Prioritise business boundaries: Organise modules around domain responsibilities, not arbitrary technical layers.
Protect module interfaces: Prevent developers from bypassing public interfaces to access internal implementation details.
Measure before splitting: Use performance and deployment data to identify genuine service extraction candidates.
Keep dependencies directional: Avoid circular dependencies between modules.
Prepare for evolution: Design interfaces so that a module can become an independent service if future requirements demand it.
Treating folders as modules: Organising files separately does not automatically create architectural boundaries.
Sharing internal database access: Unrestricted access makes modules tightly coupled.
Creating oversized modules: A module should represent a cohesive business capability, not become another unstructured application.
Rejecting microservices completely: Some workloads genuinely benefit from independent deployment and scaling.
Splitting too early: Extracting services before understanding domain boundaries can create unnecessary dependencies.
1. What is a modular monolith architecture?
A modular monolith is an application deployed as a single unit but internally divided into independent modules with clear responsibilities and controlled communication.
2. Why are some teams moving away from microservices?
Some teams find that microservices introduce unnecessary infrastructure costs, network complexity, distributed transactions, and operational overhead without delivering enough business value.
3. Is a modular monolith better than microservices?
Not in every situation. Modular monoliths are often suitable for smaller teams and applications with closely connected business processes. Microservices are valuable when independent scaling, deployment, and ownership are essential.
4. Can a modular monolith be converted into microservices later?
Yes. Well-defined module boundaries and interfaces make it easier to extract selected capabilities into independent services when requirements justify the change.
5. Do modular monoliths support scalability?
Yes. They can scale through vertical resources and horizontal application instances. However, individual modules generally cannot be deployed or scaled independently without additional architectural changes.
The renewed interest in modular monoliths reflects a more practical approach to software architecture. Microservices offer important advantages, but those advantages come with additional infrastructure, distributed communication, data consistency, and operational responsibilities.
A modular monolith provides a middle ground: developers can maintain clear business boundaries while keeping deployment and application management relatively simple.
For many teams, the smarter approach is to build a well-structured monolith first, monitor where real constraints emerge, and introduce independent services only when there is a measurable reason to do so.
Ultimately, successful architecture is not about choosing the most fashionable pattern. It is about creating software that teams can develop, operate, and evolve reliably.
Written by
Alaffiya Madarwala
Last updated
10 November 2026
