SlideShare a Scribd company logo
1 of 25
Download to read offline
Microservices & resilience
Maxim Shelest
Architect at PAYBACK GmbH
#architect #developer #programmer #software-
craftsman #life-long-learner #leader #agile-
practitioner
Lormem ipsum
Microservices & resilience 2
https://source.superherostuff.com/wp-content/uploads/2015/09/IEVaULq.png
• Microservice(s) is in production or will be in production soon
• Clear separated business capabilities between microservices using DD principles
• Automated continuous deployment pipeline
• DEVOPS culture
• Monitoring and alerting with detailed dashboards
About to launch a project
Microservices & resilience 3
Does “feature complete” mean
“production ready”?
?
Microservices & resilience 4
Anything that can go wrong will go
wrong.
Murphy's law
Microservices & resilience 5
Resilience
"Resilient systems provide and maintain an acceptable level
of service in face of faults (unintentional, intentional, or naturally caused)
affecting their normal operation"
Microservices & resilience 6
Lorem ipsum dolor sit
7
Do not forget resilience during estimations.
Where resilience begins?
Microservices & resilience 8
It is not only about
Microservices!
• recovery
• retry: very basic recovery mechanism
• self-healing: reinitialize components, either internally or by an external monitoring system (automatic service
restart, start service upon machine boot)
• retry budget: if the retry budget is exceeded, don’t retry; just fail the request to omit overloading (see circuit
breaker)
• exponential backoff with jitter: use randomized exponential backoff when scheduling retries
• bulkheads: partition your systems, so that you can keep a failure in one part of the system from destroying
everything
• complete parameter checking: protection from broken / malicious calls (Postel’s law: be liberal in what you
accept, and conservative in what you send)
• asynchronous communication (sender does not need to wait for receiver's response)
• event driven (event notification, event-carried state transfer, event-sourcing, CQRS)
• location transparency: sender does not need to know receiver’s concrete location
• zero downtime deployment: deployment is a bad reason for user facing unavailability
• stateless (service failover is hard with state)
Resiliency patterns (1)
Microservices & resilience 9
• relaxed temporal constraints: use a more relaxed consistency model to reduce coupling. The real world is not
ACID, it is BASE.
• idempotence
• self contained deployment: services are self-contained deployment units (compatibility between dependent
components/APIs)
• timeouts
• circuit breakers: prevent a failure from constantly recurring
• failover
• fallback/graceful degradation: The ability of maintaining functionality when portions of a system break down
• error handler: separate business logic and error handling
• fail fast: add checks in front of expensive operations, avoid foreseeable failures, also called Handshaking)
• fan out & quickest reply: send request to multiple workers - use quickest reply and discard all other responses
• bounded queues: avoids latency due to overloaded resources (use thread pools and
connection pools)
Resiliency patterns (2)
Microservices & resilience 10
• shed load: shed requests based on resource load
• observability: goal is to automatically act on detected failures
• monitoring:
• health checks,
• synthetic transactions,
• monitor metrics
• alerting/visualization
• distributed systems tracing
• log aggregation/analytics
Resiliency patterns (3)
Microservices & resilience 11
Always think about
composition of patterns
to achieve resilience
Synchronous vs Asynchronous
Microservices & resilience 12
Do not use synchronous communication! Asynchronous is better!
The event-based or event-driven approach is a de facto worldwide standard for
implementation of asynchronous communication in microservices architectures.
Synchronous vs Asynchronous
Microservices & resilience 13
Do not use synchronous communication! Asynchronous is better!
The event-based or event-driven approach is a de facto worldwide standard for
implementation of asynchronous communication in microservices architectures.
Order
Service
Shipping
Service
shipNewOrder
produce
Order
message broker
consume
Order
"But we need to query data from
other Microservice?"
?
Microservices & resilience 14
Command Query Responsibility Segregation
Microservices & resilience 15
Order
Service
Customer
Service
produce
Order
message broker
Customer
View
Service
produce
Customer
Customers
Orders
findHighValueCustomers
Customers
Orders
16
"But we still need to connect to other
systems synchronously, for example
using HTTP(S)!"
Important resilience patterns implementing HTTP client
Microservices & resilience 17
Timeouts
Retry
Retry budget
Important resilience patterns implementing HTTP client
Microservices & resilience 18
Timeouts
Retry
Retry budget
Exponential
backoff
Circuit
breaker
Important resilience patterns implementing HTTP client
Microservices & resilience 19
Timeouts
Retry
Retry budget
Exponential
backoff
Circuit
breaker
Bulkheads
Shed load
Important resilience patterns implementing HTTP client
Microservices & resilience 20
Timeouts
Retry
Retry budget
Exponential
backoff
Circuit
breaker
Bulkheads
Shed load Fail fast
Fan out &
quickest reply
Caching
Important resilience patterns implementing HTTP client
Microservices & resilience 21
Timeouts
Retry
Retry budget
Exponential
backoff
Circuit
breaker
Bulkheads
Shed load Fail fast
Fan out &
quickest reply
Caching
Observability
Monitoring
Alerting
Tracing
Log aggregation
Build for production and not for test
environment.
22
Remember TANSTAAFL:
there ain’t no such thing as a free lunch.
Do not over engineer your
system!
"Debugging is twice as hard as
writing the code in the first place.
Therefore, if you write the code as
cleverly as possible, you are, by
definition, not smart enough to
debug it."
Brian W. Kernighan
Lormem ipsum
Microservices & resilience 23
Learn from production problems!
• “The cost of failure is education (Devin Carraway)”.
• Use blameless postmortems
(https://landing.google.com/sre/book/chapters/postmortem-culture.html)
• Human error is never a root cause!
• Resilience should be a 4th management objective,
alongside Better/Faster/Cheaper.
Microservices & resilience 24
Thank you!
Questions?

More Related Content

What's hot

Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaAraf Karsh Hamid
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...Simplilearn
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017Docker, Inc.
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureNguyen Tung
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architectureThe Software House
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 
The 7 quests of resilient software design
The 7 quests of resilient software designThe 7 quests of resilient software design
The 7 quests of resilient software designUwe Friedrichsen
 
Microservices
MicroservicesMicroservices
MicroservicesSmartBear
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Chris Richardson
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetesDr Ganesh Iyer
 
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...Edureka!
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...Edureka!
 

What's hot (20)

Introducing DevOps
Introducing DevOpsIntroducing DevOps
Introducing DevOps
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Microservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and Saga
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
Patterns of resilience
Patterns of resiliencePatterns of resilience
Patterns of resilience
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
 
The 7 quests of resilient software design
The 7 quests of resilient software designThe 7 quests of resilient software design
The 7 quests of resilient software design
 
Microservices
MicroservicesMicroservices
Microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
 

Similar to Resilient microservices

Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0Vinod Wilson
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...David Currie
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Rick Hightower
 
Microservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get StartedMicroservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get StartedShailendra Chauhan
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Judy Breedlove
 
Redis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedRedis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedAllen Terleto
 
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...HostedbyConfluent
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...AFAS Software
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudMarkus Eisele
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesJim (张建军) Zhang
 
Regulated Reactive - Security Considerations for Building Reactive Systems in...
Regulated Reactive - Security Considerations for Building Reactive Systems in...Regulated Reactive - Security Considerations for Building Reactive Systems in...
Regulated Reactive - Security Considerations for Building Reactive Systems in...Ryan Hodgin
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsAraf Karsh Hamid
 
Application Darwinism - Why Most Enterprise Apps Will Evolve to the Cloud
Application Darwinism - Why Most Enterprise Apps Will Evolve to the CloudApplication Darwinism - Why Most Enterprise Apps Will Evolve to the Cloud
Application Darwinism - Why Most Enterprise Apps Will Evolve to the CloudSkytap Cloud
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSAlessandro Melchiori
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletskySergey Seletsky
 
IBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Systems UKI
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSAlessandro Melchiori
 
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
10 Key Steps for Moving from Legacy Infrastructure to the Cloud10 Key Steps for Moving from Legacy Infrastructure to the Cloud
10 Key Steps for Moving from Legacy Infrastructure to the CloudNGINX, Inc.
 

Similar to Resilient microservices (20)

Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)
 
Microservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get StartedMicroservices Tutorial for Beginners | All You Need to Get Started
Microservices Tutorial for Beginners | All You Need to Get Started
 
Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith Agile integration: Decomposing the monolith
Agile integration: Decomposing the monolith
 
Redis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedRedis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns Simplified
 
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
Redis and Kafka - Simplifying Advanced Design Patterns within Microservices A...
 
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
Alex Thissen (Xpirit) - Een verschuiving in architectuur: op weg naar microse...
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the Cloud
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
 
Regulated Reactive - Security Considerations for Building Reactive Systems in...
Regulated Reactive - Security Considerations for Building Reactive Systems in...Regulated Reactive - Security Considerations for Building Reactive Systems in...
Regulated Reactive - Security Considerations for Building Reactive Systems in...
 
Microservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration PatternsMicroservices Architecture, Monolith Migration Patterns
Microservices Architecture, Monolith Migration Patterns
 
Application Darwinism - Why Most Enterprise Apps Will Evolve to the Cloud
Application Darwinism - Why Most Enterprise Apps Will Evolve to the CloudApplication Darwinism - Why Most Enterprise Apps Will Evolve to the Cloud
Application Darwinism - Why Most Enterprise Apps Will Evolve to the Cloud
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKS
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
 
IBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ Clusters
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Developing reliable applications with .net core and AKS
Developing reliable applications with .net core and AKSDeveloping reliable applications with .net core and AKS
Developing reliable applications with .net core and AKS
 
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
10 Key Steps for Moving from Legacy Infrastructure to the Cloud10 Key Steps for Moving from Legacy Infrastructure to the Cloud
10 Key Steps for Moving from Legacy Infrastructure to the Cloud
 

Recently uploaded

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
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
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
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
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
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
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
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.
 

Recently uploaded (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
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...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
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 ...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
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
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
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 ...
 

Resilient microservices

  • 2. Maxim Shelest Architect at PAYBACK GmbH #architect #developer #programmer #software- craftsman #life-long-learner #leader #agile- practitioner Lormem ipsum Microservices & resilience 2
  • 3. https://source.superherostuff.com/wp-content/uploads/2015/09/IEVaULq.png • Microservice(s) is in production or will be in production soon • Clear separated business capabilities between microservices using DD principles • Automated continuous deployment pipeline • DEVOPS culture • Monitoring and alerting with detailed dashboards About to launch a project Microservices & resilience 3
  • 4. Does “feature complete” mean “production ready”? ? Microservices & resilience 4
  • 5. Anything that can go wrong will go wrong. Murphy's law Microservices & resilience 5
  • 6. Resilience "Resilient systems provide and maintain an acceptable level of service in face of faults (unintentional, intentional, or naturally caused) affecting their normal operation" Microservices & resilience 6
  • 8. Do not forget resilience during estimations. Where resilience begins? Microservices & resilience 8 It is not only about Microservices!
  • 9. • recovery • retry: very basic recovery mechanism • self-healing: reinitialize components, either internally or by an external monitoring system (automatic service restart, start service upon machine boot) • retry budget: if the retry budget is exceeded, don’t retry; just fail the request to omit overloading (see circuit breaker) • exponential backoff with jitter: use randomized exponential backoff when scheduling retries • bulkheads: partition your systems, so that you can keep a failure in one part of the system from destroying everything • complete parameter checking: protection from broken / malicious calls (Postel’s law: be liberal in what you accept, and conservative in what you send) • asynchronous communication (sender does not need to wait for receiver's response) • event driven (event notification, event-carried state transfer, event-sourcing, CQRS) • location transparency: sender does not need to know receiver’s concrete location • zero downtime deployment: deployment is a bad reason for user facing unavailability • stateless (service failover is hard with state) Resiliency patterns (1) Microservices & resilience 9
  • 10. • relaxed temporal constraints: use a more relaxed consistency model to reduce coupling. The real world is not ACID, it is BASE. • idempotence • self contained deployment: services are self-contained deployment units (compatibility between dependent components/APIs) • timeouts • circuit breakers: prevent a failure from constantly recurring • failover • fallback/graceful degradation: The ability of maintaining functionality when portions of a system break down • error handler: separate business logic and error handling • fail fast: add checks in front of expensive operations, avoid foreseeable failures, also called Handshaking) • fan out & quickest reply: send request to multiple workers - use quickest reply and discard all other responses • bounded queues: avoids latency due to overloaded resources (use thread pools and connection pools) Resiliency patterns (2) Microservices & resilience 10
  • 11. • shed load: shed requests based on resource load • observability: goal is to automatically act on detected failures • monitoring: • health checks, • synthetic transactions, • monitor metrics • alerting/visualization • distributed systems tracing • log aggregation/analytics Resiliency patterns (3) Microservices & resilience 11 Always think about composition of patterns to achieve resilience
  • 12. Synchronous vs Asynchronous Microservices & resilience 12 Do not use synchronous communication! Asynchronous is better! The event-based or event-driven approach is a de facto worldwide standard for implementation of asynchronous communication in microservices architectures.
  • 13. Synchronous vs Asynchronous Microservices & resilience 13 Do not use synchronous communication! Asynchronous is better! The event-based or event-driven approach is a de facto worldwide standard for implementation of asynchronous communication in microservices architectures. Order Service Shipping Service shipNewOrder produce Order message broker consume Order
  • 14. "But we need to query data from other Microservice?" ? Microservices & resilience 14
  • 15. Command Query Responsibility Segregation Microservices & resilience 15 Order Service Customer Service produce Order message broker Customer View Service produce Customer Customers Orders findHighValueCustomers Customers Orders
  • 16. 16 "But we still need to connect to other systems synchronously, for example using HTTP(S)!"
  • 17. Important resilience patterns implementing HTTP client Microservices & resilience 17 Timeouts Retry Retry budget
  • 18. Important resilience patterns implementing HTTP client Microservices & resilience 18 Timeouts Retry Retry budget Exponential backoff Circuit breaker
  • 19. Important resilience patterns implementing HTTP client Microservices & resilience 19 Timeouts Retry Retry budget Exponential backoff Circuit breaker Bulkheads Shed load
  • 20. Important resilience patterns implementing HTTP client Microservices & resilience 20 Timeouts Retry Retry budget Exponential backoff Circuit breaker Bulkheads Shed load Fail fast Fan out & quickest reply Caching
  • 21. Important resilience patterns implementing HTTP client Microservices & resilience 21 Timeouts Retry Retry budget Exponential backoff Circuit breaker Bulkheads Shed load Fail fast Fan out & quickest reply Caching Observability Monitoring Alerting Tracing Log aggregation
  • 22. Build for production and not for test environment. 22 Remember TANSTAAFL: there ain’t no such thing as a free lunch.
  • 23. Do not over engineer your system! "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan Lormem ipsum Microservices & resilience 23
  • 24. Learn from production problems! • “The cost of failure is education (Devin Carraway)”. • Use blameless postmortems (https://landing.google.com/sre/book/chapters/postmortem-culture.html) • Human error is never a root cause! • Resilience should be a 4th management objective, alongside Better/Faster/Cheaper. Microservices & resilience 24