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

tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
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
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 

Dernier (20)

tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
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
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

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