We will start our journey with microservices by comparing them with a traditional application, which is composed of multiple layers serving different purposes:
As you can see, we define such services as monolithic, where the whole code base is deployed as one application. This one application has multiple responsibilities:
- Serving the UI
- Running business logic
- Running additional processes (such as jobs)
We can also look at it differently—as a single module that handles features from different domains. Let's consider an e-shop, where we have the following:
- Payment logic
- Basket logic
- Order processing logic