SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
OptionFactory
Surviving Microservices
Challenges and risks during adoption, and what to look for beyond
Francesco Degrassi
Enthusiastic yet pragmatic Lean Software Developer.
Uppish and cynical nihilist from time to time.
OptionFactory
■ Lean Software Development
● Continuous Delivery - High availability - Scale-up
● Security sensitive & high uncertainty domains
■ Software Architecture Consultancy
● Technical Due Diligence
So you adopted microservices...
● After several years, microservices have gone mainstream now
● All adopters are paying the price in terms of
○ training requirements
○ solution complexity
○ operational costs
● Few are reaping the promised benefits
What are the pain points?
Implementing new
features takes
forever…
Lower velocity
We’re receiving a lot
of complaints for lost
documents
High defects rate
The import process
takes hours!
Performance issues
It is really hard to
understand what is
going on.
Lack of visibility
Lack of benefits Side effects
What are microservices anyway?
“[...] an approach to developing a single application as a suite of small services, each running in
its own process and communicating with lightweight mechanisms, often an HTTP resource API.
These services are built around business capabilities and independently deployable by fully
automated deployment machinery. There is a bare minimum of centralized management of
these services, which may be written in different programming languages and use different data
storage technologies.
-- James Lewis and Martin Fowler (2014)
What are microservices anyway?
● Modeling
○ Components organized around Business Capabilities
○ Evolutionary Design
● Organization
○ Products not Projects
○ Infrastructure Automation
● Technical
○ Componentization via Services
○ Smart endpoints and dumb pipes
○ Decentralized Governance
○ Decentralized Data Management
○ Design for failure
What is the trade-off?
How microservices should help:
● Enabling Technology diversity (adopt
the best tool for each job)
● Independent component scaling
● Enforced module boundaries
● Scale-up development by decoupling
teams
The price:
● Managing all the technology diversity
● Distribution: new failure modes require
handling
● Eventual consistency
● Operational Complexity
● High training requirements
● High impact of design mistakes
(becoming architectural ones)
First issue:
(Lack of) Solution fit
(Lack of) solution fit (1)
Most organizations don’t have such
simple business logic,
huge scalability requirements,
risk appetite
of Netflix, Twitter, Instagram.
(Lack of) solution fit (2)
Netflix (Most of) us Microservices impact
Number & complexity of operations Few, simple Many, complex
Emerging requirements harder to accomodate, hard to
model, refactoring difficult
Coupling of components Low High
Complexity moved in inter-service communication,
which is the hardest to monitor and inspect
Concurrent users Millions Hundreds / Thousands Unnecessary complexity
Need to scale individual components
Definitely, e.g. transcoding,
streaming vs browsing catalog,
subscription
Possibly (needs hard data) Unnecessary complexity
Teams, developers Tens, hundreds Few, dozens No advantages
Ops resources Abundant Low to average Inability to cope with increased complexity
Team skill and training budget Very high Average
Risk of implementation mistakes, inability to spot
potential issues timely
Risk appetite
Higher (seeks technical competitive
advantage)
Lower Higher risk
Second issue:
Implementation mistakes
● Failure to address organizational
change
○ Ops and security requirements
not considered in development
○ Lack of visibility of ops team on
mapping of business processes
over the entire platform
Implementation mistakes (1)
● Modularization:
○ services should map to bounded contexts, but often are too fine-grained
○ services should expose transactional business operations
● API granularity: network calls are expensive; too fine-grained APIs are unsustainable
○ wrong perception of remoting cost, possibly due to it not being hidden by middleware
○ mistakes in modularization can make services too interdependent
○ failure to adapt when splitting a service out
Implementation mistakes (2)
● Encapsulation: data should only be exposed through the service API
○ databases shared by multiple services are a huge red flag
● Coupling: services, in general, should not share code with one another
○ deployment independendence depends on it
○ shared model libraries are a common mistake, indicative of an erroneous
interpretation of microservices
● Complexity moving into interactions:
○ implicit state in asynchronous messaging
○ hardest thing to inspect and monitor
Implementation mistakes (3)
Third issue:
Failure to address impact on NFRs
● Operability
○ Monitoring infrastructure
○ Infrastructure and configuration management
○ Deployment automation
○ Service Discovery
○ Tracing of calls through multiple systems
○ Logging context and centralized infrastructure
Failure to address impact on NFRs
● Correctness, Performance, Scalability:
○ Skillset, Training, on e.g.:
■ DDD
■ Distributed systems
■ CI / CD, infrastructure management
■ Tooling
○ Development environment
● Availability, Resilience, Integrability, Compatibility
○ API versioning
○ Cater for cascading failure scenarios
○ Compound availability
Failure to address impact on NFRs
● Data integrity, Retention, Durability, Disaster recovery
○ Backups and restores of individual services
● Security
○ Authentication, Access control, Accounting throughout services
○ Integrity and confidentiality of data in transit
● Testability
○ Automation, Infrastructure provisioning
Failure to address impact on NFRs
Are there no alternatives?
Not at all.
Many tenets of microservices can be applied to any other architectures too:
● Teams and components organized around Business Capabilities is (uncommon) common
sense
● Evolutionary Design, Cross-functional teams are not specific of microservices at all
● Infrastructure Automation, CI & CD are useful even with a single deployable
A false dichotomy
Storefront
WebApp
Account
Service
Inventory
Service
Shipping
Service
Order
Service
UI
Business
logic
Data access
layer
Storefront
UI
Account
Service
Inventory
Service
Shipping
Service
Order
Service
Accounts
Orders
ShipmentsInventory
No exclusive deal here...
Benefit Microservices Alternative
Strong module boundaries Enforced by architecture (which is
hard to change by definition)
Responsibility of the team
(empowerment)
If you need to enforce compliance, you might not afford microservices.
Why would you think the same team that built the big ball of mud can design
a functional set of microservices?
Independent deployment and scaling Possible (but not guaranteed) Possible (opportunistic, by extracting
a service)
Technology diversity Unconstrained Constrained, but available
Scale up development by decoupling
teams
By service By component / library / service
What now?
● Seek external guidance
○ Assess the state of the project
○ Without preconception
○ Using hard data
● Plan for remediation
○ Addressing NFRs can make the situation manageable short-term
● Avoid sunken cost fallacy
○ Architectural changes, by definition, are hard and costly, but...
○ there is no better time to change course than right now
● Strive for simplicity
○ What is the simplest thing that could possibly work?
○ Not “is it too complex?” but “is there an actual need for any added complexity?”
● Do not buy into the hype:
○ there’s always a trade-off, make sure it is known and explicit
○ validate one choice at a time
● Make sure agency comes with responsibility
○ beware seagull engineering and CV padding
What next time?
Human beings, who are almost unique in
having the ability to learn from the
experience of others, are also remarkable
for their apparent disinclination to do so.
Douglas Adams
“
”
I hope you found this useful
Get in touch
https://www.optionfactory.net
Thanks for your time!
@EdMcBane
fdegrassi@gmail.com
francesco.degrassi@optionfactory.net
http://www.optionfactory.net

Contenu connexe

Similaire à Surviving microservices

Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application ModernisationAjay Kumar Uppal
 
Comparative Analysis of Software Architectures.pptx
Comparative Analysis of Software Architectures.pptxComparative Analysis of Software Architectures.pptx
Comparative Analysis of Software Architectures.pptxssuserecd44f
 
Service-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfService-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfchanhluc2112
 
An eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functionsAn eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functionsChristian Posta
 
Things I wish I'd known before I started with Microservices - Software Circus...
Things I wish I'd known before I started with Microservices - Software Circus...Things I wish I'd known before I started with Microservices - Software Circus...
Things I wish I'd known before I started with Microservices - Software Circus...Steve Judd
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxPINGXIONG3
 
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?Phuong Mai Nguyen
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft MicroservicesChase Aucoin
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 
Ato Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoAto Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoSystango
 
#ATAGTR2020 Presentation - Microservices – Explored
#ATAGTR2020 Presentation - Microservices – Explored#ATAGTR2020 Presentation - Microservices – Explored
#ATAGTR2020 Presentation - Microservices – ExploredAgile Testing Alliance
 
WTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, DatawireWTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, DatawireAmbassador Labs
 
Azure Application Architecture Guide
Azure Application Architecture GuideAzure Application Architecture Guide
Azure Application Architecture GuideMasashi Narumoto
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.itGiuseppe Lavagetto
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCapgemini
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesAngelos Kapsimanis
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreSimform
 

Similaire à Surviving microservices (20)

Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application Modernisation
 
Comparative Analysis of Software Architectures.pptx
Comparative Analysis of Software Architectures.pptxComparative Analysis of Software Architectures.pptx
Comparative Analysis of Software Architectures.pptx
 
Service-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdfService-Mesh-Presentation.pdf
Service-Mesh-Presentation.pdf
 
Microservice
MicroserviceMicroservice
Microservice
 
An eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functionsAn eventful tour from enterprise integration to serverless and functions
An eventful tour from enterprise integration to serverless and functions
 
Things I wish I'd known before I started with Microservices - Software Circus...
Things I wish I'd known before I started with Microservices - Software Circus...Things I wish I'd known before I started with Microservices - Software Circus...
Things I wish I'd known before I started with Microservices - Software Circus...
 
Do I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptxDo I Need A Service Mesh.pptx
Do I Need A Service Mesh.pptx
 
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft Microservices
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Ato Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by SystangoAto Z of Microservices Architecture by Systango
Ato Z of Microservices Architecture by Systango
 
#ATAGTR2020 Presentation - Microservices – Explored
#ATAGTR2020 Presentation - Microservices – Explored#ATAGTR2020 Presentation - Microservices – Explored
#ATAGTR2020 Presentation - Microservices – Explored
 
WTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, DatawireWTF is a Microservice - Rafael Schloming, Datawire
WTF is a Microservice - Rafael Schloming, Datawire
 
Azure Application Architecture Guide
Azure Application Architecture GuideAzure Application Architecture Guide
Azure Application Architecture Guide
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
 
CWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der walCWIN17 Utrecht / cg u services - frank van der wal
CWIN17 Utrecht / cg u services - frank van der wal
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based Architectures
 
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and MoreA Guide on What Are Microservices: Pros, Cons, Use Cases, and More
A Guide on What Are Microservices: Pros, Cons, Use Cases, and More
 

Plus de Francesco Degrassi

No silver bullet - Diventare agili non è banale, nè scontato
No silver bullet - Diventare agili non è banale, nè scontatoNo silver bullet - Diventare agili non è banale, nè scontato
No silver bullet - Diventare agili non è banale, nè scontatoFrancesco Degrassi
 
7 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM20157 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM2015Francesco Degrassi
 
Fifty shades of fail - redefining success and failure from a lean perspective
Fifty shades of fail - redefining success and failure from a lean perspectiveFifty shades of fail - redefining success and failure from a lean perspective
Fifty shades of fail - redefining success and failure from a lean perspectiveFrancesco Degrassi
 
Building software that matters (Optional Conf 2014)
Building software that matters (Optional Conf 2014)Building software that matters (Optional Conf 2014)
Building software that matters (Optional Conf 2014)Francesco Degrassi
 
Building software that matters (Agilia 2014)
Building software that matters (Agilia 2014)Building software that matters (Agilia 2014)
Building software that matters (Agilia 2014)Francesco Degrassi
 
Building software that matters (BetterSoftware 2013)
Building software that matters (BetterSoftware 2013)Building software that matters (BetterSoftware 2013)
Building software that matters (BetterSoftware 2013)Francesco Degrassi
 

Plus de Francesco Degrassi (7)

No silver bullet - Diventare agili non è banale, nè scontato
No silver bullet - Diventare agili non è banale, nè scontatoNo silver bullet - Diventare agili non è banale, nè scontato
No silver bullet - Diventare agili non è banale, nè scontato
 
7 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM20157 lessons learned building high availability / performance systems - CM2015
7 lessons learned building high availability / performance systems - CM2015
 
Never gonna give you up
Never gonna give you upNever gonna give you up
Never gonna give you up
 
Fifty shades of fail - redefining success and failure from a lean perspective
Fifty shades of fail - redefining success and failure from a lean perspectiveFifty shades of fail - redefining success and failure from a lean perspective
Fifty shades of fail - redefining success and failure from a lean perspective
 
Building software that matters (Optional Conf 2014)
Building software that matters (Optional Conf 2014)Building software that matters (Optional Conf 2014)
Building software that matters (Optional Conf 2014)
 
Building software that matters (Agilia 2014)
Building software that matters (Agilia 2014)Building software that matters (Agilia 2014)
Building software that matters (Agilia 2014)
 
Building software that matters (BetterSoftware 2013)
Building software that matters (BetterSoftware 2013)Building software that matters (BetterSoftware 2013)
Building software that matters (BetterSoftware 2013)
 

Dernier

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Dernier (20)

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Surviving microservices

  • 1. OptionFactory Surviving Microservices Challenges and risks during adoption, and what to look for beyond
  • 2. Francesco Degrassi Enthusiastic yet pragmatic Lean Software Developer. Uppish and cynical nihilist from time to time.
  • 3. OptionFactory ■ Lean Software Development ● Continuous Delivery - High availability - Scale-up ● Security sensitive & high uncertainty domains ■ Software Architecture Consultancy ● Technical Due Diligence
  • 4. So you adopted microservices... ● After several years, microservices have gone mainstream now ● All adopters are paying the price in terms of ○ training requirements ○ solution complexity ○ operational costs ● Few are reaping the promised benefits
  • 5. What are the pain points? Implementing new features takes forever… Lower velocity We’re receiving a lot of complaints for lost documents High defects rate The import process takes hours! Performance issues It is really hard to understand what is going on. Lack of visibility Lack of benefits Side effects
  • 6. What are microservices anyway? “[...] an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. -- James Lewis and Martin Fowler (2014)
  • 7. What are microservices anyway? ● Modeling ○ Components organized around Business Capabilities ○ Evolutionary Design ● Organization ○ Products not Projects ○ Infrastructure Automation ● Technical ○ Componentization via Services ○ Smart endpoints and dumb pipes ○ Decentralized Governance ○ Decentralized Data Management ○ Design for failure
  • 8. What is the trade-off? How microservices should help: ● Enabling Technology diversity (adopt the best tool for each job) ● Independent component scaling ● Enforced module boundaries ● Scale-up development by decoupling teams The price: ● Managing all the technology diversity ● Distribution: new failure modes require handling ● Eventual consistency ● Operational Complexity ● High training requirements ● High impact of design mistakes (becoming architectural ones)
  • 9. First issue: (Lack of) Solution fit
  • 10. (Lack of) solution fit (1) Most organizations don’t have such simple business logic, huge scalability requirements, risk appetite of Netflix, Twitter, Instagram.
  • 11. (Lack of) solution fit (2) Netflix (Most of) us Microservices impact Number & complexity of operations Few, simple Many, complex Emerging requirements harder to accomodate, hard to model, refactoring difficult Coupling of components Low High Complexity moved in inter-service communication, which is the hardest to monitor and inspect Concurrent users Millions Hundreds / Thousands Unnecessary complexity Need to scale individual components Definitely, e.g. transcoding, streaming vs browsing catalog, subscription Possibly (needs hard data) Unnecessary complexity Teams, developers Tens, hundreds Few, dozens No advantages Ops resources Abundant Low to average Inability to cope with increased complexity Team skill and training budget Very high Average Risk of implementation mistakes, inability to spot potential issues timely Risk appetite Higher (seeks technical competitive advantage) Lower Higher risk
  • 13. ● Failure to address organizational change ○ Ops and security requirements not considered in development ○ Lack of visibility of ops team on mapping of business processes over the entire platform Implementation mistakes (1)
  • 14. ● Modularization: ○ services should map to bounded contexts, but often are too fine-grained ○ services should expose transactional business operations ● API granularity: network calls are expensive; too fine-grained APIs are unsustainable ○ wrong perception of remoting cost, possibly due to it not being hidden by middleware ○ mistakes in modularization can make services too interdependent ○ failure to adapt when splitting a service out Implementation mistakes (2)
  • 15. ● Encapsulation: data should only be exposed through the service API ○ databases shared by multiple services are a huge red flag ● Coupling: services, in general, should not share code with one another ○ deployment independendence depends on it ○ shared model libraries are a common mistake, indicative of an erroneous interpretation of microservices ● Complexity moving into interactions: ○ implicit state in asynchronous messaging ○ hardest thing to inspect and monitor Implementation mistakes (3)
  • 16. Third issue: Failure to address impact on NFRs
  • 17. ● Operability ○ Monitoring infrastructure ○ Infrastructure and configuration management ○ Deployment automation ○ Service Discovery ○ Tracing of calls through multiple systems ○ Logging context and centralized infrastructure Failure to address impact on NFRs
  • 18. ● Correctness, Performance, Scalability: ○ Skillset, Training, on e.g.: ■ DDD ■ Distributed systems ■ CI / CD, infrastructure management ■ Tooling ○ Development environment ● Availability, Resilience, Integrability, Compatibility ○ API versioning ○ Cater for cascading failure scenarios ○ Compound availability Failure to address impact on NFRs
  • 19. ● Data integrity, Retention, Durability, Disaster recovery ○ Backups and restores of individual services ● Security ○ Authentication, Access control, Accounting throughout services ○ Integrity and confidentiality of data in transit ● Testability ○ Automation, Infrastructure provisioning Failure to address impact on NFRs
  • 20. Are there no alternatives? Not at all. Many tenets of microservices can be applied to any other architectures too: ● Teams and components organized around Business Capabilities is (uncommon) common sense ● Evolutionary Design, Cross-functional teams are not specific of microservices at all ● Infrastructure Automation, CI & CD are useful even with a single deployable
  • 21. A false dichotomy Storefront WebApp Account Service Inventory Service Shipping Service Order Service UI Business logic Data access layer Storefront UI Account Service Inventory Service Shipping Service Order Service Accounts Orders ShipmentsInventory
  • 22. No exclusive deal here... Benefit Microservices Alternative Strong module boundaries Enforced by architecture (which is hard to change by definition) Responsibility of the team (empowerment) If you need to enforce compliance, you might not afford microservices. Why would you think the same team that built the big ball of mud can design a functional set of microservices? Independent deployment and scaling Possible (but not guaranteed) Possible (opportunistic, by extracting a service) Technology diversity Unconstrained Constrained, but available Scale up development by decoupling teams By service By component / library / service
  • 23. What now? ● Seek external guidance ○ Assess the state of the project ○ Without preconception ○ Using hard data ● Plan for remediation ○ Addressing NFRs can make the situation manageable short-term ● Avoid sunken cost fallacy ○ Architectural changes, by definition, are hard and costly, but... ○ there is no better time to change course than right now
  • 24. ● Strive for simplicity ○ What is the simplest thing that could possibly work? ○ Not “is it too complex?” but “is there an actual need for any added complexity?” ● Do not buy into the hype: ○ there’s always a trade-off, make sure it is known and explicit ○ validate one choice at a time ● Make sure agency comes with responsibility ○ beware seagull engineering and CV padding What next time?
  • 25. Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams “ ” I hope you found this useful
  • 27. Thanks for your time! @EdMcBane fdegrassi@gmail.com francesco.degrassi@optionfactory.net http://www.optionfactory.net