Services

Resources

Company

Monolithic architecture (monolith)

A monolithic architecture puts all of an application's features, such as orders, payments, search and user accounts, into one codebase that is built and deployed as a single unit. Modules call each other in-process and usually share one database. It is the default shape of most applications when they start.

How it works

Everything ships together: one build, one artifact, one deploy. Calls between modules are function calls rather than network requests, so they are fast and easy to trace, and a single database transaction can span several features.

The cost shows up as the system grows. A one-line fix to search ships the whole application. To handle 10 times more checkout traffic you run 10 copies of everything, including the parts that are idle.

Why it matters in production

A monolith is not a mistake; it is often the right starting point because it is simple to build, test and run. Teams split out services when one part needs its own scaling, its own release pace or its own team, and the split usually follows team boundaries, as Conway's law predicts.

See also

On the One2N blog

References

  1. MonolithFirst (Martin Fowler)

Four-panel comic about monolithic architecture: one shop app holds orders, payments, search and users over one database; modules call each other with plain function calls and deploy and scale together; a one-line fix in search redeploys everything, and 10x checkout traffic means 10 copies of the whole app; a monolith is a fine start, and search is split out when it needs its own scaling.