Slide 1

Slide 1 text

@crichardson Microservices rules: what good looks like Chris Richardson Founder of Eventuate.io Founder of the original CloudFoundry.com Author of POJOs in Action and Microservices Patterns [email protected] http://adopt.microservices.io https://www.linkedin.com/in/pojos Copyright © 2025. Chris Richardson Consulting, Inc. All rights reserved

Slide 2

Slide 2 text

@crichardson “Our application is ‘****’, it's so complex and so dif fi cult to change” Architect of ancient legacy application Developer of a young microservices application

Slide 3

Slide 3 text

@crichardson Presentation goal 11 rules that prevent an organization from making a mess of its microservice architecture

Slide 4

Slide 4 text

@crichardson About Chris http://adopt.microservices.io

Slide 5

Slide 5 text

@crichardson About Chris https://chrisrichardson.net/

Slide 6

Slide 6 text

@crichardson Microservices Patterns, 2nd edition https://microservices.io/post/architecture/2025/06/26/announcing-meap-microservices- patterns-2nd-edition.html

Slide 7

Slide 7 text

@crichardson Microservices rules Architecture Architecture rules Software development rules Foundational rules Enables Monolith Microservices Defines Constrains Evolution strategy 2. Implement fast, automated deployment pipelines 1. Practice continuous delivery/deployment 3. Apply Team Topologies: organizing for fast flow 4. Provide a great developer experience (DevEx) 5. Use a deliberative design process 6. Design independently deployable services 7. Design loosely coupled services 8. Design testable services 9. Develop observable services 10. Big/risky change => smaller/safer and (ideally easily) reversible changes 11. Track and improve software metrics and KPIs Leaders must pay attention to software delivery Key development practices: DevOps and Team Topologies Essential characteristics of the microservice architecture Provides feedback from production: the second DevOps way Enables a fast deployment pipeline Elusive but essential Seems obvious but … Provides feedback about the adoption of a new architecture https://microservices.io/articles/microservices-rules/ index.html

Slide 8

Slide 8 text

@crichardson Software development rules 2. Implement fast, automated deployment pipelines 1. Practice continuous delivery/deployment 3. Apply Team Topologies: organizing for fast flow 4. Provide a great developer experience (DevEx) Key development practices: DevOps and Team Topologies Elusive but essential

Slide 9

Slide 9 text

@crichardson The software delivery feedback loop Development Production Changes: Features, defects, risk, tech debt Feedback Users IT

Slide 10

Slide 10 text

@crichardson Traditional software delivery: slow feedback loop Feedback Long Occasional Development Production Feedback Users QA Ops Slow Handoff Handoff Lots of meetings

Slide 11

Slide 11 text

@crichardson Volatile Uncertain Complex Ambiguous Building complex applications Often using new, unfamiliar technologies + Slow feedback loops = Build the wrong application, the wrong way

Slide 12

Slide 12 text

@crichardson Fast fl ow for business succe$$ in today’s VUCA world Development Production Continuous stream of small changes, many times a day Continuous feedback and learning https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/developer-velocity-how-software-excellence-fuels-business-performance Users IT

Slide 13

Slide 13 text

@crichardson https://www.ft.com/content/f9356bdc-3102-11ea-a329-0bcf87a328f2 The success triangle Process: Organization: IT must practice fast fl ow Businesses must be nimble, agile and innovate faster S/W VUCA Fast fl ow architecture: Monolith (small org/app) or Microservices (at scale) Enables Enables Principles and practices for fast fl ow Organizational patterns for fast fl ow

Slide 14

Slide 14 text

What is DevOps? Set of principles and practices where developers, testers (dev) and IT operations (ops) collaborate and communicate to deliver software rapidly, frequently, and reliably http://itrevolution.com/devops-handbook Three ways Flow Feedback Learning

Slide 15

Slide 15 text

@crichardson Rule #1: Practice continuous delivery/deployment The ability to get changes into production safely and quickly in a sustainable way. Code (Git) repository is the source of truth Software is always releasable Developers commit frequently - e.g. daily - to trunk Highly automated https://continuousdelivery.com/

Slide 16

Slide 16 text

@crichardson Rule #2: Implement a fast deployment pipeline Production Fast, automated deployment pipeline Developer laptop Application repository 15 minutes

Slide 17

Slide 17 text

Rule #3: Apply Team Topologies: organizing for fast fl ow

Slide 18

Slide 18 text

When necessary: create platforms to help the service teams An artifact that reduces the cognitive load of the stream- aligned teams https://microservices.io/post/architecture/2025/11/23/qconsf-2025-microservices-platforms.html

Slide 19

Slide 19 text

Microservices Platforms + Teams https://microservices.io/post/architecture/2025/05/06/microservices-platforms-team-topologies-patterns.html

Slide 20

Slide 20 text

@crichardson Rule #4: Provide a great DevEx DevEx Work environment than minimizes interruptions, meaningful work, … Minimize - simplify environment, automate, good documentation, … Fast feedback from colleagues, tools, deployment pipeline, production, users, … Feedback Flow Cognitive load https://premium.microservices.io/microservices-rules-4- provide-a-great-developer-experience/ Great

Slide 21

Slide 21 text

@crichardson “Developer experience isn’t just about making developers happy —it’s about removing friction that slows down your entire business.”

Slide 22

Slide 22 text

@crichardson Foundational rules 5. Use a deliberative design process 10. Big/risky change => smaller/safer and (ideally easily) reversible changes 11. Track and improve software metrics and KPIs Leaders must pay attention to software delivery Seems obvious but … Provides feedback about the adoption of a new architecture

Slide 23

Slide 23 text

@crichardson Architecture = series of design decisions https://premium.microservices.io/a-service-should-exist-to-solve-a-problem/

Slide 24

Slide 24 text

Irrational @FamousDev says X is good/bad X looks like a cool, new thing to try X would look good on my resume I’ve used X in my past 5 jobs Magical thinking: we can neglect architecture … https://microservices.io/post/architecture/2023/03/13/better-decision-making-with-patterns.html Requires knowledge Only you know this Rule #5: use a deliberative design process

Slide 25

Slide 25 text

@crichardson e.g.: Service exists to solve a problem Add new service If and only if the bene fi ts outweigh the drawbacks https://microservices.io/post/architecture/2023/03/26/dark-energy-dark-matter-force-descriptions.html Dark energy/Dark matter

Slide 26

Slide 26 text

@crichardson Architecture rules 6. Design independently deployable services 7. Design loosely coupled services 8. Design testable services 9. Develop observable services Essential characteristics of the microservice architecture Provides feedback from production: the second DevOps way Enables a fast deployment pipeline

Slide 27

Slide 27 text

@crichardson Microservice architecture: two or more components Production Deployment pipeline Service Repo Deployment pipeline Service Repo Deployment pipeline Service Repo Independently deployable Loosely coupled Svc Svc Svc Some system operations span multiple services

Slide 28

Slide 28 text

Rule #6: Design loosely (design-time*) coupled services * vs runtime and build-time coupling https://microservices.io/post/architecture/2023/03/28/microservice-architecture-essentials-loose-coupling.html Customer Service Customer Subdomain Order Service Order Subdomain API Stable Infrequent lock step changes

Slide 29

Slide 29 text

The problem with tight design- time coupling Changing services in lock step reduces productivity: API changes/evolution Complexity of non-atomic changes of independently deployable services Coordination between teams Worst case: distributed monolith! Therefore: Tightly coupled subdomains should be packaged together Order Service Customer Subdomain Order Subdomain Package together

Slide 30

Slide 30 text

Design iceberg services Implementation DB API Small, stable API Large, complex implementation Change https://microservices.io/post/architecture/2023/03/01/geometry-of-microservices.html

Slide 31

Slide 31 text

@crichardson Rule #7: design independently deployable services https://microservices.io/post/architecture/2022/05/04/microservice-architecture-essentials-deployability.html Production Order Service Order Service Deployment pipeline Test in isolation Test Service Test Double Service Sole criteria for release Includes contract- testing to enforce API interoperability Deploy automatically

Slide 32

Slide 32 text

@crichardson Why independently deployable services? De fi ning characteristic of the microservice architecture Enables teams to develop and deploy independently Testing a service in isolation Simpler testing set up using test doubles Fast Reliable Testing services together = distributed monolith = downsides of both with few of the bene fi ts By de fi nition: the output of a deployment pipeline is deployable

Slide 33

Slide 33 text

@crichardson Rule #8: Design testable services Automated - tests must be automated Fast - tests must execute quickly to provide fast feedback Reliable - tests must not be fl aky: failing test = real problem Locally executable - tests must run on a developer's laptop to provide fast feedback. Isolated - tests must use test doubles for the service's dependencies

Slide 34

Slide 34 text

@crichardson Rule #9: develop observable services Key Health check invoker, e.g. monitoring service Invokes Observable Service Health Check API Health Check API pattern Log file Logging server Log aggregation pattern Exception Reporter Exception Tracking Service Exception Tracking pattern Audit Database Adapter Audit Logging pattern Metrics Exporter Metrics service Application Metrics pattern Distributed Tracing Exporter Distributed tracing server Distributed tracing pattern Logging Aggregation Pipeline Logging Adapter Pattern Developer responsibility Operations responsibility Auditing Database Pattern Participant

Slide 35

Slide 35 text

Why observable services? Quick detect and rollback broken deployments (Fast) feedback is a foundation of DevEx and DevOps Quickly detect, diagnose and fi x production issues http://itrevolution.com/devops-handbook Flow Feedback Learning

Slide 36

Slide 36 text

@crichardson Foundational rules 5. Use a deliberative design process 10. Big/risky change => smaller/safer and (ideally easily) reversible changes 11. Track and improve software metrics and KPIs Leaders must pay attention to software delivery Seems obvious but … Provides feedback about the adoption of a new architecture

Slide 37

Slide 37 text

@crichardson Rule #10: Big/risky changes* => smaller/safer/reversible changes * Architecture changes, migrations

Slide 38

Slide 38 text

@crichardson Example: Incrementally migrate from a monolith to microservices Monolith Time Monolith Service Monolith Service Service Monolith Service Service Service Service …. Monolith Service Service Service Service Service Service Service Service Service Service Service Service Service Service Service Service …. Strangler application The strangler application grows larger over time The monolith shrinks over time Service Service Service Service Service Service Service Service New features

Slide 39

Slide 39 text

Why is the Strangler Fig application pattern better than a big bang rewrite? Acknowledges that modernization is a process of discovery Immediate bene fi t from services Enables agility Early and continuous feedback and learning https://microservices.io/post/refactoring/2023/06/21/strangler- fi g-application-pattern-incremental-modernization-to-services.md.html

Slide 40

Slide 40 text

@crichardson Other examples of smaller/ safer/reversible changes Continuous deployment Canary deployments - incrementally shift traf fi c to new Incrementally migrating users from old to new Learning through continual experimentation

Slide 41

Slide 41 text

@crichardson DORA metrics: measuring performance https://dora.dev/ Metric Description Elite performance Deployment frequency How frequently changes are pushed to production Each commit Lead time Time from commit to deploy < 1 hour Change failure rate How frequently a change breaks production Very low Time to restore service How long to recover from a failed deployment Very short Move fast to not break things

Slide 42

Slide 42 text

@crichardson Assess DevEx https://queue.acm.org/detail.cfm?id=3595878

Slide 43

Slide 43 text

@crichardson Capture architecture metrics Key focus: design-time coupling between services Predict from design metrics Analyze inbound/outbound dependencies Observe actual issues Commits for multiple services for the same JIRA issue Frequency of breaking API changes

Slide 44

Slide 44 text

Organizational KPIs Software delivery performance impacts business success THEREFORE: Every leader including CxOs should pay attention Category KPI Delivery Lead time Deployment frequency DevEx Perceived ease of delivery Perceived productivity Architecture Degree of loose design-time coupling

Slide 45

Slide 45 text

@crichardson Microservices rules Architecture Architecture rules Software development rules Foundational rules Enables Monolith Microservices Defines Constrains Evolution strategy 2. Implement fast, automated deployment pipelines 1. Practice continuous delivery/deployment 3. Apply Team Topologies: organizing for fast flow 4. Provide a great developer experience (DevEx) 5. Use a deliberative design process 6. Design independently deployable services 7. Design loosely coupled services 8. Design testable services 9. Develop observable services 10. Big/risky change => smaller/safer and (ideally easily) reversible changes 11. Track and improve software metrics and KPIs Leaders must pay attention to software delivery Key development practices: DevOps and Team Topologies Essential characteristics of the microservice architecture Provides feedback from production: the second DevOps way Enables a fast deployment pipeline Elusive but essential Seems obvious but … Provides feedback about the adoption of a new architecture https://microservices.io/articles/microservices-rules/ index.html

Slide 46

Slide 46 text

@crichardson [email protected] http://adopt.microservices.io Questions? https://www.linkedin.com/in/pojos