What is monolith?
A monolith (or monolithic architecture) is a single, self‑contained software application where all the code, UI, business logic, and data access live together in one big codebase and run as one process.
Let's break it down
Imagine a house built as one solid block: the kitchen, bedroom, bathroom, and living room are all part of the same structure. In a monolithic app, the user interface, the rules that process data, and the parts that talk to the database are all built together, compiled together, and deployed together.
Why does it matter?
Understanding monoliths helps you decide how to design, build, and maintain software. It influences how easy it is to add new features, fix bugs, scale the app for many users, and how teams collaborate on the code.
Where is it used?
- Small startups launching their first product
- Legacy systems that have been around for years
- Simple internal tools or admin dashboards
- Many traditional web applications built with frameworks like Ruby on Rails, Django, or ASP.NET MVC
Good things about it
- Simpler to start: one project, one build, one deployment pipeline.
- Easier to test locally because everything runs together.
- No network latency between components; calls are just function calls.
- Consistent data handling and transaction management within one process.
Not-so-good things
- As the codebase grows, it becomes harder to understand and change.
- A small bug can bring down the whole application.
- Scaling requires replicating the entire app, even if only one part is busy.
- Multiple teams working on the same code can step on each other’s toes, leading to merge conflicts and slower development.