SlideShare a Scribd company logo
1 of 65
Download to read offline
VINCENT KOK • DEV MANAGER • ATLASSIAN • @VINCENTKOK
Microservices
5 things I wish I’d known
BUILDING MICROSERVICES
ISSUES
MOVING FORWARD
Agenda
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/fSopv4
You’ve got issues
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/7WcQwA
Slow down
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/bRgBZP
Lock up
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/bByin8
Technology will age
The promise of Microservices
Small Independent lifecycle ReplaceableRight tool
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/aSqP7p
Steep journey ahead
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/kENTD4
Fast forward to the top
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/kENTD4
http://images.clipartpanda.com/rainbow-unicorn-cute-tumblr_lj9cy4iZ821qdabzno1_r4_500.png
No silver bullet
Examples
Confluence
Connect
Conversion
Filestore
Identity
6+AvatarLogin
Build
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Build a pattern
https://flic.kr/p/8ykpkW
The Twelve
Factor App
XI. Logs
One codebase tracked in revision
control, many deploys
V. Build, release, run
Strictly separate build and run stages
I. Codebase
Treat logs as event streams
Anatomy of a service
Health check
200
!200
/healthcheck
{
"avatar": {
"details": {},
"isHealthy": true,
"metadata": {
"hash": "379965ce",
"name": "Avatar service",
"version": "2.0.8"
}
}
}
/healthcheck/details
{
"avatar": {
"details": {
"avatarRepository": {
"isHealthy": true
},
"crowd": {
"isHealthy": true
},
"deadlock": {
"isHealthy": true
1 Build1 Repository
For every service
One Bitbucket repository per service
From slow
MTTR
To fast and reliable
A slightly better MTTR
Configure
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/8prXA6
Prevent different lifecycles
Layered
layout
Common configuration per
environment
Per service
Common configuration per service
Per environment
Simple format
include "common.prod.conf"
include "service.conf"
http {
port = 8080
interface = "127.0.0.1"
}
recaptcha.key.site = "....."
recaptcha.enable = true
static.asset.base = "...."
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
No secrets
Deploy
DeployBuild and testCommit to master
Deployment pipeline
Release
Environments
Development Staging Production Disaster Recovery
Build and upload
Deployment projects take
care of the actual deployment
Create release from build
Build release information
Feedback per environment
Versioned release per environment
Test
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Isolation
https://flic.kr/p/dxUhia
PDVFunctional testsUnit tests
Test strategy
Contract tests
Functional tests
Stub Service mock
Stub sample
<beans profile="it">
<bean id="myClient" class=“com.mycompany.MyStub”/>
</beans>
WireMock sample
{
"request": {
"url": “/myresource",
"method": “POST”
"Accept": {
"matches": “application/json”
}
},
"response": {
"status": 204
}
}
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Consumer Driven
Contract Testing
https://flic.kr/p/9mjRKW
An example
Service A Service B
REST
Consumer Provider
Consumer expectation
uponReceiving("A request by user id for a user")
.matching(path = "/Users/1")
.willRespondWith(body = userByIdResponse)
.during { providerConfig =>
Client(providerConfig.url).get("/Users/1)
must beEqualTo(200, Some(userByIdResponse))
}
Consumer side
HTTP request
HTTP response
Client Service Mock PACT
Provider side
HTTP request
HTTP response
PACT PACT runner Provider
PACT Matrix
Consumer master Consumer prod
Provider master Latest compatible
Provider
Compatible
Provider prod
Consumer
Compatible
Already tested
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Post Deployment
Verification
https://flic.kr/p/6wHFj5
PDV
Development Staging Production Disaster Recovery
Operate
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
100 lbs
https://flic.kr/p/biy2an
99% of water
dehydrate to 98%
How much do they weigh now?
50lbs
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
What is the uptime of service
that depends on 30 services
with an uptime of 99.99?
https://flic.kr/p/51TYD1
99.99 = 99.7%
30
4m23
to
> 2h
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Know your system!
https://flic.kr/p/9b24xc
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Trace your requests
X-B3-TraceId : 1
X-B3-SpanId : 1
X-B3-TraceId : 1
X-B3-SpanId : 2
X-B3-ParentSpanId : 1
X-B3-TraceId : 1
X-B3-SpanId : 3
X-B3-ParentSpanId : 2
X-B3-TraceId : 1
X-B3-SpanId : 4
X-B3-ParentSpanId : 3
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
Moving forward
5 Things
• Big cool statistic
• 2,56
9
• Add-Ons in Marketplace
https://flic.kr/p/3Esx3o
More decisions to come
Thank you!
VINCENT KOK • DEV MANAGER • ATLASSIAN • @VINCENTKOK

More Related Content

Viewers also liked

Social Housing Company looking for partnership
Social Housing Company looking for partnershipSocial Housing Company looking for partnership
Social Housing Company looking for partnershipBaptiste Camus
 
Build Your Brand and Bottom Line through Blogging
Build Your Brand and Bottom Line through BloggingBuild Your Brand and Bottom Line through Blogging
Build Your Brand and Bottom Line through BloggingMarcie Hill, M.S.
 
The Power of Creative in Content Marketing
The Power of Creative in Content MarketingThe Power of Creative in Content Marketing
The Power of Creative in Content MarketingHightail
 
Presentación Julio Valente | Ideas en plena crisis
Presentación Julio Valente | Ideas en plena crisisPresentación Julio Valente | Ideas en plena crisis
Presentación Julio Valente | Ideas en plena crisisFederico Boero
 
Kalabagh dam
Kalabagh damKalabagh dam
Kalabagh damamna zia
 
REST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsREST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsJon Todd
 
Confluence of Broken Windows JavaOne 2016
Confluence of Broken Windows JavaOne 2016Confluence of Broken Windows JavaOne 2016
Confluence of Broken Windows JavaOne 2016Vincent Kok
 
The Hidden Costs of a Broken Creative Process
The Hidden Costs of a Broken Creative ProcessThe Hidden Costs of a Broken Creative Process
The Hidden Costs of a Broken Creative ProcessHightail
 
Sinais meningorradiculares
Sinais meningorradiculares Sinais meningorradiculares
Sinais meningorradiculares Paulo Alambert
 
Síndromes de vias biliares
Síndromes de vias biliaresSíndromes de vias biliares
Síndromes de vias biliarespauloalambert
 
Pneumonias adquiridas na comunidade
Pneumonias adquiridas na comunidadePneumonias adquiridas na comunidade
Pneumonias adquiridas na comunidadeFlávia Salame
 
History of pi
History of piHistory of pi
History of pipimath
 
Aula de Dermatopatologia
Aula de DermatopatologiaAula de Dermatopatologia
Aula de DermatopatologiaRaimundo Tostes
 

Viewers also liked (18)

Social Housing Company looking for partnership
Social Housing Company looking for partnershipSocial Housing Company looking for partnership
Social Housing Company looking for partnership
 
Calidad De Vida
Calidad De VidaCalidad De Vida
Calidad De Vida
 
Fasciola Hepatica
Fasciola HepaticaFasciola Hepatica
Fasciola Hepatica
 
Build Your Brand and Bottom Line through Blogging
Build Your Brand and Bottom Line through BloggingBuild Your Brand and Bottom Line through Blogging
Build Your Brand and Bottom Line through Blogging
 
SRP Communication & Brand Design at a glance
SRP Communication & Brand Design at a glanceSRP Communication & Brand Design at a glance
SRP Communication & Brand Design at a glance
 
The Power of Creative in Content Marketing
The Power of Creative in Content MarketingThe Power of Creative in Content Marketing
The Power of Creative in Content Marketing
 
Presentación Julio Valente | Ideas en plena crisis
Presentación Julio Valente | Ideas en plena crisisPresentación Julio Valente | Ideas en plena crisis
Presentación Julio Valente | Ideas en plena crisis
 
Training report
Training reportTraining report
Training report
 
Kalabagh dam
Kalabagh damKalabagh dam
Kalabagh dam
 
REST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsREST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTs
 
Confluence of Broken Windows JavaOne 2016
Confluence of Broken Windows JavaOne 2016Confluence of Broken Windows JavaOne 2016
Confluence of Broken Windows JavaOne 2016
 
Hipertension portal
Hipertension portalHipertension portal
Hipertension portal
 
The Hidden Costs of a Broken Creative Process
The Hidden Costs of a Broken Creative ProcessThe Hidden Costs of a Broken Creative Process
The Hidden Costs of a Broken Creative Process
 
Sinais meningorradiculares
Sinais meningorradiculares Sinais meningorradiculares
Sinais meningorradiculares
 
Síndromes de vias biliares
Síndromes de vias biliaresSíndromes de vias biliares
Síndromes de vias biliares
 
Pneumonias adquiridas na comunidade
Pneumonias adquiridas na comunidadePneumonias adquiridas na comunidade
Pneumonias adquiridas na comunidade
 
History of pi
History of piHistory of pi
History of pi
 
Aula de Dermatopatologia
Aula de DermatopatologiaAula de Dermatopatologia
Aula de Dermatopatologia
 

Similar to Microservices 5 things i wish i'd known

5 Things I Wish I'd Known about Microservices
5 Things I Wish I'd Known about Microservices5 Things I Wish I'd Known about Microservices
5 Things I Wish I'd Known about MicroservicesAtlassian
 
Releasing the Monolith On a Daily Basis
Releasing the Monolith On a Daily BasisReleasing the Monolith On a Daily Basis
Releasing the Monolith On a Daily BasisAtlassian
 
Releasing the monolith on a daily basis - CodeMash
Releasing the monolith on a daily basis - CodeMashReleasing the monolith on a daily basis - CodeMash
Releasing the monolith on a daily basis - CodeMashVincent Kok
 
Dev opstalks 2018 releasing the monolith on a daily basis
Dev opstalks 2018   releasing the monolith on a daily basisDev opstalks 2018   releasing the monolith on a daily basis
Dev opstalks 2018 releasing the monolith on a daily basisVincent Kok
 
Accelerating Add-on Development From Concept to Launch
Accelerating Add-on Development From Concept to LaunchAccelerating Add-on Development From Concept to Launch
Accelerating Add-on Development From Concept to LaunchAtlassian
 
Top 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerTop 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerAnna Lewis
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and PracticesLaunchAny
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScalePatrick Chanezon
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for LaunchCraig Phares
 
Google Analytics New Features - Webinar - 20091030
Google Analytics New Features - Webinar - 20091030Google Analytics New Features - Webinar - 20091030
Google Analytics New Features - Webinar - 20091030Vinoaj Vijeyakumaar
 
Introduction to the Connected Business
Introduction to the Connected Business Introduction to the Connected Business
Introduction to the Connected Business WSO2
 
Migration of Two Million Records with Zero Downtime for a Global Financial Or...
Migration of Two Million Records with Zero Downtime for a Global Financial Or...Migration of Two Million Records with Zero Downtime for a Global Financial Or...
Migration of Two Million Records with Zero Downtime for a Global Financial Or...Kovair
 
SHARE 2014, Pittsburgh Using policies to manage critical cics resources
SHARE 2014, Pittsburgh Using policies to manage critical cics resourcesSHARE 2014, Pittsburgh Using policies to manage critical cics resources
SHARE 2014, Pittsburgh Using policies to manage critical cics resourcesnick_garrod
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreTom Gersic
 
Engage 2013 - Flexible Data Access with APIs
Engage 2013 - Flexible Data Access with APIsEngage 2013 - Flexible Data Access with APIs
Engage 2013 - Flexible Data Access with APIsWebtrends
 
Performance Engineering - how to start!
Performance Engineering - how to start!Performance Engineering - how to start!
Performance Engineering - how to start!Yoav Weiss
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureJeremy Likness
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful APIChris Haddad
 
Six Steps to Build Successful APIs
Six Steps to Build Successful APIsSix Steps to Build Successful APIs
Six Steps to Build Successful APIsWSO2
 

Similar to Microservices 5 things i wish i'd known (20)

5 Things I Wish I'd Known about Microservices
5 Things I Wish I'd Known about Microservices5 Things I Wish I'd Known about Microservices
5 Things I Wish I'd Known about Microservices
 
Releasing the Monolith On a Daily Basis
Releasing the Monolith On a Daily BasisReleasing the Monolith On a Daily Basis
Releasing the Monolith On a Daily Basis
 
Releasing the monolith on a daily basis - CodeMash
Releasing the monolith on a daily basis - CodeMashReleasing the monolith on a daily basis - CodeMash
Releasing the monolith on a daily basis - CodeMash
 
Dev opstalks 2018 releasing the monolith on a daily basis
Dev opstalks 2018   releasing the monolith on a daily basisDev opstalks 2018   releasing the monolith on a daily basis
Dev opstalks 2018 releasing the monolith on a daily basis
 
Accelerating Add-on Development From Concept to Launch
Accelerating Add-on Development From Concept to LaunchAccelerating Add-on Development From Concept to Launch
Accelerating Add-on Development From Concept to Launch
 
Top 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag ManagerTop 10 Tips for Google Tag Manager
Top 10 Tips for Google Tag Manager
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and ScaleGDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
GDD Japan 2009 - Designing OpenSocial Apps For Speed and Scale
 
Bootstrapping an App for Launch
Bootstrapping an App for LaunchBootstrapping an App for Launch
Bootstrapping an App for Launch
 
Google Analytics New Features - Webinar - 20091030
Google Analytics New Features - Webinar - 20091030Google Analytics New Features - Webinar - 20091030
Google Analytics New Features - Webinar - 20091030
 
Introduction to the Connected Business
Introduction to the Connected Business Introduction to the Connected Business
Introduction to the Connected Business
 
Migration of Two Million Records with Zero Downtime for a Global Financial Or...
Migration of Two Million Records with Zero Downtime for a Global Financial Or...Migration of Two Million Records with Zero Downtime for a Global Financial Or...
Migration of Two Million Records with Zero Downtime for a Global Financial Or...
 
SHARE 2014, Pittsburgh Using policies to manage critical cics resources
SHARE 2014, Pittsburgh Using policies to manage critical cics resourcesSHARE 2014, Pittsburgh Using policies to manage critical cics resources
SHARE 2014, Pittsburgh Using policies to manage critical cics resources
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
 
Engage 2013 - Flexible Data Access with APIs
Engage 2013 - Flexible Data Access with APIsEngage 2013 - Flexible Data Access with APIs
Engage 2013 - Flexible Data Access with APIs
 
Performance Engineering - how to start!
Performance Engineering - how to start!Performance Engineering - how to start!
Performance Engineering - how to start!
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Code first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with AzureCode first in the cloud: going serverless with Azure
Code first in the cloud: going serverless with Azure
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
 
Six Steps to Build Successful APIs
Six Steps to Build Successful APIsSix Steps to Build Successful APIs
Six Steps to Build Successful APIs
 

More from Vincent Kok

Tales of modernizing trello's web stack
Tales of modernizing trello's web stackTales of modernizing trello's web stack
Tales of modernizing trello's web stackVincent Kok
 
Why you're failing your remote workers - DWSC18
Why you're failing your remote workers - DWSC18Why you're failing your remote workers - DWSC18
Why you're failing your remote workers - DWSC18Vincent Kok
 
Microservices 5 things i wish i'd known java with the best 2018
Microservices 5 things i wish i'd known   java with the best 2018Microservices 5 things i wish i'd known   java with the best 2018
Microservices 5 things i wish i'd known java with the best 2018Vincent Kok
 
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017Vincent Kok
 
Microservices 5 Things I Wish I'd Known - JFall 2017
Microservices 5 Things I Wish I'd Known - JFall 2017Microservices 5 Things I Wish I'd Known - JFall 2017
Microservices 5 Things I Wish I'd Known - JFall 2017Vincent Kok
 
Need to-know patterns building microservices - java one
Need to-know patterns building microservices - java oneNeed to-know patterns building microservices - java one
Need to-know patterns building microservices - java oneVincent Kok
 
Microservices 5 things i wish i'd known code motion
Microservices 5 things i wish i'd known   code motionMicroservices 5 things i wish i'd known   code motion
Microservices 5 things i wish i'd known code motionVincent Kok
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring BootVincent Kok
 
Irina Winterreis 2011
Irina Winterreis 2011Irina Winterreis 2011
Irina Winterreis 2011Vincent Kok
 
Irina Winterreis 2011
Irina Winterreis 2011Irina Winterreis 2011
Irina Winterreis 2011Vincent Kok
 

More from Vincent Kok (10)

Tales of modernizing trello's web stack
Tales of modernizing trello's web stackTales of modernizing trello's web stack
Tales of modernizing trello's web stack
 
Why you're failing your remote workers - DWSC18
Why you're failing your remote workers - DWSC18Why you're failing your remote workers - DWSC18
Why you're failing your remote workers - DWSC18
 
Microservices 5 things i wish i'd known java with the best 2018
Microservices 5 things i wish i'd known   java with the best 2018Microservices 5 things i wish i'd known   java with the best 2018
Microservices 5 things i wish i'd known java with the best 2018
 
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
Microservices: 5 Things I Wish I'd Known - Code Motion Milan 2017
 
Microservices 5 Things I Wish I'd Known - JFall 2017
Microservices 5 Things I Wish I'd Known - JFall 2017Microservices 5 Things I Wish I'd Known - JFall 2017
Microservices 5 Things I Wish I'd Known - JFall 2017
 
Need to-know patterns building microservices - java one
Need to-know patterns building microservices - java oneNeed to-know patterns building microservices - java one
Need to-know patterns building microservices - java one
 
Microservices 5 things i wish i'd known code motion
Microservices 5 things i wish i'd known   code motionMicroservices 5 things i wish i'd known   code motion
Microservices 5 things i wish i'd known code motion
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring Boot
 
Irina Winterreis 2011
Irina Winterreis 2011Irina Winterreis 2011
Irina Winterreis 2011
 
Irina Winterreis 2011
Irina Winterreis 2011Irina Winterreis 2011
Irina Winterreis 2011
 

Microservices 5 things i wish i'd known