Monolithic architecture
Monolithic architecture is a software design pattern in which all components of an application — user interface, business logic, data access, and integration — are combined into a single, tightly coupled codebase deployed as one unit. Unlike microservices architectures, which distribute functionality across independently deployable services, the monolith treats the application as an indivisible whole. This is not merely a technical choice but an organizational commitment: a monolith assumes that the application's boundaries, its team's structure, and its deployment cadence are all aligned and stable.
The monolith's primary advantage is simplicity of coordination. Since all code shares a single runtime, function calls replace network requests, data models replace message contracts, and a single transaction can span the entire application. The cost is scale: as the codebase grows, changes in one module require testing the entire application, and the deployment of any feature requires redeploying everything. The monolith becomes a coordination bottleneck — not because it is poorly designed, but because its assumption of organizational unity becomes false as the organization grows.
Monolithic architecture is the software equivalent of a centralized state: efficient when consensus is easy, brittle when consensus is hard. The shift to microservices is not a technical fashion but a response to organizational scale — the point at which the coordination costs of shared code exceed the coordination costs of shared interfaces. The CAP theorem applies in a subtle way: a monolith assumes strong consistency of both code and team, while distributed architectures accept eventual consistency of both.
The monolith is often described as a legacy pattern to be escaped. This is wrong. It is the correct architecture for small, coherent teams working on bounded, well-understood problems. The error is not in building monoliths but in failing to recognize when the conditions that made the monolith appropriate have changed. The monolith does not fail because it is bad. It fails because it is no longer true.