SlideShare a Scribd company logo
@crichardson
The microservice architecture:
enabling rapid, reliable, frequent
and sustainable development
Chris Richardson
Founder of Eventuate.io
Founder of the original CloudFoundry.com
Author of POJOs in Action and Microservices Patterns
@crichardson
chris@chrisrichardson.net
http://adopt.microservices.io
Copyright © 2020. Chris Richardson Consulting, Inc. All rights reserved
Presentation goal
Microservice architecture:
• Trends driving adoption
• Essential characteristics
• Benefits and drawbacks
@crichardson
About Chris
http://adopt.microservices.io
@crichardson
For slides, more information, raffle,
discounts, …
Raffle: 5 ebooks
+
40% discount
Raffle: 2 free spots
+
20% discount
https://bit.ly/tdc-2020-msa
Agenda
The need to deliver software rapidly, frequently and reliably
Developing long-lived applications
The monolithic architecture is not an anti-pattern
Overview of the microservice architecture
Architecting loosely coupled services
@crichardson
Software
https://www.wsj.com/articles/SB10001424053111903480904576512250915629460
@crichardson
The Marketplace is
Volatile
Uncertain
Complex
Ambiguous
@crichardson
https://www.ft.com/content/f9356bdc-3102-11ea-a329-0bcf87a328f2
https://www.ft.com/content/3f498e64-1aa6-11ea-97df-cc63de1d73f4
https://techcrunch.com/2019/06/18/the-rise-of-the-gig-economy-helps-london-based-insurtech-zego-to-raise-42m/
O
VID
-19
@crichardson
Businesses must be nimble,
agile, and innovate faster
IT must deliver software
rapidly, frequently and reliably
@crichardson
Quantifying rapid, frequent
and reliable delivery
Velocity
Lead time - time from commit to deploy
Deployment frequency - deploys per
developer per day
Reliability
Mean time to recover from a
deployment failure (MTTR)
Change failure rate - % of deployments
that cause an outage
Key Lean*
principles
* Inspired by the Toyota Production System
@crichardson
Modern software development: rapid and
reliable
Faster
More reliable
The research shows…
Software Delivery
Performance
Lead time, Deployment
frequency, Mean Time To
Restore, Change Fail %
Organizational
Performance
Profitability, Productivity,
Market share
$
Impacts
@crichardson
Process: Lean/DevOps/Continuous Delivery & Deployment
Organization: Small, long-
lived, product-centric,
autonomous teams
Architecture: ???
Deliver changes to
long-lived
applications rapidly,
frequently and reliably
What is DevOps?
Set of practices where
developers, testers
(dev) and IT operations
(ops) collaborate and
communicate to deliver
software rapidly,
frequently, and reliably
http://itrevolution.com/devops-handbook
Key DevOps practices
ApplicationAutomated deployment pipeline
Repository
Production
Frequent
Commits
Code and
configuration
Reliable and frequent
deployments
Fast and reliable
automated tests
DevOps practices: hypothesis
driven development and A/B testing
A requirement is a
hypothesis that’s often
wrong
Validate by quickly getting
feedback for real users
Eric Ries. The Lean Startup (p. 75).
increase in revenue = frequency of experiments x
idea success rate x idea impact
High performance
organization: team of teams
5-9 people - promotes trust
Long-lived - enables trust and high
performance
Cross functional/autonomous -
eliminates time consuming hand-offs
Owns suitably sized software
“component”
Promotes long-term sustainable
development
Prevents cognitive overload
@crichardson
Case study: amazon.com
Amazon reorganized itself into long-
lived, product-centric, loosely coupled,
autonomous, two pizza teams that
developed microservices.
By 2015, they were deploying 130,000
times/day!
This ability to delivery software rapidly
frequently and reliably enables them to
dominate retail as well as cloud
computing.
Rossman, John. Think Like Amazon: 50 1/2 Ideas to Become a
Digital Leader
DevOps Handbook, Kim et all
Development in high performing
organizations
“Complete their work without communicating and
coordinating with people outside their team”
“Make large-scale changes to the design of their system
without depending on other teams to make changes in
their systems or creating significant work for other teams”
“We can do most of our testing without requiring an
integrated environment.”
“We can and do deploy or release our application
independently of other applications/services it depends
on.”
Required architectural quality
attributes (a.k.a. -ilities)
“Complete their work without
communicating and coordinating with
people outside their team”
“Make large-scale changes to the design
of their system without depending on
other teams to make changes in their
systems or creating significant work for
other teams”
“We can do most of our testing without
requiring an integrated environment.”
“We can and do deploy or release our
application independently of other
applications/services it depends on.”
Loosely coupled
(Conway’s law)
Modular
Testable
Deployable
API encapsulates design decisions
Agenda
The need to deliver software rapidly, frequently and reliably
Developing long-lived applications
The monolithic architecture is not an anti-pattern
Overview of the microservice architecture
Architecting loosely coupled services
@crichardson
Successful applications live for a long time, e.g. 10 years,
20 years, …
BUT
Technology changes: Programming languages,
frameworks, …
Time
Technology A Technology B
V1 V2 V3 V…
Importance
The importance of a technology changes over time
@crichardson
An organization’s technology must
be aligned with the marketplace
Murer, Stephan,Bruno Bonati Consulting, Bruno Bonati. Managed Evolution: A Strategy for
Very Large Information Systems
Relying on technology that is unimportant to market
Not using technology that is important to the market
@crichardson
Must be able to upgrade the
technology stack
@crichardson
Required architectural quality
attributes (a.k.a. -ilities)
Long-lived applications
Modularity
Incrementally upgrade the technology
stack
API encapsulates the
technology stack
@crichardson
Architecting for rapid, frequent,
reliable and sustainable development
Loosely coupled
(Conway’s law) Modular
Testable
Deployable
API encapsulates
• design decisions
• technology stack
Agenda
The need to deliver software rapidly, frequently and reliably
Developing long-lived applications
The monolithic architecture is not an anti-pattern
Overview of the microservice architecture
Architecting loosely coupled services
@crichardson
Tomcat/App. Server
Food To Go: Monolithic
architecture
Browser/
Client
WAR/EAR
MySQL
Database
Delivery
management
Order
Management
Kitchen
Management
Web UI
Restaurant
Management
HTML
REST/JSON
The application
The monolithic architecture
is an architectural style
that structures the
application
as a single executable/
deployable component
-ilities of small monoliths
Testability
Deployability
Maintainability
Modularity
Evolvability
✅
✅
✅
✅
✅
@crichardson
Rapid, frequent and reliable delivery
eventually becomes impossible
Time
Maintainability
Testability
Deployability
Modularity
Evolvability
Size/
Complexity
-ilities required to be competitive
Risk of
disruption
@crichardson
MyApp.war
Modular monolith = single classpath
No guarantee of composability
Orders.jar Customers.jar
Orders.jar Customers.jar
Test
independently
Still work?
+ dependencies + dependencies
@crichardson
Technology stack becomes
increasingly obsolete
BUT a rewrite is not feasible
@crichardson
Many decisions are global and can’t be
changed incrementally Don’t change
Programming language
Application framework
Library and framework version
…
@crichardson
Monolithic hell
By John Martin, Public Domain, https://commons.wikimedia.org/w/index.php?curid=3353638
Agenda
The need to deliver software rapidly, frequently and reliably
Developing long-lived applications
The monolithic architecture is not an anti-pattern
Overview of the microservice architecture
Architecting loosely coupled services
The microservice architecture is
an architectural style
that structures an application as a
set of services that are
Highly maintainable and testable
Minimal lead time
Loosely coupled
Independently deployable
Implements a business capability
Owned/developed/tested/deployed by a small team
@crichardson
Food to Go: Microservice
architecture
Browser
Mobile
Application
Content
Router
API
Gateway
Order
Service
Restaurant
Service
Delivery
Service
…
Service
Order
Database
Restaurant
Database
Delivery
Database
…
Database
HTTP
/HTML
REST
REST
Browse &
Search WebApp
Restaurant
Detail WebApp
….
JavaScript
Message
Broker
@crichardson
API
The structure of a service
Operations
Event
Publisher
Commands
Queries
Synchronous
REST/gRPC
Asynchronous
Messaging
Events
Event
Subscriber
API
Client
Invokes
Operations
Events
Service
Database
Private!
@crichardson
Service architecture “mirrors”
the business
FTGO business
Kitchen Service
Delivery Service
Order Taking
Kitchen
Delivery
Accounting
….
….
Service
Order Service
Accounting Service
Maps to
Maps to
Maps to
Maps to
Maps to
Area of the business,
a.k.a.
Subdomain or Business Capability
@crichardson
Goal is team autonomy one
service per team
Service
https://microservices.io/patterns/decomposition/service-per-team.html
Owned by a
team
Owns one
service
Not to exceed
cognitive capacity of
team
@crichardson
Split service only to solve a
problem
Team become two large split team, split service
Deployment pipeline takes too long split into two services
that can be developed/tested independently
Polyglot development: e.g. Python ML model in a Java
application
Split for fault tolerance - isolate HA parts of the application
…
Benefits of microservices
Improved maintainability
Each service fits in the heads of the
development team = Easier to
understand and change
Preserves modularity since a service is a
well-defined module with an
impermeable API
Improved testability:
Each service is easier to test and faster
to test
Improved evolvability - evolve each service’s
technology stack independently
Improved deployability
Each service can be deployed
independently
Easier to scale application
Each service can be scaled
independently
Improves availability/fault isolation and
latency
Critical services are isolated from less
critical services: separate processes and
infrastructure
Separate deployments reduces risk of
change based failure
@crichardson
Process: Lean + DevOps/Continuous Delivery & Deployment
Architecture:
microservices
Testability
Deployability
Modularity
Deliver changes to
long-lived
applications rapidly,
frequently and reliably
Organization: Small, long-
lived, product-centric,
autonomous teams
@crichardson
Loosely coupled teams and
services
Order
Service
Orders
Team
Automated deployment pipeline
Source code repository
Kitchen
Service
Kitchen
Team
Automated deployment pipeline
Source code repository
Delivery
Service
Delivery
Team
Automated deployment pipeline
Source code repository
Working independently > 80% of the time
@crichardson
Microservices experiment safely
and evolve the technology stack
Java
Java
Java
Java
Java
Golang
“GoLang
is cool!”
Java
Java
Java
“Kotlin
is better!”
Java
Kotlin
@crichardson
Drawbacks of microservices
Complexity
Development: IPC, partial failure, distributed data
Testing: Integration, end to end, …
Deployment
…
@crichardson
…Drawbacks of microservices
Correctly identifying service boundaries and avoiding the
distributed monolith anti-pattern
Refactoring a monolithic application to a microservice
architecture
@crichardson
If you are
developing a long-lived, large/complex
application
AND
you need to deliver it rapidly, frequently
and reliably
THEN
the Microservice Architecture is often a
good choice
Agenda
The need to deliver software rapidly, frequently and reliably
Developing long-lived applications
The monolithic architecture is not an anti-pattern
Overview of the microservice architecture
Architecting loosely coupled services
@crichardson
About Conway’s Law
“organizations which design
systems ... are constrained to
produce designs which are
copies of the communication
structures of these
organizations.”
http://melconway.com/Home/Home.html
Loosely coupled teams require a
loosely coupled architecture
@crichardson
Loose coupling is essential
Services collaborate, e.g. Order Service must
reserve customer credit
Coupling is inevitable
BUT
Services must be loosely coupled
API
Order
Service
Customer
Service
reserveCredit()
Runtime coupling
Order Service cannot respond to a synchronous request
(e.g. HTTP POST) until Customer Service responds
VS
Design time coupling
Change Customer Service change Order Service
@crichardson
Loose coupling - design time
Design-time coupling requires coordination between teams:
e.g. Meetings to discuss API changes
Slows down development
Essential to minimize design time coupling:
Use well-designed, stable APIs
Be careful with shared libraries - best for utilities
Design iceberg services
Implementation
DB
API
Small, stable
API
Large, complex
implementation Change
What’s hidden can
easily be changed
Avoid shared libraries containing
business logic
Shared utility libraries ✅
Shared libraries containing
business logic that changes
requires multiple services
to change in lock step ❌
Service A
Library
Service B
Library
Service …
Library
Change
Avoid shared database tables
Order
Service
Customer
Service
Database
Customer
table
Tight design-
time/runtime
coupling
Order
Service
Customer
Service
Order database
Order
table
Customer database
Customer
table
APIs
only
@crichardson
Loose runtime coupling
@crichardson
The trouble with synchronous IPC :
runtime coupling => reduced availability
Order
Service
Customer
Service
PUT /customer/id/credit
availability(createOrder) =
availability(OrderService) x
availability(CustomerService)
POST /order
😢
Order Customer
creditLimit
availableCredit
Problem:
Developers treat services as if they are programming
language-level modules (that communicate via HTTP)
Consequences:
IPC is relatively expensive high latency
Synchronous communication temporal coupling
reduced availability - serviceAvailabilitynumber of services
Anti-pattern: Distribution is
free
@crichardson
Self-contained service:
Can handle a synchronous
request without waiting for a
response from another service
https://microservices.io/patterns/decomposition/self-contained-service.html
@crichardson
Order
Service
Order Management
Customer Management
Improving availability: replace
service with module
POST /order
Order
Customer
creditLimit
availableCredit
availability(createOrder) =
availability(OrderService)
More available 😄
Larger service/
team 😢
Response =
validation
outcome 😄
@crichardson
messaging system
Use asynchronous messaging
Sender Recipient
Message
Channel
Payload
Header
http://bit.ly/books-eip
Channel types:
• Point-to-point
• Publish/Subscribe
@crichardson
Improving availability: sagas
Order
Service
Customer
Service
availability(createOrder) =
availability(OrderService)
POST /order
Credit Reserved
More available 😄
Complexity of sagas 😢
Order created
Response =! Validation
outcome 😢
Order events
Customer events
https://microservices.io/patterns/data/saga.html
@crichardson
Improving availability: CQRS
Order
Service Customer
Service
availability(createOrder) =
availability(OrderService)
POST /order
Customer
Created
More available 😄
Complex/Costly 😢
Response =
validation
outcome 😄
Customer
creditLimit
availableCredit
Replicated
Owned
Customer
creditLimit
availableCredit
Credit Limit
Changed
https://microservices.io/patterns/data/cqrs.html
@crichardson
Summary:
@crichardson
Summary: What is the microservice
architecture?
The microservice architecture is
an architectural style
that structures an application as a
set of services that are
• Highly maintainable and testable
• Minimal lead time
• High deployment frequency
• Loosely coupled
• Independently deployable
• Implements a business capability
• Owned/developed/tested/deployed by a small team
@crichardson
Summary: 	Why should you care
about the microservice architecture?
Process: Lean + DevOps/Continuous Delivery & Deployment
Architecture:
microservices
Testability
Deployability
Modularity
Modularity
Evolvability
Maintainability
Availability
Deliver changes to
long-lived
applications rapidly,
frequently and
reliably
Organization: Small, long-
lived, product-centric,
autonomous teams
Organizational
Performance
@crichardson
@crichardson chris@chrisrichardson.net
https://bit.ly/tdc-2020-msa
Questions?

More Related Content

PDF
#DevNexus202 Decompose your monolith
PDF
Microservices - an architecture that enables DevOps (T Systems DevOps day)
PDF
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
PDF
Decompose your monolith: Six principles for refactoring a monolith to microse...
PDF
YOW2018 - Events and Commands: Developing Asynchronous Microservices
PDF
A pattern language for microservices - June 2021
PDF
SVCC Microservices: Decomposing Applications for Testability and Deployability
PDF
Code Freeze 2018: There is no such thing as a microservice!
#DevNexus202 Decompose your monolith
Microservices - an architecture that enables DevOps (T Systems DevOps day)
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
Decompose your monolith: Six principles for refactoring a monolith to microse...
YOW2018 - Events and Commands: Developing Asynchronous Microservices
A pattern language for microservices - June 2021
SVCC Microservices: Decomposing Applications for Testability and Deployability
Code Freeze 2018: There is no such thing as a microservice!

What's hot (20)

PDF
Polyglot persistence for Java developers: time to move out of the relational ...
PDF
Developing event-driven microservices with event sourcing and CQRS (Shanghai)
PDF
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
PDF
Solving distributed data management problems in a microservice architecture (...
PDF
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
PDF
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
PDF
SVCC Developing Asynchronous, Message-Driven Microservices
PDF
Events on the outside, on the inside and at the core - Chris Richardson
PDF
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
PDF
Saturn2017: No such thing as a microservice!
PDF
Designing loosely coupled services
PDF
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
PDF
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
PDF
Oracle Code Sydney - There is no such thing as a microservice!
PDF
OReilly SACON2018 - Events on the outside, on the inside, and at the core
PDF
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
PDF
Mucon: Not Just Events: Developing Asynchronous Microservices
PDF
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
PDF
Developing event-driven microservices with event sourcing and CQRS (london Ja...
PDF
Events to the rescue: solving distributed data problems in a microservice arc...
Polyglot persistence for Java developers: time to move out of the relational ...
Developing event-driven microservices with event sourcing and CQRS (Shanghai)
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Solving distributed data management problems in a microservice architecture (...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
SVCC Developing Asynchronous, Message-Driven Microservices
Events on the outside, on the inside and at the core - Chris Richardson
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Saturn2017: No such thing as a microservice!
Designing loosely coupled services
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
Oracle Code Sydney - There is no such thing as a microservice!
OReilly SACON2018 - Events on the outside, on the inside, and at the core
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
Mucon: Not Just Events: Developing Asynchronous Microservices
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Events to the rescue: solving distributed data problems in a microservice arc...
Ad

Similar to TDC2020 - The microservice architecture: enabling rapid, reliable, frequent and sustainable development (20)

PDF
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
PDF
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
PDF
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
PDF
Overcoming Ongoing Digital Transformational Challenges with a Microservices A...
PPTX
Minimum Viable Architecture - Good Enough is Good Enough
PDF
Microservices Architecture
PPTX
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
PPTX
MICROSERVICES ARCHITECTURE unit -2.pptx
PPTX
Microservice intro
PPTX
Software Architectures, Week 3 - Microservice-based Architectures
PDF
Evolving your Architecture to MicroServices
PDF
MicroServices, yet another architectural style?
PPTX
Iot cloud service v2.0
PDF
There is no such thing as a microservice! (oracle code nyc)
PDF
Microservicessai 141024145932-conversion-gate01 (1)
PPTX
Architecting for speed: How agile innovators accelerate growth through micros...
PPTX
Architecting for speed - how agile innovators accelerate growth through micro...
PDF
Term paper 2073131
PDF
20141210 - Microservice Container
PDF
Microservice architecture
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Overcoming Ongoing Digital Transformational Challenges with a Microservices A...
Minimum Viable Architecture - Good Enough is Good Enough
Microservices Architecture
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
MICROSERVICES ARCHITECTURE unit -2.pptx
Microservice intro
Software Architectures, Week 3 - Microservice-based Architectures
Evolving your Architecture to MicroServices
MicroServices, yet another architectural style?
Iot cloud service v2.0
There is no such thing as a microservice! (oracle code nyc)
Microservicessai 141024145932-conversion-gate01 (1)
Architecting for speed: How agile innovators accelerate growth through micros...
Architecting for speed - how agile innovators accelerate growth through micro...
Term paper 2073131
20141210 - Microservice Container
Microservice architecture
Ad

More from Chris Richardson (12)

PDF
The microservice architecture: what, why, when and how?
PDF
More the merrier: a microservices anti-pattern
PDF
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
PDF
Dark Energy, Dark Matter and the Microservices Patterns?!
PDF
Dark energy, dark matter and microservice architecture collaboration patterns
PDF
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
PDF
Using patterns and pattern languages to make better architectural decisions
PDF
Overview of the Eventuate Tram Customers and Orders application
PDF
An overview of the Eventuate Platform
PDF
Decompose your monolith: strategies for migrating to microservices (Tide)
PDF
MicroCPH - Managing data consistency in a microservice architecture using Sagas
PDF
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
The microservice architecture: what, why, when and how?
More the merrier: a microservices anti-pattern
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark energy, dark matter and microservice architecture collaboration patterns
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Using patterns and pattern languages to make better architectural decisions
Overview of the Eventuate Tram Customers and Orders application
An overview of the Eventuate Platform
Decompose your monolith: strategies for migrating to microservices (Tide)
MicroCPH - Managing data consistency in a microservice architecture using Sagas
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
L1 - Introduction to python Backend.pptx
PPTX
history of c programming in notes for students .pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
top salesforce developer skills in 2025.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
AI in Product Development-omnex systems
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
How to Migrate SBCGlobal Email to Yahoo Easily
VVF-Customer-Presentation2025-Ver1.9.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
L1 - Introduction to python Backend.pptx
history of c programming in notes for students .pptx
CHAPTER 2 - PM Management and IT Context
Design an Analysis of Algorithms II-SECS-1021-03
top salesforce developer skills in 2025.pdf
ManageIQ - Sprint 268 Review - Slide Deck
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Odoo Companies in India – Driving Business Transformation.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
Softaken Excel to vCard Converter Software.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
How Creative Agencies Leverage Project Management Software.pdf
AI in Product Development-omnex systems
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers

TDC2020 - The microservice architecture: enabling rapid, reliable, frequent and sustainable development

  • 1. @crichardson The microservice architecture: enabling rapid, reliable, frequent and sustainable development Chris Richardson Founder of Eventuate.io Founder of the original CloudFoundry.com Author of POJOs in Action and Microservices Patterns @crichardson chris@chrisrichardson.net http://adopt.microservices.io Copyright © 2020. Chris Richardson Consulting, Inc. All rights reserved
  • 2. Presentation goal Microservice architecture: • Trends driving adoption • Essential characteristics • Benefits and drawbacks
  • 4. @crichardson For slides, more information, raffle, discounts, … Raffle: 5 ebooks + 40% discount Raffle: 2 free spots + 20% discount https://bit.ly/tdc-2020-msa
  • 5. Agenda The need to deliver software rapidly, frequently and reliably Developing long-lived applications The monolithic architecture is not an anti-pattern Overview of the microservice architecture Architecting loosely coupled services
  • 9. @crichardson Businesses must be nimble, agile, and innovate faster IT must deliver software rapidly, frequently and reliably
  • 10. @crichardson Quantifying rapid, frequent and reliable delivery Velocity Lead time - time from commit to deploy Deployment frequency - deploys per developer per day Reliability Mean time to recover from a deployment failure (MTTR) Change failure rate - % of deployments that cause an outage Key Lean* principles * Inspired by the Toyota Production System
  • 11. @crichardson Modern software development: rapid and reliable Faster More reliable
  • 12. The research shows… Software Delivery Performance Lead time, Deployment frequency, Mean Time To Restore, Change Fail % Organizational Performance Profitability, Productivity, Market share $ Impacts
  • 13. @crichardson Process: Lean/DevOps/Continuous Delivery & Deployment Organization: Small, long- lived, product-centric, autonomous teams Architecture: ??? Deliver changes to long-lived applications rapidly, frequently and reliably
  • 14. What is DevOps? Set of practices where developers, testers (dev) and IT operations (ops) collaborate and communicate to deliver software rapidly, frequently, and reliably http://itrevolution.com/devops-handbook
  • 15. Key DevOps practices ApplicationAutomated deployment pipeline Repository Production Frequent Commits Code and configuration Reliable and frequent deployments Fast and reliable automated tests
  • 16. DevOps practices: hypothesis driven development and A/B testing A requirement is a hypothesis that’s often wrong Validate by quickly getting feedback for real users Eric Ries. The Lean Startup (p. 75). increase in revenue = frequency of experiments x idea success rate x idea impact
  • 17. High performance organization: team of teams 5-9 people - promotes trust Long-lived - enables trust and high performance Cross functional/autonomous - eliminates time consuming hand-offs Owns suitably sized software “component” Promotes long-term sustainable development Prevents cognitive overload
  • 18. @crichardson Case study: amazon.com Amazon reorganized itself into long- lived, product-centric, loosely coupled, autonomous, two pizza teams that developed microservices. By 2015, they were deploying 130,000 times/day! This ability to delivery software rapidly frequently and reliably enables them to dominate retail as well as cloud computing. Rossman, John. Think Like Amazon: 50 1/2 Ideas to Become a Digital Leader DevOps Handbook, Kim et all
  • 19. Development in high performing organizations “Complete their work without communicating and coordinating with people outside their team” “Make large-scale changes to the design of their system without depending on other teams to make changes in their systems or creating significant work for other teams” “We can do most of our testing without requiring an integrated environment.” “We can and do deploy or release our application independently of other applications/services it depends on.”
  • 20. Required architectural quality attributes (a.k.a. -ilities) “Complete their work without communicating and coordinating with people outside their team” “Make large-scale changes to the design of their system without depending on other teams to make changes in their systems or creating significant work for other teams” “We can do most of our testing without requiring an integrated environment.” “We can and do deploy or release our application independently of other applications/services it depends on.” Loosely coupled (Conway’s law) Modular Testable Deployable API encapsulates design decisions
  • 21. Agenda The need to deliver software rapidly, frequently and reliably Developing long-lived applications The monolithic architecture is not an anti-pattern Overview of the microservice architecture Architecting loosely coupled services
  • 22. @crichardson Successful applications live for a long time, e.g. 10 years, 20 years, … BUT Technology changes: Programming languages, frameworks, … Time Technology A Technology B V1 V2 V3 V… Importance The importance of a technology changes over time
  • 23. @crichardson An organization’s technology must be aligned with the marketplace Murer, Stephan,Bruno Bonati Consulting, Bruno Bonati. Managed Evolution: A Strategy for Very Large Information Systems Relying on technology that is unimportant to market Not using technology that is important to the market
  • 24. @crichardson Must be able to upgrade the technology stack
  • 25. @crichardson Required architectural quality attributes (a.k.a. -ilities) Long-lived applications Modularity Incrementally upgrade the technology stack API encapsulates the technology stack
  • 26. @crichardson Architecting for rapid, frequent, reliable and sustainable development Loosely coupled (Conway’s law) Modular Testable Deployable API encapsulates • design decisions • technology stack
  • 27. Agenda The need to deliver software rapidly, frequently and reliably Developing long-lived applications The monolithic architecture is not an anti-pattern Overview of the microservice architecture Architecting loosely coupled services
  • 28. @crichardson Tomcat/App. Server Food To Go: Monolithic architecture Browser/ Client WAR/EAR MySQL Database Delivery management Order Management Kitchen Management Web UI Restaurant Management HTML REST/JSON The application The monolithic architecture is an architectural style that structures the application as a single executable/ deployable component
  • 29. -ilities of small monoliths Testability Deployability Maintainability Modularity Evolvability ✅ ✅ ✅ ✅ ✅
  • 30. @crichardson Rapid, frequent and reliable delivery eventually becomes impossible Time Maintainability Testability Deployability Modularity Evolvability Size/ Complexity -ilities required to be competitive Risk of disruption
  • 31. @crichardson MyApp.war Modular monolith = single classpath No guarantee of composability Orders.jar Customers.jar Orders.jar Customers.jar Test independently Still work? + dependencies + dependencies
  • 32. @crichardson Technology stack becomes increasingly obsolete BUT a rewrite is not feasible
  • 33. @crichardson Many decisions are global and can’t be changed incrementally Don’t change Programming language Application framework Library and framework version …
  • 34. @crichardson Monolithic hell By John Martin, Public Domain, https://commons.wikimedia.org/w/index.php?curid=3353638
  • 35. Agenda The need to deliver software rapidly, frequently and reliably Developing long-lived applications The monolithic architecture is not an anti-pattern Overview of the microservice architecture Architecting loosely coupled services
  • 36. The microservice architecture is an architectural style that structures an application as a set of services that are Highly maintainable and testable Minimal lead time Loosely coupled Independently deployable Implements a business capability Owned/developed/tested/deployed by a small team
  • 37. @crichardson Food to Go: Microservice architecture Browser Mobile Application Content Router API Gateway Order Service Restaurant Service Delivery Service … Service Order Database Restaurant Database Delivery Database … Database HTTP /HTML REST REST Browse & Search WebApp Restaurant Detail WebApp …. JavaScript Message Broker
  • 38. @crichardson API The structure of a service Operations Event Publisher Commands Queries Synchronous REST/gRPC Asynchronous Messaging Events Event Subscriber API Client Invokes Operations Events Service Database Private!
  • 39. @crichardson Service architecture “mirrors” the business FTGO business Kitchen Service Delivery Service Order Taking Kitchen Delivery Accounting …. …. Service Order Service Accounting Service Maps to Maps to Maps to Maps to Maps to Area of the business, a.k.a. Subdomain or Business Capability
  • 40. @crichardson Goal is team autonomy one service per team Service https://microservices.io/patterns/decomposition/service-per-team.html Owned by a team Owns one service Not to exceed cognitive capacity of team
  • 41. @crichardson Split service only to solve a problem Team become two large split team, split service Deployment pipeline takes too long split into two services that can be developed/tested independently Polyglot development: e.g. Python ML model in a Java application Split for fault tolerance - isolate HA parts of the application …
  • 42. Benefits of microservices Improved maintainability Each service fits in the heads of the development team = Easier to understand and change Preserves modularity since a service is a well-defined module with an impermeable API Improved testability: Each service is easier to test and faster to test Improved evolvability - evolve each service’s technology stack independently Improved deployability Each service can be deployed independently Easier to scale application Each service can be scaled independently Improves availability/fault isolation and latency Critical services are isolated from less critical services: separate processes and infrastructure Separate deployments reduces risk of change based failure
  • 43. @crichardson Process: Lean + DevOps/Continuous Delivery & Deployment Architecture: microservices Testability Deployability Modularity Deliver changes to long-lived applications rapidly, frequently and reliably Organization: Small, long- lived, product-centric, autonomous teams
  • 44. @crichardson Loosely coupled teams and services Order Service Orders Team Automated deployment pipeline Source code repository Kitchen Service Kitchen Team Automated deployment pipeline Source code repository Delivery Service Delivery Team Automated deployment pipeline Source code repository Working independently > 80% of the time
  • 45. @crichardson Microservices experiment safely and evolve the technology stack Java Java Java Java Java Golang “GoLang is cool!” Java Java Java “Kotlin is better!” Java Kotlin
  • 46. @crichardson Drawbacks of microservices Complexity Development: IPC, partial failure, distributed data Testing: Integration, end to end, … Deployment …
  • 47. @crichardson …Drawbacks of microservices Correctly identifying service boundaries and avoiding the distributed monolith anti-pattern Refactoring a monolithic application to a microservice architecture
  • 48. @crichardson If you are developing a long-lived, large/complex application AND you need to deliver it rapidly, frequently and reliably THEN the Microservice Architecture is often a good choice
  • 49. Agenda The need to deliver software rapidly, frequently and reliably Developing long-lived applications The monolithic architecture is not an anti-pattern Overview of the microservice architecture Architecting loosely coupled services
  • 50. @crichardson About Conway’s Law “organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations.” http://melconway.com/Home/Home.html Loosely coupled teams require a loosely coupled architecture
  • 51. @crichardson Loose coupling is essential Services collaborate, e.g. Order Service must reserve customer credit Coupling is inevitable BUT Services must be loosely coupled API Order Service Customer Service reserveCredit()
  • 52. Runtime coupling Order Service cannot respond to a synchronous request (e.g. HTTP POST) until Customer Service responds VS Design time coupling Change Customer Service change Order Service
  • 53. @crichardson Loose coupling - design time Design-time coupling requires coordination between teams: e.g. Meetings to discuss API changes Slows down development Essential to minimize design time coupling: Use well-designed, stable APIs Be careful with shared libraries - best for utilities
  • 54. Design iceberg services Implementation DB API Small, stable API Large, complex implementation Change What’s hidden can easily be changed
  • 55. Avoid shared libraries containing business logic Shared utility libraries ✅ Shared libraries containing business logic that changes requires multiple services to change in lock step ❌ Service A Library Service B Library Service … Library Change
  • 56. Avoid shared database tables Order Service Customer Service Database Customer table Tight design- time/runtime coupling Order Service Customer Service Order database Order table Customer database Customer table APIs only
  • 58. @crichardson The trouble with synchronous IPC : runtime coupling => reduced availability Order Service Customer Service PUT /customer/id/credit availability(createOrder) = availability(OrderService) x availability(CustomerService) POST /order 😢 Order Customer creditLimit availableCredit
  • 59. Problem: Developers treat services as if they are programming language-level modules (that communicate via HTTP) Consequences: IPC is relatively expensive high latency Synchronous communication temporal coupling reduced availability - serviceAvailabilitynumber of services Anti-pattern: Distribution is free
  • 60. @crichardson Self-contained service: Can handle a synchronous request without waiting for a response from another service https://microservices.io/patterns/decomposition/self-contained-service.html
  • 61. @crichardson Order Service Order Management Customer Management Improving availability: replace service with module POST /order Order Customer creditLimit availableCredit availability(createOrder) = availability(OrderService) More available 😄 Larger service/ team 😢 Response = validation outcome 😄
  • 62. @crichardson messaging system Use asynchronous messaging Sender Recipient Message Channel Payload Header http://bit.ly/books-eip Channel types: • Point-to-point • Publish/Subscribe
  • 63. @crichardson Improving availability: sagas Order Service Customer Service availability(createOrder) = availability(OrderService) POST /order Credit Reserved More available 😄 Complexity of sagas 😢 Order created Response =! Validation outcome 😢 Order events Customer events https://microservices.io/patterns/data/saga.html
  • 64. @crichardson Improving availability: CQRS Order Service Customer Service availability(createOrder) = availability(OrderService) POST /order Customer Created More available 😄 Complex/Costly 😢 Response = validation outcome 😄 Customer creditLimit availableCredit Replicated Owned Customer creditLimit availableCredit Credit Limit Changed https://microservices.io/patterns/data/cqrs.html
  • 66. @crichardson Summary: What is the microservice architecture? The microservice architecture is an architectural style that structures an application as a set of services that are • Highly maintainable and testable • Minimal lead time • High deployment frequency • Loosely coupled • Independently deployable • Implements a business capability • Owned/developed/tested/deployed by a small team
  • 67. @crichardson Summary: Why should you care about the microservice architecture? Process: Lean + DevOps/Continuous Delivery & Deployment Architecture: microservices Testability Deployability Modularity Modularity Evolvability Maintainability Availability Deliver changes to long-lived applications rapidly, frequently and reliably Organization: Small, long- lived, product-centric, autonomous teams Organizational Performance