Skip to main content

Monolith

In Turkish
Monolit
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/monolith

In short

A monolith is a software application built and deployed as a single unit, where all features share one codebase, one process, and usually one database.

What is a monolith?

In a monolithic architecture, the user interface, business logic, and data access for every feature live in one codebase and are deployed together. An online store built as a monolith would handle products, carts, payments, and user accounts inside the same application. Changing any part means building, testing, and releasing the whole application again.

Monoliths are simple to start with: there is one project to run locally, one thing to deploy, and calls between features are ordinary function calls that are fast and easy to debug. Transactions that span several features are also straightforward because everything usually uses the same database. This is why most new products and small teams begin with a monolith.

As an application and its team grow, a poorly structured monolith can become hard to change, because a small edit in one area may break another. Well-organized monoliths avoid this by dividing the code into internal modules with clear boundaries, an approach called a modular monolith.

The main alternative is microservices, where each feature runs as a separate, independently deployable service. A monolith is like one large department store under a single roof, while microservices are like a street of specialized shops. Monolith is not a synonym for bad code; it is a valid architecture with its own trade-offs.

Key takeaways

  • A monolith is built, deployed, and scaled as a single unit.
  • It is simple to develop, test, and deploy, especially early on.
  • Large, poorly structured monoliths can become hard to change.
  • A modular monolith keeps one deployment but enforces clear internal boundaries.

Example

A monolith: every feature in one applicationtypescript
// One codebase, one deployment: every feature is part of the same app
import { createServer } from "./server";
import { productRoutes } from "./products";
import { cartRoutes } from "./cart";
import { paymentRoutes } from "./payments";

const app = createServer();

// All features run in the same process and share one database
app.use(productRoutes);
app.use(cartRoutes);
app.use(paymentRoutes);

app.listen(3000);

Readers ask

What is the difference between a monolith and microservices?

A monolith is deployed as one application, while microservices split the system into many small services that are deployed and scaled independently. Monoliths are simpler to build and run; microservices give large teams more independence at the cost of more operational complexity.

Is a monolith bad?

No. For most small and medium-sized projects, a well-structured monolith is simpler, cheaper, and faster to develop than microservices. Problems usually come from poor internal structure, not from being a monolith.

What is a modular monolith?

A modular monolith is a single deployable application whose code is split into independent modules with strict boundaries. It keeps the simplicity of one deployment while making it easier to extract separate services later if needed.

Often compared

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings