What are microservices?

Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are:

Services are typically organized around business capabilities. Each service is often owned by a single, small team.

The microservice architecture enables an organization to deliver large, complex applications rapidly, frequently, reliably and sustainably - a necessity for competing and winning in today’s world.


Enabling rapid, frequent and reliable software delivery

Success triangle

In order to thrive in today’s volatile, uncertain, complex and ambiguous world, businesses must be nimble, agile and innovate faster. Moreover, since modern businesses are powered by software, IT must deliver that software rapidly, frequently and reliably - as measured by the DORA metrics.

Rapid, frequent, reliable and sustainable delivery requires the success triangle, a combination of three things:

  • Process - DevOps as defined by the DevOps handbook
  • Organization - a network of small, loosely coupled, cross-functional teams
  • Architecture - a loosely coupled, testable and deployable architecture

Teams work independently most of the time to produce a stream of small, frequent changes that are tested by an automated deployment pipeline and deployed into production.

Let’s now look at when you typically need to use microservices in order to have a loosely coupled, testable and deployable architecture.


When you outgrow your monolithic architecture

Let’s imagine that you responsible for a business critical business application that has a monolithic architecture and you are struggling to meet the needs of the business. Should you consider migrating to a microservice architecture? The short answer is that it depends.

It’s important to make the most of your monolithic architecture, e.g. adopt DevOps, and reorganize into loosely coupled, small teams.

In many cases, once you have embraced the success triangle, your monolithic architecture is sufficiently loosely coupled, testable and deployable to enable rapid software delivery.

But sometimes an application can outgrow its monolithic architecture and become an obstacle to rapid, frequent and reliable software delivery. This typically happens when the application becomes large and complex and is developed by many teams. For example, its deployment pipeline become a bottleneck. When this occurs, you should consider migrating to microservices.

My presentation Considering Migrating a Monolith to Microservices? A Dark Energy, Dark Matter Perspective describes how to decide whether to migrate to microservices.

If you have decided to migrate to microservices then the next step is to design a target architecture.


Designing a microservice architecture

Assemblage

Picking technologies - Kubernetes, message broker etc - is important

But what’s critically important is designing a good service architecture: identifying services; defining their responsibilities; their APIs and collaborations. If you get it wrong you risk creating a distributed monolith, which will slow down software delivery.

What’s more, designing the service architecture is challenging because it’s a creative activity - not something you can buy, download or read in a manual.

Assemblage is an architecture definition process that you can can use to define your microservice architecture. It distills your requirements into system operations and subdomains; uses the dark energy and dark matter forces to group the subdomains into services; and designs the distributed system operations.

The Microservices pattern language

Assemblage works in conjunction with the Microservice architecture pattern language, which is your guide when designing a technical architecture

After defining a target microservice architecture you then need to refactor your existing monolith.


Migrating from a monolith to microservices

There are numerous principles for migrating a monolithic application to microservices.

One key principle is to incrementally migrate to microservices using the Strangler Fig pattern - no big bang rewrite. By using this pattern, you rapidly validate your design decisions and deliver new, useful functionality much earlier.

It’s also important to avoid the Microservices adoption antipatterns.


To learn more

Take a look at the resources for adopting the microservice architecture


Topics

Note: tagging is work-in-process

GitOps   ·  Microservices adoption   ·  ancient lore   ·  anti-patterns   ·  application api   ·  application architecture   ·  architecting   ·  architecture   ·  architecture documentation   ·  assemblage   ·  beer   ·  books   ·  containers   ·  dark energy and dark matter   ·  deployment   ·  deployment pipeline   ·  design-time coupling   ·  developer experience   ·  development   ·  devops   ·  docker   ·  eventuate platform   ·  generative AI   ·  glossary   ·  health   ·  hexagonal architecture   ·  implementing commands   ·  implementing queries   ·  inter-service communication   ·  kubernetes   ·  loose coupling   ·  microservice architecture   ·  microservice chassis   ·  microservices adoption   ·  microservicesio updates   ·  modular monolith   ·  multi-architecture docker images   ·  observability   ·  pattern   ·  refactoring to microservices   ·  resilience   ·  sagas   ·  security   ·  service api   ·  service architecture   ·  service blueprint   ·  service collaboration   ·  service design   ·  service discovery   ·  service granularity   ·  service template   ·  software delivery metrics   ·  success triangle   ·  tacos   ·  team topologies   ·  testing   ·  transaction management   ·  transactional messaging

All content


About Microservices.io

Microservices.io is brought to you by Chris Richardson. Experienced software architect, author of POJOs in Action, the creator of the original CloudFoundry.com, and the author of Microservices patterns.

Chris helps organizations improve agility and competitiveness through better software architecture. Learn more about his consulting engagements, and training workshops.

Upcoming public talks/workshops

PREMIUM CONTENT

Premium content and office hours is now available for paid subscribers at premium.microservices.io.

MICROSERVICES WORKSHOPS

Chris teaches comprehensive workshops for architects and developers that will enable your organization use microservices effectively.

Avoid the pitfalls of adopting microservices and learn essential topics, such as service decomposition and design and how to refactor a monolith to microservices.

Learn more

LEARN about microservices

Chris offers numerous other resources for learning the microservice architecture.

Get the book: Microservices Patterns

Read Chris Richardson's book:

Example microservices applications

Want to see an example? Check out Chris Richardson's example applications. See code

Remote consulting session

Got a specific microservice architecture-related question? For example:

  • Wondering whether your organization should adopt microservices?
  • Want to know how to migrate your monolith to microservices?
  • Facing a tricky microservice architecture design problem?

Consider signing up for a two hour, highly focussed, consulting session.

Virtual bootcamp: Distributed data patterns in a microservice architecture

My virtual bootcamp, distributed data patterns in a microservice architecture, is now open for enrollment!

It covers the key distributed data management patterns including Saga, API Composition, and CQRS.

It consists of video lectures, code labs, and a weekly ask-me-anything video conference repeated in multiple timezones.

The regular price is $395/person but use coupon ILFJODYS to sign up for $95 (valid until March 12, 2024). There are deeper discounts for buying multiple seats.

Learn more

Learn how to create a service template and microservice chassis

Take a look at my Manning LiveProject that teaches you how to develop a service template and microservice chassis.

Signup for the newsletter


BUILD microservices

Ready to start using the microservice architecture?

Consulting services

Engage Chris to create a microservices adoption roadmap and help you define your microservice architecture,


The Eventuate platform

Use the Eventuate.io platform to tackle distributed data management challenges in your microservices architecture.

Eventuate is Chris's latest startup. It makes it easy to use the Saga pattern to manage transactions and the CQRS pattern to implement queries.

ASSESS your architecture

Assess your application's microservice architecture and identify what needs to be improved.

Consulting services

Engage Chris to conduct an architectural assessment.



Join the microservices google group

Posts

 What's new?


24 Jul 2017 » Revised data patterns

Copyright © 2024 Chris Richardson • All rights reserved • Supported by Kong.