# Monolithic Architecture

A monolithic architecture is a software design approach where an entire application is built and deployed as a single, self-contained unit. All components -- the user interface, business logic, and data access layer -- are tightly coupled within one codebase and run as a single process.

Monolithic architectures are simpler to develop, test, and deploy initially, since there is only one artifact to build and one service to manage. However, as applications grow, monoliths become harder to maintain, scale, and update. A change to one component requires redeploying the entire application, and scaling requires replicating the whole system even if only one part needs additional capacity.

Many organizations migrate from monolithic to microservices architectures over time, a process sometimes called "strangling the monolith." An API gateway facilitates this transition by routing requests to either the monolith or new microservices based on the endpoint path. This allows gradual extraction of functionality from the monolith without disrupting existing clients or requiring a complete rewrite.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.serverlessapigateway.com/glossary/m/monolithic-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
