SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
Microservices
stress-free and without increased heart-attack risk

Uwe Friedrichsen (codecentric AG) – distributed matters – Berlin, 19. September 2015
@ufried
Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com
I must do µservices!
No, you don’t!
µServices are an architectural choice
When do I need µservices?
The need for speed
The need for speed
Autonomous teams
µServices
DevOps
Continuous Delivery
Cloud
Craftsmanship
…
The need for speed
Autonomous teams
µServices
DevOps
Continuous Delivery
Cloud
Craftsmanship
…
Can’t I just go for µservices
without all that other stuff?
Of course you can, but you shouldn’t …

… because you would pay the full price for µservices and hardly gain anything
What is the price for µservices?
Well, ever heard about µservice hell?
A single µservice is easy …
… but the complexity of the business functionality remains the same
☛ Complexity is shifted from single µservices to µservice collaboration
µServices are usually self-contained …
… i.e., µservices are independent runtime processes
☛ This results in a highly interconnected, distributed system landscape
Consequences


•  Design is more challenging
•  Implementation is more challenging
•  Distributed systems are challenging
•  Lookup
•  Liveness
•  Partitioning
•  Latency
•  Consistency
•  …
•  New challenges for “monolith developers”

à µServices are not easy at all
How can we avoid µservice hell?
No silver bullet
Topic areas




Design
Interfaces
User Interface
Frameworks
Datastores
Developer Runtime Environment
Deployment
Production
Resilience
"It seems as if teams are jumping on µservices because they're sexy, but the
design thinking and decomposition strategy required to create a good
µservices architecture are the same as those needed to create a well
structured monolith.

If teams find it hard to create a well structured monolith, I don't rate their
chances of creating a well structured µservices architecture.”

- Simon Brown



http://www.codingthearchitecture.com/2014/07/06/distributed_big_balls_of_mud.html
"In theory, programming languages give us all we need to encapsulate state
and environment - we just need to use them well.

Maybe we just don’t have the discipline? Maybe we had to explicitly advocate
the practice of writing services running in completely different environments
using different languages to trigger the sort of encapsulation that we want? If
that’s the case, we can either see it as a clever self-hack or something we were
forced into by the fact that we programmers are adept at overcoming any
sort of self-discipline we try to impose on ourselves.

Perhaps both are true.”

- Michael Feathers

https://michaelfeathers.silvrback.com/microservices-and-the-failure-of-encapsulaton
Design






•  Master modularization first
•  Use bounded contexts as a modularization starting point
•  Forget about layered architecture
•  Rethink DRY – avoid deployment dependencies
”If every service needs to be updated at the same
time it’s not loosely coupled”

- Adrian Cockcroft



http://de.slideshare.net/adriancockcroft/dockercon-state-of-the-art-in-microservices
Interfaces






•  Plan for interface evolution
•  Remember Postel’s law
•  Consider API gateways
•  Synchronous vs. asynchronous
µS
Request/Response : Horizontal slicing
Flow / Process
µS
 µS
µS
 µS
 µS
µS
Event-driven : Vertical slicing
µS
 µS
µS
µS
 µS
Flow / Process
User Interface






•  The single UI application is history
•  Separate UI and services by default
•  Decouple via client centric API gateway
•  Including UI in service can make sense in special cases
Bounded
Context
Bounded
Context
Bounded
Context
µS
µS
µS
µS
µS
µS
µS
µS
µS
µS
µS
µS
µS
µS
µS
UI

e.g., B2C-Portal
UI

e.g., embedded in
Partner-Portal
UI

e.g., Mobile App
UI

e.g., Clerk Desktop
API Gateway
 API Gateway
 API Gateway
Frameworks






•  Not the most important issue of µservices
•  Should support at least uniform interfaces, observability, resilience
•  Nice if also support for uniform configuration and discoverability
•  Spring Boot/Cloud, Dropwizard, Netflix Karyon, …
Datastores






•  Avoid the “single, big database”
•  Avoid distributed transactions
•  Try to relax temporal constraints (and make actions idempotent)
•  Treat your storage as being “ephemeral”
Development Runtime Environment






•  Developers should be able to run the application locally
•  Provide automatically deployable “development runtime environment”
•  Containers are your friend
•  Make sure things build and deploy fast locally
Deployment






•  Continuous deployment pipeline is a must
•  Unify deployment artifact format
•  Use either IaC tool deployment …
•  … or distributed infrastructure & scheduler
Production readiness







•  You need to solve at least the following issues
•  Configuration, Orchestration, Discovery, Routing, Observability, Resilience
•  No standard solution (yet) in sight
•  Container management infrastructures evolve quickly
Configuration
•  Netflix Archaius

Orchestration
•  Apache Aurora on Apache Mesos
•  Marathon
•  Kubernetes
•  Fleet

Discovery
•  Netflix Eureka
•  Apache ZooKeeper
•  Kubernetes
•  Etcd
•  Consul
Routing
•  Netflix Zuul & Ribbon
•  Twitter Finagle

Monitoring
•  Hystrix
•  Twitter Zipkin (Distributed Tracing)

Measuring
•  Dropwizard Metrics

Logging
•  ELK
•  Graylog2
•  Splunk
A distributed system is one in which the failure
of a computer you didn't even know existed
can render your own computer unusable.

Leslie Lamport
Failures in complex, distributed, interconnected
systems are not an exceptional case

•  They are the normal case

•  They are not predictable

•  They are not avoidable
µService systems are
complex, distributed, interconnected systems
Failures in µservice systems

are not an exceptional case

•  They are the normal case

•  They are not predictable

•  They are not avoidable
Do not try to avoid failures. Embrace them.
resilience (IT)

the ability of a system to handle unexpected situations
-  without the user noticing it (best case)
-  with a graceful degradation of service (worst case)
Resilience






•  Resilient software design is mandatory
•  Start with isolation and latency control
•  Add automated error recovery and mitigation
•  Separate control and data flow
Event/data flow
 Event/data flow
Resource access
Error flow
 Control flow
µS
Isolation
Separation of control/error
and data/event flow
W
Flow / Process
W
 W
W
 W
 W
 W
W
S
 S
 S
S
S
Escalation
Isolation
Latency Control
Fail Fast
Circuit Breaker
Timeouts
Fan out &
quickest reply
Bounded Queues
Shed Load
Bulkheads
Loose Coupling
Asynchronous
Communication
Event-Driven
Idempotency
Self-Containment
Relaxed
Temporal
Constraints
Location
Transparency
Stateless
Supervision
Monitor
Complete
Parameter
Checking
Error Handler
Escalation
Wrap-up



•  µServices are no free lunch
•  Use if responsiveness is crucial
•  Reduce stress by especially taking care of
•  Good functional design
•  Production readiness (incl. resilience)
•  New challenges for developers (& ops)
So, hope your hell will be more like this …
@ufried
Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com
Microservices - stress-free and without increased heart-attack risk - Uwe Friedrichsen

Weitere ähnliche Inhalte

Ähnlich wie Microservices - stress-free and without increased heart-attack risk - Uwe Friedrichsen

Microservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskMicroservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskUwe Friedrichsen
 
Cloud Native Future
Cloud Native FutureCloud Native Future
Cloud Native FutureJulie Coonce
 
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
 
Microservices Gone Wrong!
Microservices Gone Wrong!Microservices Gone Wrong!
Microservices Gone Wrong!Bert Ertman
 
Timeless design in a cloud-native world
Timeless design in a cloud-native worldTimeless design in a cloud-native world
Timeless design in a cloud-native worldUwe Friedrichsen
 
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201Amazon Web Services
 
devops, platforms and devops platforms
devops, platforms and devops platformsdevops, platforms and devops platforms
devops, platforms and devops platformsVMware Tanzu
 
devops, platforms and devops platforms
devops, platforms and devops platformsdevops, platforms and devops platforms
devops, platforms and devops platformsAndrew Shafer
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?Eduard Tomàs
 
Migrating to cloud-native_app_architectures_pivotal
Migrating to cloud-native_app_architectures_pivotalMigrating to cloud-native_app_architectures_pivotal
Migrating to cloud-native_app_architectures_pivotalkkdlavak3
 
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)Tim Kirby
 
Migrating_to_Cloud-Native_App_Architectures_Pivotal
Migrating_to_Cloud-Native_App_Architectures_PivotalMigrating_to_Cloud-Native_App_Architectures_Pivotal
Migrating_to_Cloud-Native_App_Architectures_PivotalEstevan McCalley
 
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)Dean Bruckman
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft MicroservicesChase Aucoin
 
Nab 2017 a journey to the future of cloud-native media micro-services - was...
Nab 2017   a journey to the future of cloud-native media micro-services - was...Nab 2017   a journey to the future of cloud-native media micro-services - was...
Nab 2017 a journey to the future of cloud-native media micro-services - was...Washington Cabral
 
Grokking microservices in 5 minutes
Grokking microservices in 5 minutesGrokking microservices in 5 minutes
Grokking microservices in 5 minutesAndrew Siemer
 
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
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Rodrigo Antonialli
 

Ähnlich wie Microservices - stress-free and without increased heart-attack risk - Uwe Friedrichsen (20)

Microservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack riskMicroservices - stress-free and without increased heart attack risk
Microservices - stress-free and without increased heart attack risk
 
Cloud Native Future
Cloud Native FutureCloud Native Future
Cloud Native Future
 
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
 
Microservices Gone Wrong!
Microservices Gone Wrong!Microservices Gone Wrong!
Microservices Gone Wrong!
 
Timeless design in a cloud-native world
Timeless design in a cloud-native worldTimeless design in a cloud-native world
Timeless design in a cloud-native world
 
Fantastic Elastic
Fantastic ElasticFantastic Elastic
Fantastic Elastic
 
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
Smaller is Better - Exploiting Microservice Architectures on AWS - Technical 201
 
devops, platforms and devops platforms
devops, platforms and devops platformsdevops, platforms and devops platforms
devops, platforms and devops platforms
 
devops, platforms and devops platforms
devops, platforms and devops platformsdevops, platforms and devops platforms
devops, platforms and devops platforms
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Migrating to cloud-native_app_architectures_pivotal
Migrating to cloud-native_app_architectures_pivotalMigrating to cloud-native_app_architectures_pivotal
Migrating to cloud-native_app_architectures_pivotal
 
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
 
Migrating_to_Cloud-Native_App_Architectures_Pivotal
Migrating_to_Cloud-Native_App_Architectures_PivotalMigrating_to_Cloud-Native_App_Architectures_Pivotal
Migrating_to_Cloud-Native_App_Architectures_Pivotal
 
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
Migrating_to_Cloud-Native_App_Architectures_Pivotal (2)
 
Microsoft Microservices
Microsoft MicroservicesMicrosoft Microservices
Microsoft Microservices
 
Nab 2017 a journey to the future of cloud-native media micro-services - was...
Nab 2017   a journey to the future of cloud-native media micro-services - was...Nab 2017   a journey to the future of cloud-native media micro-services - was...
Nab 2017 a journey to the future of cloud-native media micro-services - was...
 
Grokking microservices in 5 minutes
Grokking microservices in 5 minutesGrokking microservices in 5 minutes
Grokking microservices in 5 minutes
 
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
 
Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020Introduction to Microservices Architecture - SECCOMP 2020
Introduction to Microservices Architecture - SECCOMP 2020
 

Mehr von distributed matters

Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik RüttimannCloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimanndistributed matters
 
What and Why and How: Apache Drill ! - Tugdual Grall
What and Why and How: Apache Drill ! - Tugdual GrallWhat and Why and How: Apache Drill ! - Tugdual Grall
What and Why and How: Apache Drill ! - Tugdual Gralldistributed matters
 
NoSQL in Financial Industry - Pierre Bittner
NoSQL in Financial Industry - Pierre BittnerNoSQL in Financial Industry - Pierre Bittner
NoSQL in Financial Industry - Pierre Bittnerdistributed matters
 
Functional Operations - Susan Potter
Functional Operations - Susan PotterFunctional Operations - Susan Potter
Functional Operations - Susan Potterdistributed matters
 
Joins in a distributed world - Lucian Precup
Joins in a distributed world - Lucian Precup Joins in a distributed world - Lucian Precup
Joins in a distributed world - Lucian Precup distributed matters
 
Meet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike Steenbergen
Meet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike SteenbergenMeet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike Steenbergen
Meet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike Steenbergendistributed matters
 
NoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices -  Michael HacksteinNoSQL meets Microservices -  Michael Hackstein
NoSQL meets Microservices - Michael Hacksteindistributed matters
 
Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015
Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015
Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015distributed matters
 
Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...distributed matters
 
Conflict resolution with guns - Mark Nadal
Conflict resolution with guns - Mark NadalConflict resolution with guns - Mark Nadal
Conflict resolution with guns - Mark Nadaldistributed matters
 
A tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp Krenn
A tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp KrennA tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp Krenn
A tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp Krenndistributed matters
 
NoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin EsmannNoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin Esmanndistributed matters
 
NoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices - Michael HacksteinNoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices - Michael Hacksteindistributed matters
 
No Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil Calcado
No Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil CalcadoNo Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil Calcado
No Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil Calcadodistributed matters
 
Disque: a detailed overview of the distributed implementation - Salvatore San...
Disque: a detailed overview of the distributed implementation - Salvatore San...Disque: a detailed overview of the distributed implementation - Salvatore San...
Disque: a detailed overview of the distributed implementation - Salvatore San...distributed matters
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnesdistributed matters
 

Mehr von distributed matters (17)

Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik RüttimannCloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
 
What and Why and How: Apache Drill ! - Tugdual Grall
What and Why and How: Apache Drill ! - Tugdual GrallWhat and Why and How: Apache Drill ! - Tugdual Grall
What and Why and How: Apache Drill ! - Tugdual Grall
 
NoSQL in Financial Industry - Pierre Bittner
NoSQL in Financial Industry - Pierre BittnerNoSQL in Financial Industry - Pierre Bittner
NoSQL in Financial Industry - Pierre Bittner
 
Functional Operations - Susan Potter
Functional Operations - Susan PotterFunctional Operations - Susan Potter
Functional Operations - Susan Potter
 
Joins in a distributed world - Lucian Precup
Joins in a distributed world - Lucian Precup Joins in a distributed world - Lucian Precup
Joins in a distributed world - Lucian Precup
 
Meet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike Steenbergen
Meet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike SteenbergenMeet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike Steenbergen
Meet Spilo, Zalando’s HIGH-AVAILABLE POSTGRESQL CLUSTER - Feike Steenbergen
 
NoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices -  Michael HacksteinNoSQL meets Microservices -  Michael Hackstein
NoSQL meets Microservices - Michael Hackstein
 
Actors evolved- Rotem Hermon
Actors evolved- Rotem HermonActors evolved- Rotem Hermon
Actors evolved- Rotem Hermon
 
Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015
Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015
Jepsen V - Kyle Kingsbury - Key Note distributed matters Berlin 2015
 
Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...Replication and Synchronization Algorithms for Distributed Databases - Lena W...
Replication and Synchronization Algorithms for Distributed Databases - Lena W...
 
Conflict resolution with guns - Mark Nadal
Conflict resolution with guns - Mark NadalConflict resolution with guns - Mark Nadal
Conflict resolution with guns - Mark Nadal
 
A tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp Krenn
A tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp KrennA tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp Krenn
A tale of queues — from ActiveMQ over Hazelcast to Disque - Philipp Krenn
 
NoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin EsmannNoSQL's biggest lie: SQL never went away - Martin Esmann
NoSQL's biggest lie: SQL never went away - Martin Esmann
 
NoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices - Michael HacksteinNoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices - Michael Hackstein
 
No Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil Calcado
No Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil CalcadoNo Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil Calcado
No Free Lunch, Indeed: Three Years of Microservices at SoundCloud - Phil Calcado
 
Disque: a detailed overview of the distributed implementation - Salvatore San...
Disque: a detailed overview of the distributed implementation - Salvatore San...Disque: a detailed overview of the distributed implementation - Salvatore San...
Disque: a detailed overview of the distributed implementation - Salvatore San...
 
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
Microservices with Netflix OSS & Spring Cloud - Arnaud Cogoluègnes
 

Kürzlich hochgeladen

INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSINGmarianagonzalez07
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queensdataanalyticsqueen03
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 

Kürzlich hochgeladen (20)

INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
2006_GasProcessing_HB (1).pdf HYDROCARBON PROCESSING
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
Top 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In QueensTop 5 Best Data Analytics Courses In Queens
Top 5 Best Data Analytics Courses In Queens
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 

Microservices - stress-free and without increased heart-attack risk - Uwe Friedrichsen

  • 1. Microservices stress-free and without increased heart-attack risk Uwe Friedrichsen (codecentric AG) – distributed matters – Berlin, 19. September 2015
  • 2. @ufried Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com
  • 3. I must do µservices!
  • 5. µServices are an architectural choice
  • 6. When do I need µservices?
  • 7. The need for speed
  • 8. The need for speed Autonomous teams µServices DevOps Continuous Delivery Cloud Craftsmanship …
  • 9. The need for speed Autonomous teams µServices DevOps Continuous Delivery Cloud Craftsmanship … Can’t I just go for µservices without all that other stuff?
  • 10. Of course you can, but you shouldn’t … … because you would pay the full price for µservices and hardly gain anything
  • 11. What is the price for µservices?
  • 12. Well, ever heard about µservice hell?
  • 13. A single µservice is easy … … but the complexity of the business functionality remains the same ☛ Complexity is shifted from single µservices to µservice collaboration µServices are usually self-contained … … i.e., µservices are independent runtime processes ☛ This results in a highly interconnected, distributed system landscape
  • 14. Consequences •  Design is more challenging •  Implementation is more challenging •  Distributed systems are challenging •  Lookup •  Liveness •  Partitioning •  Latency •  Consistency •  … •  New challenges for “monolith developers” à µServices are not easy at all
  • 15. How can we avoid µservice hell?
  • 17. Topic areas Design Interfaces User Interface Frameworks Datastores Developer Runtime Environment Deployment Production Resilience
  • 18. "It seems as if teams are jumping on µservices because they're sexy, but the design thinking and decomposition strategy required to create a good µservices architecture are the same as those needed to create a well structured monolith. If teams find it hard to create a well structured monolith, I don't rate their chances of creating a well structured µservices architecture.” - Simon Brown http://www.codingthearchitecture.com/2014/07/06/distributed_big_balls_of_mud.html
  • 19. "In theory, programming languages give us all we need to encapsulate state and environment - we just need to use them well. Maybe we just don’t have the discipline? Maybe we had to explicitly advocate the practice of writing services running in completely different environments using different languages to trigger the sort of encapsulation that we want? If that’s the case, we can either see it as a clever self-hack or something we were forced into by the fact that we programmers are adept at overcoming any sort of self-discipline we try to impose on ourselves. Perhaps both are true.” - Michael Feathers https://michaelfeathers.silvrback.com/microservices-and-the-failure-of-encapsulaton
  • 20. Design •  Master modularization first •  Use bounded contexts as a modularization starting point •  Forget about layered architecture •  Rethink DRY – avoid deployment dependencies
  • 21. ”If every service needs to be updated at the same time it’s not loosely coupled” - Adrian Cockcroft http://de.slideshare.net/adriancockcroft/dockercon-state-of-the-art-in-microservices
  • 22. Interfaces •  Plan for interface evolution •  Remember Postel’s law •  Consider API gateways •  Synchronous vs. asynchronous
  • 23. µS Request/Response : Horizontal slicing Flow / Process µS µS µS µS µS µS Event-driven : Vertical slicing µS µS µS µS µS Flow / Process
  • 24. User Interface •  The single UI application is history •  Separate UI and services by default •  Decouple via client centric API gateway •  Including UI in service can make sense in special cases
  • 25. Bounded Context Bounded Context Bounded Context µS µS µS µS µS µS µS µS µS µS µS µS µS µS µS UI e.g., B2C-Portal UI e.g., embedded in Partner-Portal UI e.g., Mobile App UI e.g., Clerk Desktop API Gateway API Gateway API Gateway
  • 26. Frameworks •  Not the most important issue of µservices •  Should support at least uniform interfaces, observability, resilience •  Nice if also support for uniform configuration and discoverability •  Spring Boot/Cloud, Dropwizard, Netflix Karyon, …
  • 27. Datastores •  Avoid the “single, big database” •  Avoid distributed transactions •  Try to relax temporal constraints (and make actions idempotent) •  Treat your storage as being “ephemeral”
  • 28. Development Runtime Environment •  Developers should be able to run the application locally •  Provide automatically deployable “development runtime environment” •  Containers are your friend •  Make sure things build and deploy fast locally
  • 29. Deployment •  Continuous deployment pipeline is a must •  Unify deployment artifact format •  Use either IaC tool deployment … •  … or distributed infrastructure & scheduler
  • 30. Production readiness •  You need to solve at least the following issues •  Configuration, Orchestration, Discovery, Routing, Observability, Resilience •  No standard solution (yet) in sight •  Container management infrastructures evolve quickly
  • 31. Configuration •  Netflix Archaius Orchestration •  Apache Aurora on Apache Mesos •  Marathon •  Kubernetes •  Fleet Discovery •  Netflix Eureka •  Apache ZooKeeper •  Kubernetes •  Etcd •  Consul Routing •  Netflix Zuul & Ribbon •  Twitter Finagle Monitoring •  Hystrix •  Twitter Zipkin (Distributed Tracing) Measuring •  Dropwizard Metrics Logging •  ELK •  Graylog2 •  Splunk
  • 32. A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable. Leslie Lamport
  • 33. Failures in complex, distributed, interconnected systems are not an exceptional case •  They are the normal case •  They are not predictable •  They are not avoidable
  • 34. µService systems are complex, distributed, interconnected systems
  • 35. Failures in µservice systems
 are not an exceptional case •  They are the normal case •  They are not predictable •  They are not avoidable
  • 36. Do not try to avoid failures. Embrace them.
  • 37. resilience (IT) the ability of a system to handle unexpected situations -  without the user noticing it (best case) -  with a graceful degradation of service (worst case)
  • 38. Resilience •  Resilient software design is mandatory •  Start with isolation and latency control •  Add automated error recovery and mitigation •  Separate control and data flow
  • 39. Event/data flow Event/data flow Resource access Error flow Control flow µS Isolation
  • 40. Separation of control/error and data/event flow W Flow / Process W W W W W W W S S S S S Escalation
  • 41. Isolation Latency Control Fail Fast Circuit Breaker Timeouts Fan out & quickest reply Bounded Queues Shed Load Bulkheads Loose Coupling Asynchronous Communication Event-Driven Idempotency Self-Containment Relaxed Temporal Constraints Location Transparency Stateless Supervision Monitor Complete Parameter Checking Error Handler Escalation
  • 42. Wrap-up •  µServices are no free lunch •  Use if responsiveness is crucial •  Reduce stress by especially taking care of •  Good functional design •  Production readiness (incl. resilience) •  New challenges for developers (& ops)
  • 43. So, hope your hell will be more like this …
  • 44. @ufried Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com