SlideShare ist ein Scribd-Unternehmen logo
1 von 71
Downloaden Sie, um offline zu lesen
Production-ready software
instead of just being “feature complete”

Uwe Friedrichsen – codecentric AG – 2014-2016
@ufried
Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com
Why this talk?
Ops
Dev
Business
 IT value chain
 Customer
feature complete
production ready
Work in progress
Realized
business
value
New
business
idea
It‘s all about production!
But before we talk about production …
… let’s talk about DevOps briefly
What is that DevOps thing anyway?
Let’s check the

“DevOps bible”



http://itrevolution.com/books/phoenix-project-devops-book/
DevOps in a nutshell
The 3 ways of DevOps


Systems thinking
Amplify feedback loops
Culture of continual experimentation & learning


http://itrevolution.com/the-three-ways-principles-underpinning-devops/
•  Maximize flow (minimize cycle times)
•  Optimize for global goals (holistic view)
•  Never pass defects downstream
•  Limit work in progress
•  Build systems and organizations that are safe to change
Ops
Dev
Business
 IT value chain
 Customer
Holistic optimization
Systems thinking
•  Facilitate constant flow of fast feedback from right-to-left
•  Create quality at source (provide knowledge where needed)
•  Create shared goals and shared pain between Dev and Ops
•  Implement fast automated test suites
•  Pervasively measure outcome (customer value), not output
Ops
Dev
Business
 IT value chain
 Customer
Amplify feedback loops
•  Create a culture that fosters two things
•  Continual experimentation, taking risks and learning from success and failure
•  Understanding that repetition and practice is the prerequisite to mastery
•  Allocate at least 20% of Dev and Ops cycles to NFRs
•  Constantly reinforce that improvements are encouraged & celebrated
Ops
Dev
Business
 IT value chain
 Customer
Continual experimentation and learning
If taken seriously DevOps will eventually
rotate your IT organization by 90°
Ops
Dev
 IT value chain
Businesscapabilities
Specialistteam(e.g.,productmanager)
Specialistteam(e.g.,UXexpert)
Specialistteam(e.g.,developer)
Specialistteam(e.g.,QAexpert)
Specialistteam(e.g.,sysadmin)
Specialistteam(e.g.,DBA)
…
Traditional IT organization
Ops
Dev
 IT value chain
Businesscapabilities
Cross-functional product team
…
DevOps IT organization
Cross-functional product team
Cross-functional product team
Cross-functional product team
Ops
Dev
 IT value chain
Businesscapabilities
Cross-functional product team
…
DevOps IT organization (optimized)
Cross-functional product team
Cross-functional product team
Cross-functional product team
Platformteam
API
But that’s still a long way to go

for many organizations …
Amplify feedback loops







•  Facilitate constant flow of fast feedback from right-to-left
•  Create quality at source (provide knowledge where needed)
•  Create shared goals and shared pain between Dev and Ops
•  Implement fast automated test suites
•  Pervasively measure outcome (customer value), not output
Ops
Dev
Business
 IT value chain
 Customer
Thus, we’ll focus on this feedback loop
Let’s talk about operations …
Operations
Developers Point of View
Admin
Developers Point of View
Admin
Closer to Reality Point of View
Top 5 Needs of an Admin


1.  Give me my peace and quiet!
2.  Don‘t make me think!
3.  Let me see that everything is fine!
4.  Show me the problem – now!
5.  Tell me what to do!
Top 5 Needs of an Admin (translated)

1.  Give me my peace and quiet!

(The application should just run smoothly)
2.  Don‘t make me think!

(Rollout, setup and operation of the application should be easy)
3.  Let me see that everything is fine!

(The application should show its state)
4.  Show me the problem – now!

(The application should provide concise error messages and enable easy root cause drilldown)
5.  Tell me what to do!

(The application should be documented properly – including error handling instructions)
Top 3 Dev Challenges


1.  Manageability
2.  Resilience
3.  Transparency
4.  Documentation
11 Design Principles

For production-ready Applications






•  Manageability (4)
•  Resilience (5)
•  Transparency (2)
Manageability
Deployment

(Manageability)
•  One-click deployment
•  Preserve settings
•  Provide rollbacks or roll-forward
•  Go for containers
Configuration

(Manageability)
•  Avoid multiple configuration procedures
•  Define default value handling
•  Organize change traceability
•  Notification about new parameters
Configuration Parameter Types

(Manageability)
•  Context-related parameters

Do not stage – managed by stage admin
•  Application-related parameters

Must be staged – managed by application admin
•  Business-related parameters

Must be staged – managed by business admin
Backup

(Manageability)
•  Think about backup purpose
•  Define backup strategy
•  Provide tooling
•  What about backup in cloud environments?
Resilience
Isolation
•  System must not fail as a whole
•  Divide system in failure units (a.k.a. bulkheads)
•  Avoid error propagation by isolating failure units
•  Define fallback strategy
Redundancy
•  Elaborate use case

Minimize MTTR / avoid latency / handle response errors / …
•  Define routing & distribution strategy

Round robin / master-slave / fan-out & quickest one wins / …
•  Consider admin involvement

Automatic vs. manual / notification – monitoring / …
Loose Coupling
•  Isolate failure units (complements bulkheads)
•  Go asynchronous wherever possible
•  Use timeouts & circuit breakers
•  Make actions idempotent
Implementation Example #1

Timeouts
Timeouts (1)
// Basics
myObject.wait(); // Do not use this by default
myObject.wait(TIMEOUT); // Better use this
// Some more basics
myThread.join(); // Do not use this by default
myThread.join(TIMEOUT); // Better use this
Timeouts (2)
// Using the Java concurrent library
Callable<MyActionResult> myAction = <My Blocking Action>
ExecutorService executor = Executors.newSingleThreadExecutor();
Future<MyActionResult> future = executor.submit(myAction);
MyActionResult result = null;
try {
result = future.get(); // Do not use this by default
result = future.get(TIMEOUT, TIMEUNIT); // Better use this
} catch (TimeoutException e) { // Only thrown if timeouts are used
...
} catch (...) {
...
}
Timeouts (3)
// Using Guava SimpleTimeLimiter
Callable<MyActionResult> myAction = <My Blocking Action>
SimpleTimeLimiter limiter = new SimpleTimeLimiter();
MyActionResult result = null;
try {
result =
limiter.callWithTimeout(myAction, TIMEOUT, TIMEUNIT, false);
} catch (UncheckedTimeoutException e) {
...
} catch (...) {
...
}
Implementation Example #2

Circuit Breaker
Circuit Breaker – concept
Client
 Resource
Circuit Breaker
Request
Resource unavailable
Resource available
Closed
 Open
Half-Open
Lifecycle
Implemented patterns






•  Timeout
•  Circuit breaker
•  Load shedder
•  Fallback
Supported patterns

•  Bulkheads

(a.k.a. Failure Units)
•  Fail fast
•  Fail silently
•  Graceful degradation of service
•  Failover
•  Escalation
•  Retry
•  ...
Hello, world!
// Hystrix “Hello world”
public class HelloCommand extends HystrixCommand<String> {
private static final String COMMAND_GROUP = ”Hello”; // Not important here
private final String name;
// Request parameters are passed in as constructor parameters
public HelloCommand(String name) {
super(HystrixCommandGroupKey.Factory.asKey(COMMAND_GROUP));
this.name = name;
}
@Override
protected String run() throws Exception {
// Usually here would be the resource call that needs to be guarded
return "Hello, " + name;
}
}
// Usage of a Hystrix command – synchronous variant
@Test
public void shouldGreetWorld() {
String result = new HelloCommand("World").execute();
assertEquals("Hello, World", result);
}
Source: https://github.com/Netflix/Hystrix/wiki/How-it-Works
Fallbacks
•  What will you do if a request fails?
•  Consider failure handling from the very beginning
•  Supplement with general failure handling strategies
Scalability
•  Define scaling strategy
•  Think full stack
•  Design for elasticity
•  At least apply D-I-D rule
Transparency
Monitoring

(Transparency)
•  Think about required metrics
•  Provide correlation Ids
•  Design hook or event mechanism
•  Plan for changing metrics
Logging

(Transparency)
•  Consider log message structure

Assume centralized logging: required information / machine readable / human readable
•  Define logging policy

Debug and less: developers perspective / Info and more: operations perspective
11 Design Principles

•  Manageability
•  Deployment
•  Configuration
•  Configuration Parameter Types
•  Backup

•  Resilience
•  Isolation
•  Redundancy
•  Loose Coupling
•  Fallbacks
•  Scalability

•  Transparency
•  Monitoring
•  Logging
Don’t forget to

read the “bible” of
production-ready
software …



https://pragprog.com/book/mnee/release-it
Wrap-up


•  The importance of “production readiness”
•  The 3 ways of DevOps
•  The needs of Ops
•  The resulting challenges for Dev
•  Design principles to support the needs
•  Manageability
•  Resilience
•  Transparency
It’s all about production!
@ufried
Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com
Production-ready Software

Weitere ähnliche Inhalte

Was ist angesagt?

Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...
Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...
Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...
white paper
 

Was ist angesagt? (20)

Layer 7 Technologies: What Is An Xml Firewall
Layer 7 Technologies: What Is An Xml FirewallLayer 7 Technologies: What Is An Xml Firewall
Layer 7 Technologies: What Is An Xml Firewall
 
Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application Modernisation
 
Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...
Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...
Cloud Computing With Amazon Web Services, Part 1: Introduction - When It's Sm...
 
Frisby Api automation
Frisby Api automationFrisby Api automation
Frisby Api automation
 
Nsx security deep dive
Nsx security deep diveNsx security deep dive
Nsx security deep dive
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
WebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST MicroserviceWebSocket MicroService vs. REST Microservice
WebSocket MicroService vs. REST Microservice
 
IDP Proxy Concept: Accessing Identity Data Sources Everywhere!
IDP Proxy Concept: Accessing Identity Data Sources Everywhere!IDP Proxy Concept: Accessing Identity Data Sources Everywhere!
IDP Proxy Concept: Accessing Identity Data Sources Everywhere!
 
Fault tolerant and scalable ibm mq
Fault tolerant and scalable ibm mqFault tolerant and scalable ibm mq
Fault tolerant and scalable ibm mq
 
Exchange Server 2013 Architecture Deep Dive, Part 2
Exchange Server 2013 Architecture Deep Dive, Part 2 Exchange Server 2013 Architecture Deep Dive, Part 2
Exchange Server 2013 Architecture Deep Dive, Part 2
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 
Washington DC MuleSoft Meetup: CI/CD Pipeline with MuleSoft and Azure DevOps
Washington DC MuleSoft Meetup: CI/CD Pipeline with MuleSoft and Azure DevOpsWashington DC MuleSoft Meetup: CI/CD Pipeline with MuleSoft and Azure DevOps
Washington DC MuleSoft Meetup: CI/CD Pipeline with MuleSoft and Azure DevOps
 
SCCM Cloud Management Gateway
SCCM Cloud Management Gateway SCCM Cloud Management Gateway
SCCM Cloud Management Gateway
 
VMware vSphere 6.0 - Troubleshooting Training - Day 4
VMware vSphere 6.0 - Troubleshooting Training - Day 4VMware vSphere 6.0 - Troubleshooting Training - Day 4
VMware vSphere 6.0 - Troubleshooting Training - Day 4
 
IBM MQ Update, including 9.1.2 CD
IBM MQ Update, including 9.1.2 CDIBM MQ Update, including 9.1.2 CD
IBM MQ Update, including 9.1.2 CD
 
OpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platformOpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platform
 
Agile Integration eBook from 2018
Agile Integration eBook from 2018Agile Integration eBook from 2018
Agile Integration eBook from 2018
 
RIA Cross Domain Policy
RIA Cross Domain PolicyRIA Cross Domain Policy
RIA Cross Domain Policy
 
Self healing data
Self healing dataSelf healing data
Self healing data
 
Patterns of resilience
Patterns of resiliencePatterns of resilience
Patterns of resilience
 

Andere mochten auch

The promises and perils of microservices
The promises and perils of microservicesThe promises and perils of microservices
The promises and perils of microservices
Uwe Friedrichsen
 
Resilient Functional Service Design
Resilient Functional Service DesignResilient Functional Service Design
Resilient Functional Service Design
Uwe Friedrichsen
 
DevOps is not enough - Embedding DevOps in a broader context
DevOps is not enough - Embedding DevOps in a broader contextDevOps is not enough - Embedding DevOps in a broader context
DevOps is not enough - Embedding DevOps in a broader context
Uwe Friedrichsen
 
Modern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of ITModern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of IT
Uwe Friedrichsen
 

Andere mochten auch (20)

Resilience reloaded - more resilience patterns
Resilience reloaded - more resilience patternsResilience reloaded - more resilience patterns
Resilience reloaded - more resilience patterns
 
The promises and perils of microservices
The promises and perils of microservicesThe promises and perils of microservices
The promises and perils of microservices
 
Towards complex adaptive architectures
Towards complex adaptive architecturesTowards complex adaptive architectures
Towards complex adaptive architectures
 
Resilient Functional Service Design
Resilient Functional Service DesignResilient Functional Service Design
Resilient Functional Service Design
 
Watch your communication
Watch your communicationWatch your communication
Watch your communication
 
Life, IT and everything
Life, IT and everythingLife, IT and everything
Life, IT and everything
 
DevOps is not enough - Embedding DevOps in a broader context
DevOps is not enough - Embedding DevOps in a broader contextDevOps is not enough - Embedding DevOps in a broader context
DevOps is not enough - Embedding DevOps in a broader context
 
Resilience with Hystrix
Resilience with HystrixResilience with Hystrix
Resilience with Hystrix
 
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
 
Conway's law revisited - Architectures for an effective IT
Conway's law revisited - Architectures for an effective ITConway's law revisited - Architectures for an effective IT
Conway's law revisited - Architectures for an effective IT
 
No stress with state
No stress with stateNo stress with state
No stress with state
 
Modern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of ITModern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of IT
 
The Next Generation (of) IT
The Next Generation (of) ITThe Next Generation (of) IT
The Next Generation (of) IT
 
Devops for Developers
Devops for DevelopersDevops for Developers
Devops for Developers
 
Why resilience - A primer at varying flight altitudes
Why resilience - A primer at varying flight altitudesWhy resilience - A primer at varying flight altitudes
Why resilience - A primer at varying flight altitudes
 
Fantastic Elastic
Fantastic ElasticFantastic Elastic
Fantastic Elastic
 
Coping with Semantic Variation Points in Domain-Specific Modeling Languages
Coping with Semantic Variation Points in Domain-Specific Modeling LanguagesCoping with Semantic Variation Points in Domain-Specific Modeling Languages
Coping with Semantic Variation Points in Domain-Specific Modeling Languages
 
Embracing Failure - Fault Injection and Service Resilience at Netflix
Embracing Failure - Fault Injection and Service Resilience at NetflixEmbracing Failure - Fault Injection and Service Resilience at Netflix
Embracing Failure - Fault Injection and Service Resilience at Netflix
 
Size does matter - Patterns for high scalability: Uwe Friedrichsen
Size does matter - Patterns for high scalability: Uwe FriedrichsenSize does matter - Patterns for high scalability: Uwe Friedrichsen
Size does matter - Patterns for high scalability: Uwe Friedrichsen
 
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
 

Ähnlich wie Production-ready Software

Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
CIVEL Benoit
 

Ähnlich wie Production-ready Software (20)

Beyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver SoftwareBeyond TDD: Enabling Your Team to Continuously Deliver Software
Beyond TDD: Enabling Your Team to Continuously Deliver Software
 
DevOps and AWS
DevOps and AWSDevOps and AWS
DevOps and AWS
 
Improving the Design of Existing Software
Improving the Design of Existing SoftwareImproving the Design of Existing Software
Improving the Design of Existing Software
 
DevOps for Developers - Friedrichsen
DevOps for Developers - FriedrichsenDevOps for Developers - Friedrichsen
DevOps for Developers - Friedrichsen
 
Continuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CIContinuous Delivery - Automate & Build Better Software with Travis CI
Continuous Delivery - Automate & Build Better Software with Travis CI
 
WinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release PipelinesWinOps Conf 2016 - Michael Greene - Release Pipelines
WinOps Conf 2016 - Michael Greene - Release Pipelines
 
Best practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on SalesforceBest practices for implementing CI/CD on Salesforce
Best practices for implementing CI/CD on Salesforce
 
Serena Release Management approach and solutions
Serena Release Management approach and solutionsSerena Release Management approach and solutions
Serena Release Management approach and solutions
 
Dev ops concept
Dev ops conceptDev ops concept
Dev ops concept
 
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
Droidcon Spain 2016 - The Pragmatic Android Programmer: from hype to reality
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Keeping Your DevOps Transformation From Crushing Your Ops Capacity Keeping Your DevOps Transformation From Crushing Your Ops Capacity
Keeping Your DevOps Transformation From Crushing Your Ops Capacity
 
Splunk: Forward me the REST of those shells
Splunk: Forward me the REST of those shellsSplunk: Forward me the REST of those shells
Splunk: Forward me the REST of those shells
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S... Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
 
Best practice adoption (and lack there of)
Best practice adoption (and lack there of)Best practice adoption (and lack there of)
Best practice adoption (and lack there of)
 
Chicago DevOps Meetup Nov2019
Chicago DevOps Meetup Nov2019Chicago DevOps Meetup Nov2019
Chicago DevOps Meetup Nov2019
 
20201010 - Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
20201010 -  Collabdays 2020 - Sandro Pereira - Power Automates: best practice...20201010 -  Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
20201010 - Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
 

Mehr von Uwe Friedrichsen

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
Uwe Friedrichsen
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
Uwe Friedrichsen
 
Real-world consistency explained
Real-world consistency explainedReal-world consistency explained
Real-world consistency explained
Uwe Friedrichsen
 
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
Uwe Friedrichsen
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
Uwe Friedrichsen
 
The truth about "You build it, you run it!"
The truth about "You build it, you run it!"The truth about "You build it, you run it!"
The truth about "You build it, you run it!"
Uwe Friedrichsen
 
Fault tolerance made easy
Fault tolerance made easyFault tolerance made easy
Fault tolerance made easy
Uwe Friedrichsen
 

Mehr von Uwe Friedrichsen (12)

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
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 
Life after microservices
Life after microservicesLife after microservices
Life after microservices
 
The hitchhiker's guide for the confused developer
The hitchhiker's guide for the confused developerThe hitchhiker's guide for the confused developer
The hitchhiker's guide for the confused developer
 
Digitization solutions - A new breed of software
Digitization solutions - A new breed of softwareDigitization solutions - A new breed of software
Digitization solutions - A new breed of software
 
Real-world consistency explained
Real-world consistency explainedReal-world consistency explained
Real-world consistency explained
 
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
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
The truth about "You build it, you run it!"
The truth about "You build it, you run it!"The truth about "You build it, you run it!"
The truth about "You build it, you run it!"
 
Dr. Hectic and Mr. Hype - surviving the economic darwinism
Dr. Hectic and Mr. Hype - surviving the economic darwinismDr. Hectic and Mr. Hype - surviving the economic darwinism
Dr. Hectic and Mr. Hype - surviving the economic darwinism
 
How to survive in a BASE world
How to survive in a BASE worldHow to survive in a BASE world
How to survive in a BASE world
 
Fault tolerance made easy
Fault tolerance made easyFault tolerance made easy
Fault tolerance made easy
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Production-ready Software

  • 1. Production-ready software instead of just being “feature complete” Uwe Friedrichsen – codecentric AG – 2014-2016
  • 2. @ufried Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com
  • 4. Ops Dev Business IT value chain Customer feature complete production ready Work in progress Realized business value New business idea
  • 5. It‘s all about production!
  • 6. But before we talk about production …
  • 7. … let’s talk about DevOps briefly
  • 8. What is that DevOps thing anyway?
  • 9. Let’s check the “DevOps bible” http://itrevolution.com/books/phoenix-project-devops-book/
  • 10. DevOps in a nutshell
  • 11. The 3 ways of DevOps Systems thinking Amplify feedback loops Culture of continual experimentation & learning http://itrevolution.com/the-three-ways-principles-underpinning-devops/
  • 12. •  Maximize flow (minimize cycle times) •  Optimize for global goals (holistic view) •  Never pass defects downstream •  Limit work in progress •  Build systems and organizations that are safe to change Ops Dev Business IT value chain Customer Holistic optimization Systems thinking
  • 13. •  Facilitate constant flow of fast feedback from right-to-left •  Create quality at source (provide knowledge where needed) •  Create shared goals and shared pain between Dev and Ops •  Implement fast automated test suites •  Pervasively measure outcome (customer value), not output Ops Dev Business IT value chain Customer Amplify feedback loops
  • 14. •  Create a culture that fosters two things •  Continual experimentation, taking risks and learning from success and failure •  Understanding that repetition and practice is the prerequisite to mastery •  Allocate at least 20% of Dev and Ops cycles to NFRs •  Constantly reinforce that improvements are encouraged & celebrated Ops Dev Business IT value chain Customer Continual experimentation and learning
  • 15. If taken seriously DevOps will eventually rotate your IT organization by 90°
  • 16. Ops Dev IT value chain Businesscapabilities Specialistteam(e.g.,productmanager) Specialistteam(e.g.,UXexpert) Specialistteam(e.g.,developer) Specialistteam(e.g.,QAexpert) Specialistteam(e.g.,sysadmin) Specialistteam(e.g.,DBA) … Traditional IT organization
  • 17. Ops Dev IT value chain Businesscapabilities Cross-functional product team … DevOps IT organization Cross-functional product team Cross-functional product team Cross-functional product team
  • 18. Ops Dev IT value chain Businesscapabilities Cross-functional product team … DevOps IT organization (optimized) Cross-functional product team Cross-functional product team Cross-functional product team Platformteam API
  • 19. But that’s still a long way to go
 for many organizations …
  • 20. Amplify feedback loops •  Facilitate constant flow of fast feedback from right-to-left •  Create quality at source (provide knowledge where needed) •  Create shared goals and shared pain between Dev and Ops •  Implement fast automated test suites •  Pervasively measure outcome (customer value), not output Ops Dev Business IT value chain Customer Thus, we’ll focus on this feedback loop
  • 21. Let’s talk about operations …
  • 24. Admin Closer to Reality Point of View
  • 25. Top 5 Needs of an Admin 1.  Give me my peace and quiet! 2.  Don‘t make me think! 3.  Let me see that everything is fine! 4.  Show me the problem – now! 5.  Tell me what to do!
  • 26. Top 5 Needs of an Admin (translated) 1.  Give me my peace and quiet!
 (The application should just run smoothly) 2.  Don‘t make me think!
 (Rollout, setup and operation of the application should be easy) 3.  Let me see that everything is fine!
 (The application should show its state) 4.  Show me the problem – now!
 (The application should provide concise error messages and enable easy root cause drilldown) 5.  Tell me what to do!
 (The application should be documented properly – including error handling instructions)
  • 27. Top 3 Dev Challenges 1.  Manageability 2.  Resilience 3.  Transparency 4.  Documentation
  • 28. 11 Design Principles For production-ready Applications •  Manageability (4) •  Resilience (5) •  Transparency (2)
  • 31. •  One-click deployment •  Preserve settings •  Provide rollbacks or roll-forward •  Go for containers
  • 33. •  Avoid multiple configuration procedures •  Define default value handling •  Organize change traceability •  Notification about new parameters
  • 35. •  Context-related parameters
 Do not stage – managed by stage admin •  Application-related parameters
 Must be staged – managed by application admin •  Business-related parameters
 Must be staged – managed by business admin
  • 37. •  Think about backup purpose •  Define backup strategy •  Provide tooling •  What about backup in cloud environments?
  • 40. •  System must not fail as a whole •  Divide system in failure units (a.k.a. bulkheads) •  Avoid error propagation by isolating failure units •  Define fallback strategy
  • 42. •  Elaborate use case
 Minimize MTTR / avoid latency / handle response errors / … •  Define routing & distribution strategy
 Round robin / master-slave / fan-out & quickest one wins / … •  Consider admin involvement
 Automatic vs. manual / notification – monitoring / …
  • 44. •  Isolate failure units (complements bulkheads) •  Go asynchronous wherever possible •  Use timeouts & circuit breakers •  Make actions idempotent
  • 46. Timeouts (1) // Basics myObject.wait(); // Do not use this by default myObject.wait(TIMEOUT); // Better use this // Some more basics myThread.join(); // Do not use this by default myThread.join(TIMEOUT); // Better use this
  • 47. Timeouts (2) // Using the Java concurrent library Callable<MyActionResult> myAction = <My Blocking Action> ExecutorService executor = Executors.newSingleThreadExecutor(); Future<MyActionResult> future = executor.submit(myAction); MyActionResult result = null; try { result = future.get(); // Do not use this by default result = future.get(TIMEOUT, TIMEUNIT); // Better use this } catch (TimeoutException e) { // Only thrown if timeouts are used ... } catch (...) { ... }
  • 48. Timeouts (3) // Using Guava SimpleTimeLimiter Callable<MyActionResult> myAction = <My Blocking Action> SimpleTimeLimiter limiter = new SimpleTimeLimiter(); MyActionResult result = null; try { result = limiter.callWithTimeout(myAction, TIMEOUT, TIMEUNIT, false); } catch (UncheckedTimeoutException e) { ... } catch (...) { ... }
  • 50. Circuit Breaker – concept Client Resource Circuit Breaker Request Resource unavailable Resource available Closed Open Half-Open Lifecycle
  • 51.
  • 52. Implemented patterns •  Timeout •  Circuit breaker •  Load shedder •  Fallback
  • 53. Supported patterns •  Bulkheads
 (a.k.a. Failure Units) •  Fail fast •  Fail silently •  Graceful degradation of service •  Failover •  Escalation •  Retry •  ...
  • 55. // Hystrix “Hello world” public class HelloCommand extends HystrixCommand<String> { private static final String COMMAND_GROUP = ”Hello”; // Not important here private final String name; // Request parameters are passed in as constructor parameters public HelloCommand(String name) { super(HystrixCommandGroupKey.Factory.asKey(COMMAND_GROUP)); this.name = name; } @Override protected String run() throws Exception { // Usually here would be the resource call that needs to be guarded return "Hello, " + name; } } // Usage of a Hystrix command – synchronous variant @Test public void shouldGreetWorld() { String result = new HelloCommand("World").execute(); assertEquals("Hello, World", result); }
  • 58. •  What will you do if a request fails? •  Consider failure handling from the very beginning •  Supplement with general failure handling strategies
  • 60. •  Define scaling strategy •  Think full stack •  Design for elasticity •  At least apply D-I-D rule
  • 63. •  Think about required metrics •  Provide correlation Ids •  Design hook or event mechanism •  Plan for changing metrics
  • 65. •  Consider log message structure
 Assume centralized logging: required information / machine readable / human readable •  Define logging policy
 Debug and less: developers perspective / Info and more: operations perspective
  • 66. 11 Design Principles •  Manageability •  Deployment •  Configuration •  Configuration Parameter Types •  Backup •  Resilience •  Isolation •  Redundancy •  Loose Coupling •  Fallbacks •  Scalability •  Transparency •  Monitoring •  Logging
  • 67. Don’t forget to
 read the “bible” of production-ready software … https://pragprog.com/book/mnee/release-it
  • 68. Wrap-up •  The importance of “production readiness” •  The 3 ways of DevOps •  The needs of Ops •  The resulting challenges for Dev •  Design principles to support the needs •  Manageability •  Resilience •  Transparency
  • 69. It’s all about production!
  • 70. @ufried Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com