> For the complete documentation index, see [llms.txt](https://huy312100.gitbook.io/software-development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://huy312100.gitbook.io/software-development/.net-technology/advanced/abp-framework/microservice-architecture.md).

# Microservice Architecture

### Introduction <a href="#introduction" id="introduction"></a>

One of the major goals of the ABP is to provide a convenient infrastructure to create microservice solutions. To make this possible,

* Provides a [module system](https://abp.io/docs/latest/framework/architecture/modularity/basics) that allows you to split your application into modules where each module may have its own database, entities, services, APIs, UI components/pages... etc.
* Offers an [architectural model](https://abp.io/docs/latest/framework/architecture/best-practices/module-architecture) to develop your modules to be compatible to microservice development and deployment.
* Provides [best practices guide](https://abp.io/docs/latest/framework/architecture/best-practices) to develop your module standards-compliance.
* Provides base infrastructure to implement [Domain Driven Design](https://abp.io/docs/latest/framework/architecture/domain-driven-design) in your microservices.
* Provide services to [automatically create REST-style APIs](https://abp.io/docs/latest/framework/api-development/auto-controllers) from your application services.
* Provide services to [automatically create C# API clients](https://abp.io/docs/latest/framework/api-development/dynamic-csharp-clients) that makes easy to consume your services from another service/application.
* Provides a [distributed event bus](https://abp.io/docs/latest/framework/infrastructure/event-bus) to communicate your services.
* Provides many other services to make your daily development easier.

### Microservice for New Applications

One common advise to start a new solution is **always to start with a monolith**, keep it modular and split into microservices once the monolith becomes a problem. This makes your progress fast in the beginning especially if your team is small and you don't want to deal with challenges of the microservice architecture.

However, developing such a well-modular application can be a problem since it is **hard to keep modules isolated** from each other as you would do it for microservices (see [Stefan Tilkov's article](https://martinfowler.com/articles/dont-start-monolith.html) about that). Microservice architecture naturally forces you to develop well isolated services, but in a modular monolithic application it's easy to tight couple modules to each other and design **weak module boundaries** and API contracts.

ABP can help you in that point by offering a **microservice-compatible, strict module architecture** where your module is split into multiple layers/projects and developed in its own VS solution completely isolated and independent from other modules. Such a developed module is a natural microservice yet it can be easily plugged-in a monolithic application. See the [module development best practice guide](https://abp.io/docs/latest/framework/architecture/best-practices) that offers a **microservice-first module design**. All [standard ABP modules](https://github.com/abpframework/abp/tree/master/modules) are developed based on this guide. So, you can use these modules by embedding into your monolithic solution or deploy them separately and use via remote APIs. They can share a single database or can have their own database based on your simple configuration.

### Microservice Demo Solution: eShopOnAbp

The [eShopOnAbp project](https://github.com/abpframework/eShopOnAbp) demonstrates a complete microservice solution based on the ABP.
