Monolith versus microservices

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

Get Hands-On Azure for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.