SlideShare a Scribd company logo
4
Most read
14
Most read
16
Most read
Stability Patterns for
Microservices
Petru Flueras
Software Architect - Visma
@pflueras
Codecamp Timisoara, May 2019
Stability Patterns for Microservices
Microservices are usually processes that communicate over a network to fulfill a goal
using technology-agnostic protocols such as HTTP
Fallacies of distributed computing
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn't change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous
source: https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
Can we build stable services over unreliable networking?
Unstable Services
● Scarce resources
○ Memory
○ CPU
○ Thread pools
○ Sockets
○ Connection pools
● External conditions
○ Integration points
○ Downstream network calls
In addition to unreliable network there are turbulent conditions at service level
Pitfall #1
Pitfall #1
Cascading failures, Blocked threads, Slow responses
#1 Timeouts
Protect your system from someone else’s failure
#2 Retries (Idempotent!)
● Fail over temporary failures
● Retry with exponential backoff policy
● Idempotence: is the property of certain operations that can be applied multiple
times without changing the result beyond the initial application
● Idempotence = safe to retry!
#3 Circuit Breaker
Gives the opportunity of external service to recover
source: https://www.ebayinc.com/assets/Uploads/Blog/2015/08/circuit_breaker_state_diagram.gif
Pitfall #2
#4 Bulkhead
Isolate elements of an application into pools so that if one fails, the others will
continue to function
#5 Throttling
● Over capacity protection?
● μService is overwhelmed with requests
● Avoid slow responses
● You can’t out-scale the world
● Control the consumption of resources used by a service
● Control maximum number of concurrent requests
● A queue between accepting connections and processing requests
● Can be used for ‘auto scaling’
Testing Stability
● Chaos Monkey (Netflix)
○ resiliency tool that helps applications tolerate random instance failures
● Simian Army (Netflix)
○ a suite of tools developed by Netflix to test the reliability, security, or resiliency
● Google DiRT (Disaster Recovery Testing)
● Chaos Engineering
● Monitoring!!!
Stability Patterns for Microservices
Thank you!

More Related Content

What's hot (20)

KEY
Introduction to memcached
Jurriaan Persyn
 
PPTX
HBase and HDFS: Understanding FileSystem Usage in HBase
enissoz
 
PDF
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
mumrah
 
PDF
Introduction to Redis
Dvir Volk
 
PPTX
Introduction to Storm
Chandler Huang
 
PPTX
From distributed caches to in-memory data grids
Max Alexejev
 
PPT
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
PDF
Intro to HBase
alexbaranau
 
PPTX
Apache Spark Architecture
Alexey Grishchenko
 
PDF
Etsy Activity Feeds Architecture
Dan McKinley
 
PPTX
Apache Tez - A New Chapter in Hadoop Data Processing
DataWorks Summit
 
PDF
Introduction to MongoDB
Mike Dirolf
 
PDF
The Patterns of Distributed Logging and Containers
SATOSHI TAGOMORI
 
PDF
From Mainframe to Microservice: An Introduction to Distributed Systems
Tyler Treat
 
PDF
SpringOne Tour: Spring Boot 3 and Beyond
VMware Tanzu
 
PDF
High-speed Database Throughput Using Apache Arrow Flight SQL
ScyllaDB
 
PDF
Apache HBase Improvements and Practices at Xiaomi
HBaseCon
 
PPTX
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Igor Anishchenko
 
PDF
Redis vs Infinispan | DevNation Tech Talk
Red Hat Developers
 
PDF
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
GetInData
 
Introduction to memcached
Jurriaan Persyn
 
HBase and HDFS: Understanding FileSystem Usage in HBase
enissoz
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
mumrah
 
Introduction to Redis
Dvir Volk
 
Introduction to Storm
Chandler Huang
 
From distributed caches to in-memory data grids
Max Alexejev
 
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
Intro to HBase
alexbaranau
 
Apache Spark Architecture
Alexey Grishchenko
 
Etsy Activity Feeds Architecture
Dan McKinley
 
Apache Tez - A New Chapter in Hadoop Data Processing
DataWorks Summit
 
Introduction to MongoDB
Mike Dirolf
 
The Patterns of Distributed Logging and Containers
SATOSHI TAGOMORI
 
From Mainframe to Microservice: An Introduction to Distributed Systems
Tyler Treat
 
SpringOne Tour: Spring Boot 3 and Beyond
VMware Tanzu
 
High-speed Database Throughput Using Apache Arrow Flight SQL
ScyllaDB
 
Apache HBase Improvements and Practices at Xiaomi
HBaseCon
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Igor Anishchenko
 
Redis vs Infinispan | DevNation Tech Talk
Red Hat Developers
 
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
GetInData
 

Similar to Stability Patterns for Microservices (20)

PPTX
Design patterns for scaling web applications
Ivan Dimitrov
 
PDF
Sistemas Distribuidos
Locaweb
 
PDF
Software Testing
Andrew Wang
 
PDF
02 Models of Distribution Systems.pdf
RobeliaJoyVillaruz
 
PPTX
Building Cloud Ready Apps
VMware Tanzu
 
PDF
ON FAULT TOLERANCE OF RESOURCES IN COMPUTATIONAL GRIDS
ijgca
 
PPT
3. challenges
AbDul ThaYyal
 
PPTX
Platform Security IRL: Busting Buzzwords & Building Better
Equal Experts
 
PDF
Build a better client
cc liu
 
PPTX
Brad stack - Digital Health and Well-Being Festival
Digital Health Enterprise Zone
 
PDF
Concurrency in Operating system_12345678
ankitashah871482
 
PDF
Building data intensive applications
Amit Kejriwal
 
PPTX
Design Like a Pro: Planning Enterprise Solutions
Inductive Automation
 
ODP
Zero Downtime JEE Architectures
Alexander Penev
 
PPTX
Design Like a Pro: Planning Enterprise Solutions
Inductive Automation
 
PPTX
Acceleration_and_Security_draft_v2
Srinivasa Addepalli
 
PDF
Microservices Security: dos and don'ts
Minded Security
 
PDF
Fault tolerance - look, it's simple!
Izzet Mustafaiev
 
PDF
Clustering in PostgreSQL - Because one database server is never enough (and n...
Umair Shahid
 
PPT
4. system models
AbDul ThaYyal
 
Design patterns for scaling web applications
Ivan Dimitrov
 
Sistemas Distribuidos
Locaweb
 
Software Testing
Andrew Wang
 
02 Models of Distribution Systems.pdf
RobeliaJoyVillaruz
 
Building Cloud Ready Apps
VMware Tanzu
 
ON FAULT TOLERANCE OF RESOURCES IN COMPUTATIONAL GRIDS
ijgca
 
3. challenges
AbDul ThaYyal
 
Platform Security IRL: Busting Buzzwords & Building Better
Equal Experts
 
Build a better client
cc liu
 
Brad stack - Digital Health and Well-Being Festival
Digital Health Enterprise Zone
 
Concurrency in Operating system_12345678
ankitashah871482
 
Building data intensive applications
Amit Kejriwal
 
Design Like a Pro: Planning Enterprise Solutions
Inductive Automation
 
Zero Downtime JEE Architectures
Alexander Penev
 
Design Like a Pro: Planning Enterprise Solutions
Inductive Automation
 
Acceleration_and_Security_draft_v2
Srinivasa Addepalli
 
Microservices Security: dos and don'ts
Minded Security
 
Fault tolerance - look, it's simple!
Izzet Mustafaiev
 
Clustering in PostgreSQL - Because one database server is never enough (and n...
Umair Shahid
 
4. system models
AbDul ThaYyal
 
Ad

Recently uploaded (20)

PPTX
Avast Premium Security crack 25.5.6162 + License Key 2025
HyperPc soft
 
PPTX
How Can Recruitment Management Software Improve Hiring Efficiency?
HireME
 
PPTX
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
 
PPTX
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
 
PPTX
CONCEPT OF PROGRAMMING in language .pptx
tamim41
 
PPTX
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
PDF
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
 
PDF
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
PDF
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
PDF
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
 
PDF
How DeepSeek Beats ChatGPT: Cost Comparison and Key Differences
sumitpurohit810
 
PDF
Dealing with JSON in the relational world
Andres Almiray
 
PDF
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
PPTX
ManageIQ - Sprint 264 Review - Slide Deck
ManageIQ
 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
PDF
AI Software Development Process, Strategies and Challenges
Net-Craft.com
 
PPTX
NeuroStrata: Harnessing Neuro-Symbolic Paradigms for Improved Testability and...
Ivan Ruchkin
 
PPTX
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
PDF
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
Avast Premium Security crack 25.5.6162 + License Key 2025
HyperPc soft
 
How Can Recruitment Management Software Improve Hiring Efficiency?
HireME
 
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
 
Wondershare Filmora Crack 14.5.18 + Key Full Download [Latest 2025]
HyperPc soft
 
CONCEPT OF PROGRAMMING in language .pptx
tamim41
 
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
 
>Wondershare Filmora Crack Free Download 2025
utfefguu
 
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
>Nitro Pro Crack 14.36.1.0 + Keygen Free Download [Latest]
utfefguu
 
How DeepSeek Beats ChatGPT: Cost Comparison and Key Differences
sumitpurohit810
 
Dealing with JSON in the relational world
Andres Almiray
 
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
ManageIQ - Sprint 264 Review - Slide Deck
ManageIQ
 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
AI Software Development Process, Strategies and Challenges
Net-Craft.com
 
NeuroStrata: Harnessing Neuro-Symbolic Paradigms for Improved Testability and...
Ivan Ruchkin
 
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
Ad

Stability Patterns for Microservices

  • 1. Stability Patterns for Microservices Petru Flueras Software Architect - Visma @pflueras Codecamp Timisoara, May 2019
  • 3. Microservices are usually processes that communicate over a network to fulfill a goal using technology-agnostic protocols such as HTTP
  • 4. Fallacies of distributed computing 1. The network is reliable 2. Latency is zero 3. Bandwidth is infinite 4. The network is secure 5. Topology doesn't change 6. There is one administrator 7. Transport cost is zero 8. The network is homogeneous source: https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
  • 5. Can we build stable services over unreliable networking?
  • 6. Unstable Services ● Scarce resources ○ Memory ○ CPU ○ Thread pools ○ Sockets ○ Connection pools ● External conditions ○ Integration points ○ Downstream network calls
  • 7. In addition to unreliable network there are turbulent conditions at service level
  • 9. Pitfall #1 Cascading failures, Blocked threads, Slow responses
  • 10. #1 Timeouts Protect your system from someone else’s failure
  • 11. #2 Retries (Idempotent!) ● Fail over temporary failures ● Retry with exponential backoff policy ● Idempotence: is the property of certain operations that can be applied multiple times without changing the result beyond the initial application ● Idempotence = safe to retry!
  • 12. #3 Circuit Breaker Gives the opportunity of external service to recover source: https://www.ebayinc.com/assets/Uploads/Blog/2015/08/circuit_breaker_state_diagram.gif
  • 14. #4 Bulkhead Isolate elements of an application into pools so that if one fails, the others will continue to function
  • 15. #5 Throttling ● Over capacity protection? ● μService is overwhelmed with requests ● Avoid slow responses ● You can’t out-scale the world ● Control the consumption of resources used by a service ● Control maximum number of concurrent requests ● A queue between accepting connections and processing requests ● Can be used for ‘auto scaling’
  • 16. Testing Stability ● Chaos Monkey (Netflix) ○ resiliency tool that helps applications tolerate random instance failures ● Simian Army (Netflix) ○ a suite of tools developed by Netflix to test the reliability, security, or resiliency ● Google DiRT (Disaster Recovery Testing) ● Chaos Engineering ● Monitoring!!!