SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Java, Microservices, Cloud and Containers:
Migrating without the Tiers (or Tears)
Daniel Bryant @danielbryantuk
Steve Poole @spoole167
22/09/2016 @danielbryantuk | @spoole167 1
The pitch
• Moving to the cloud requires a fundamental change in mindset
• Technology
• Skills (architectural, operational, QA)
• Organisational design
• DevOps, container technology and microservices are complementary
• Migrating in non-trivial
• Learn from some of our successes (and mistakes)…
22/09/2016 @danielbryantuk | @spoole167 2
Who are we?
22/09/2016 @danielbryantuk | @spoole167 3
Steve Poole
IBM
Developer
@spoole167
Daniel Bryant
Chief Scientist,
OpenCredo
CTO SpectoLabs
@danielbryantuk
Making Java Real Since Version 0.9
Open Source Advocate
DevOps Practitioner (whatever that means!)
Driving Change
“Biz-dev-QA-ops”
Leading change in organisations
Experience of Docker, k8s, Go, Java
InfoQ, DZone, Voxxed contributor
Introduction
22/09/2016 @danielbryantuk | @spoole167 4
What ‘Cloud’ promises
a virtual, dynamic environment which
maximizes use, is infinitely scalable, always
available and needs minimal upfront
investment or commitment
Take your code – host it on someone else's
machine pay only for the resource you use for the
time you use it AND be able to do that very quickly
and repeatedly in parallel
https://www.flickr.com/photos/skohlmann/
The ability to have ‘cloud burst’ capacity is
changing the way software is being designed,
developed and supported
We’re moving to a more industrial scale:
Why buy one computer for a year when you
can hire 365 computers for a day..
https://www.flickr.com/photos/vuhung/
“Compute on demand” – it’s what we always
wanted
Cloud computing:
compute == money
Money changes everything
With a measureable and direct relationship
between $£€¥ and CPU/RAM, disk etc the
financial success or failure of a project is
even easier to see
And that means…
Even more focus on value for money.
American Society of Civil Engineers
Someone
will be
looking at
your leaky
app
Loosing unnecessary baggage - (you have loads)
Java applications have to get lighter.
Java 9 modularity will help but you have to consider
footprint across the board.
Choose your dependencies wisely
Your choice of OS & distribution is important.
The aim is ‘carry on only’
Your application isn’t going on a long trip
https://www.flickr.com/photos/armydre2008/
Startup times
How long do you want to wait?
How long do you have to wait?
Do you need to preemptively start instances ‘just in case’ due
to start up time? To bad – that costs
If the unit of deployment and scaling is an instance of a service
it needs to start FAST
https://www.flickr.com/photos/91295117@N08/
https://www.flickr.com/photos/isherwoodchris/
• Q: How much RAM does
your application use?
• A: Too much
Runtime costs
Most cloud providers will charge you for your RAM usage over time:
$GB/hr. (Sometimes the charge is $0)
Increasing –Xmx directly effects cost. Something businesses can
understand
Net effect : you’ll be tuning your application to fit into specific RAM sizes.
Smaller than you use today.
You need to measure where the storage goes.
You’ll be picking some components based on memory usage
Note that increasing the amount of memory for 1 service increases the bill
by the number of concurrent instances
https://www.flickr.com/photos/erix/
Simply
Java applications are going to be running
in a remote, constrained and metered
environment
There will be precise limits on how much
disk, CPU, RAM, Bandwidth an application
can use and for how long
Whether your application is large or small,
granular or monolithic. Someone will be
paying for each unit used
That person will want to get the most out
of that investment
https://www.flickr.com/photos/rvoegtli/
Where you code runs day-to-day and moment-to-
moment will be driven by economics, legal
requirements and how much risk your business
wants to take.
Your code has to scale better, be more efficient,
resilient, secure and work in constrained
environments
You will have to design, code, deliver, support and
debug code in new ways
It’s going to be scary
How scary?
design, coding, deployment ,
startup, execution, scaling
debugging, security, resilience …
Almost everything
about your
application is
effected
https://www.flickr.com/photos/mjtmail/
Resilient
applications
Design for short term failure: something fails all the time. Expect data and service outages regularly
Fail and recover: don’t diagnose problems in running systems. Kill it and move on
Every IO operation you perform may fail – do as few as possible
Every IO operation may stall – costing you GB/hrs and resources– timeout everything quickly
Every piece of data you receive may be badly formed – check everything
Retry, compensation, backout strategies– these are your new friends
“Everything in the cloud
fails all the time” : Werner
Vogels
Debugging
Remote support for your family?
Fancy having to do that for your own apps?
You have to assume:
You will never be able to log into a remote server.
You will never be able to attach a remote debugger to
a failing app
Ever.
All problems must be resolved by local reproduction
or logs and dumps (discuss)
https://www.flickr.com/photos/carbonnyc/
Debugging
It gets more challenging.
Failures during deployment
or initial startup can be difficult or impossible to
diagnose.
If your service instance didn’t start there is is little
chance of logs being kept!
Learn to love logs, dumps and traces.
Remote log stores and tools are going to be your best
friend
BTW: they’ll cost too
https://www.flickr.com/photos/hinkelstone/
Security
When you deploy to public cloud your system will be
attacked in minutes.
Certainly in < 1hr
Your systems will always be under threat
https://www.flickr.com/photos/ahmadhammoudphotography/
It’s all change
How you design, code, deploy, debug,
support etc will be effected by the metrics
and limits imposed on you.
Financial metrics and limits always
change behavior. It also creates
opportunity
Java applications have to get leaner and
meaner
You have to learn new techniques and
tools
https://www.flickr.com/photos/beigephotos/
Case studies
22/09/2016 @danielbryantuk | @spoole167 22
“Just make it do what the old one does (but better)”
• Case studies
• ‘Teflon shouldered’ product owner
• Rebuilding a service three times
• Problem
• Performing migration without a
clear definition of ‘done’
• Accepting feature creep
22/09/2016 @danielbryantuk | @spoole167 23
“Just make it do what the old one does (but better)”
• Attempt to retrofit BDD/regression tests around application
• Serenity BDD, Cucumber, Jbehave
• Work incrementally with QA team
• Manually test everything
• Create tests for new functionality
• Compare input/output
• Traffic: Twitter’s Diffy
• Datastores: Reconsiliator pattern
22/09/2016 @danielbryantuk | @spoole167 24
Twitter’s Diffy and mysqldbcompare
22/09/2016 @danielbryantuk | @spoole167 25
blog.twitter.com/2015/diffy-testing-services-without-writing-tests dev.mysql.com/doc/mysql-utilities/1.5/en/mysqldbcompare.html
www.infoq.com/news/2015/04/raffi-krikorian-rearchitecting
My ‘re-architecting’ bible…
22/09/2016 @danielbryantuk | @spoole167 26
“Bounding the context”
• Case studies
• Large business software provider
thought they knew their domain
• Small CRM company had let
domain model entropy
• Problem
• Development team lost sight of
the application big picture
• Lack of architectural awareness
and ‘broken windows’
22/09/2016 @danielbryantuk | @spoole167 27
Context mapping (static) & event storming (dynamic)
22/09/2016 @danielbryantuk | @spoole167 28
www.infoq.com/articles/ddd-contextmapping
ziobrando.blogspot.co.uk/2013/11/introducing-event-storming.html
“Bounding the context”
• Create ‘seams’ within codebase
• Natural domain boundaries
• Single responsibility principle
• Look for points of ‘friction’
• Extreme ownership
• Seize (identify)
• Clear (refactor logic / data)
• Hold (metrics and rachets)
• Build (move code to service)
22/09/2016 @danielbryantuk | @spoole167 29
“How small is micro?”
• Case studies
• UK retailer looking to migrate to
cloud and microservices
• Keen to minimise risk
• Problem
• Previous attempts of gradual
migration had failed
• Integration issues - services either
too big or too small
• Spent a long time building a
‘microservice platform’
22/09/2016 @danielbryantuk | @spoole167 30
“How small is micro?”
• Understand microservice principles and Self-Contained Systems (SCS)
• Utilise the strangler pattern
• ‘Service Virtualisation’ is valuable for testing
• Don’t underestimate the value of PaaS
22/09/2016 @danielbryantuk | @spoole167 31
22/09/2016 @danielbryantuk | @spoole167 32
zeroturnaround.com/rebellabs/microservices-for-the-enterprise/
Self-contained systems (SCS)
22/09/2016 @danielbryantuk | @spoole167 33
http://scs-architecture.org/
UI / Biz / Repo
Monolith
Domains
Modules, components,
frameworks, libraries
Self-contained systems (SCS)
22/09/2016 @danielbryantuk | @spoole167 34
SCS
Microservices
Strangling your software (not your manager!)
22/09/2016 @danielbryantuk | @spoole167 35
paulhammant.com/2013/07/14/legacy-application-strangulation-case-studies/
www.nginx.com/blog/refactoring-a-monolith-into-microservices/
Service Virtualisation (for Dev and Test)
• Existing tooling
• Hoverfly
• Wiremock
• VCR/Betamax
• Mountebank
• mirage
22/09/2016 @danielbryantuk | @spoole167 36
Hoverfly
• Lightweight Service virtualisation
• Open source (Apache 2.0)
• Go-based / single binary
• Written by @Spectolabs
• Flexible API simulation
• HTTP / HTTPS
• More Protocols to follow?
22/09/2016 @danielbryantuk | @spoole167 37
22/09/2016 @danielbryantuk | @spoole167 38
• Middleware
• Remove PII
• Rate limit
• Add headers
• Middleware
• Fault injection
• Chaos monkey
The value of PaaS…
22/09/2016 @danielbryantuk | @spoole167 39
The value of PaaS…
22/09/2016 @danielbryantuk | @spoole167 40
“Cloud native or ‘lift and shift’”
• Case studies
• Price comparison website
performance dipped upon a
migration to the cloud
• Problems
• Not coding for distributed or
ephemeral nature of cloud
• No reliable creation of cloud
environment
• Not testing in the cloud
22/09/2016 @danielbryantuk | @spoole167 41
“Cloud native or ‘lift and shift’”
• Push apps through to production as early as possible (CI/CD)
• Build POCs appropriately
• Include building infrastructure in the pipeline
• Include NFR testing in the build pipeline
• Dev, QA and Ops must cultivate ‘mechanical sympathy’
• Everything in the cloud is networked
• Configure local development environments as appropriate
22/09/2016 @danielbryantuk | @spoole167 42
NFR testing in the (cloud) pipeline
22/09/2016 @danielbryantuk | @spoole167 43
NFRs testing in the (container) pipeline
22/09/2016 @danielbryantuk | @spoole167 44
NFR testing resources
• Performance
• JMeter
• Gatling
• Fault-tolerance
• Hoverfly
• Wiremock/Saboteur
• Security
• bdd-security (OWASP ZAP)
• OWASP Dependency-Check
• Docker Bench for Security
22/09/2016 @danielbryantuk | @spoole167 45
Security is vital (but often ignored)
22/09/2016 @danielbryantuk | @spoole167 46
www.youtube.com/watch?v=c9uvV4ChIXw
www.infoq.com/news/2016/08/secure-docker-microservices
Shameless plugs…
22/09/2016 @danielbryantuk | @spoole167 47
www.youtube.com/watch?v=A1982GdXXSA
“Containerise all the things”
• Problem
• JVM respecting resource limits
• OOM: Unable to create thread
• Random application stalling
• Case studies
• www.notonthehighstreet.com
22/09/2016 @danielbryantuk | @spoole167 48
“Containerise all the things”
• Set container memory appropriately
• docker - - memory=”Xg”
• JVM requirements = Heap size (Xmx) + Metaspace + JVM overhead
• Account for native thread requirements e.g. thread stack size (Xss)
• Watch out for ulimits
• Entropy
• Host entropy can soon be exhausted by crypto operations
• –Djava.security.egd=file:/dev/urandom
• Be aware of security ramifications
22/09/2016 @danielbryantuk | @spoole167 49
Containerising our knowledge
22/09/2016 @danielbryantuk | @spoole167 50
Key lessons learned
22/09/2016 @danielbryantuk | @spoole167 51
Lessons learned from the trenches
• Specify goals and targets of migration (and retrospect)
• Undertake just enough up front design (contexts, APIs, integration)
• Understand distributed systems (12 factors etc)
• Start pushing to production ASAP
• There is nothing wrong with PaaS
• Programmable infrastructure is a key enabler
• Don’t forget the NFRs
• Containers and microservices are complementary to cloud
22/09/2016 @danielbryantuk | @spoole167 52
Recommended reading
22/09/2016 @danielbryantuk | @spoole167 53
Thanks for listening
• Any questions?
• Daniel Bryant (@danielbryantuk )
• Steve Pool (@spoole167)
22/09/2016 @danielbryantuk | @spoole167 54

Weitere ähnliche Inhalte

Was ist angesagt?

LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...
LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...
LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...
Daniel Bryant
 

Was ist angesagt? (20)

DevoxxUK 2015 "The Seven Deadly Sins of Microservices (Full Version)"
DevoxxUK 2015 "The Seven Deadly Sins of Microservices (Full Version)"DevoxxUK 2015 "The Seven Deadly Sins of Microservices (Full Version)"
DevoxxUK 2015 "The Seven Deadly Sins of Microservices (Full Version)"
 
Haufe #msaday: "Building a Microservice Ecosystem"
Haufe #msaday: "Building a Microservice Ecosystem"Haufe #msaday: "Building a Microservice Ecosystem"
Haufe #msaday: "Building a Microservice Ecosystem"
 
J1 2015 "Thinking Fast and Slow with Software Development"
J1 2015 "Thinking Fast and Slow with Software Development"J1 2015 "Thinking Fast and Slow with Software Development"
J1 2015 "Thinking Fast and Slow with Software Development"
 
Microservices: The Organizational and People Impact
Microservices: The Organizational and People ImpactMicroservices: The Organizational and People Impact
Microservices: The Organizational and People Impact
 
BCS 2016 "Intro to Microservices (and the Seven Deadly Sins)"
BCS 2016 "Intro to Microservices (and the Seven Deadly Sins)"BCS 2016 "Intro to Microservices (and the Seven Deadly Sins)"
BCS 2016 "Intro to Microservices (and the Seven Deadly Sins)"
 
ACCU16 "Let's Not Repeat the Mistakes of SOA: 'Micro' Services, Macro Organis...
ACCU16 "Let's Not Repeat the Mistakes of SOA: 'Micro' Services, Macro Organis...ACCU16 "Let's Not Repeat the Mistakes of SOA: 'Micro' Services, Macro Organis...
ACCU16 "Let's Not Repeat the Mistakes of SOA: 'Micro' Services, Macro Organis...
 
OOP/MM 2017: "Seven (More) Deadly Sins of Microservices"
OOP/MM 2017: "Seven (More) Deadly Sins of Microservices"OOP/MM 2017: "Seven (More) Deadly Sins of Microservices"
OOP/MM 2017: "Seven (More) Deadly Sins of Microservices"
 
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
 
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
 
LJC 2015 "The Crafty Consultants Guide to DevOps"
LJC 2015 "The Crafty Consultants Guide to DevOps"LJC 2015 "The Crafty Consultants Guide to DevOps"
LJC 2015 "The Crafty Consultants Guide to DevOps"
 
ZTLive 2016 "Introduction to Microservices"
ZTLive 2016 "Introduction to Microservices"ZTLive 2016 "Introduction to Microservices"
ZTLive 2016 "Introduction to Microservices"
 
LJC: "Chuck Norris Doesn't Do DevOps...but Java developers might benefit"
LJC: "Chuck Norris Doesn't Do DevOps...but Java developers might benefit"LJC: "Chuck Norris Doesn't Do DevOps...but Java developers might benefit"
LJC: "Chuck Norris Doesn't Do DevOps...but Java developers might benefit"
 
JavaOne 2014: Cloud Developer's DHARMA: Redefining 'done' for Cloud applications
JavaOne 2014: Cloud Developer's DHARMA: Redefining 'done' for Cloud applicationsJavaOne 2014: Cloud Developer's DHARMA: Redefining 'done' for Cloud applications
JavaOne 2014: Cloud Developer's DHARMA: Redefining 'done' for Cloud applications
 
ContainerSched 2015 "Our journey to world (gifting) domination - how notonthe...
ContainerSched 2015 "Our journey to world (gifting) domination - how notonthe...ContainerSched 2015 "Our journey to world (gifting) domination - how notonthe...
ContainerSched 2015 "Our journey to world (gifting) domination - how notonthe...
 
LSCC 2014 "Crafting DevOps: Applying Software Craftsmanship to DevOps"
LSCC 2014 "Crafting DevOps: Applying Software Craftsmanship to DevOps"LSCC 2014 "Crafting DevOps: Applying Software Craftsmanship to DevOps"
LSCC 2014 "Crafting DevOps: Applying Software Craftsmanship to DevOps"
 
LJC 05/14 "Cloud Developer's DHARMA"
LJC 05/14 "Cloud Developer's DHARMA"LJC 05/14 "Cloud Developer's DHARMA"
LJC 05/14 "Cloud Developer's DHARMA"
 
LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...
LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...
LJC Mashup "Building Java Microservices for the Cloud && Chuck Norris Doesn't...
 
GOTO Chicago/CraftConf 2017 "The Seven (More) Deadly Sins of Microservices"
GOTO Chicago/CraftConf 2017 "The Seven (More) Deadly Sins of Microservices"GOTO Chicago/CraftConf 2017 "The Seven (More) Deadly Sins of Microservices"
GOTO Chicago/CraftConf 2017 "The Seven (More) Deadly Sins of Microservices"
 
CraftConf 2017 "Microservices: The Organisational and People Impact"
CraftConf 2017 "Microservices: The Organisational and People Impact"CraftConf 2017 "Microservices: The Organisational and People Impact"
CraftConf 2017 "Microservices: The Organisational and People Impact"
 
Microservices - Scaling Development and Service
Microservices - Scaling Development and ServiceMicroservices - Scaling Development and Service
Microservices - Scaling Development and Service
 

Andere mochten auch

CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...
CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...
CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...
Daniel Bryant
 

Andere mochten auch (13)

MicroManchester 2016 "A Brief Guide to Microservices"
MicroManchester 2016 "A Brief Guide to Microservices"MicroManchester 2016 "A Brief Guide to Microservices"
MicroManchester 2016 "A Brief Guide to Microservices"
 
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
 
MicroManchester 2016 "Microservices from 30000ft: Organisation, Architecture ...
MicroManchester 2016 "Microservices from 30000ft: Organisation, Architecture ...MicroManchester 2016 "Microservices from 30000ft: Organisation, Architecture ...
MicroManchester 2016 "Microservices from 30000ft: Organisation, Architecture ...
 
CTOs in London "The Challenges of Evaluating Development Technology Within th...
CTOs in London "The Challenges of Evaluating Development Technology Within th...CTOs in London "The Challenges of Evaluating Development Technology Within th...
CTOs in London "The Challenges of Evaluating Development Technology Within th...
 
CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...
CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...
CraftConf [Preview] "Empathy - The Hidden Ingredient of Good Software Develop...
 
The London Web "Empathy - The Hidden Ingredient of Good Software Development"
The London Web "Empathy - The Hidden Ingredient of Good Software Development"The London Web "Empathy - The Hidden Ingredient of Good Software Development"
The London Web "Empathy - The Hidden Ingredient of Good Software Development"
 
The Java memory model made easy
The Java memory model made easyThe Java memory model made easy
The Java memory model made easy
 
Microservice Summit 2016 "Microservices: The Organisational and People Impact"
Microservice Summit 2016 "Microservices: The Organisational and People Impact"Microservice Summit 2016 "Microservices: The Organisational and People Impact"
Microservice Summit 2016 "Microservices: The Organisational and People Impact"
 
Devternity 2016 "Thinking Fast and Slow with Software Development"
Devternity 2016 "Thinking Fast and Slow with Software Development"Devternity 2016 "Thinking Fast and Slow with Software Development"
Devternity 2016 "Thinking Fast and Slow with Software Development"
 
DevOpsNorth 2017 "Seven (More) Deadly Sins of Microservices"
DevOpsNorth 2017 "Seven (More) Deadly Sins of Microservices"DevOpsNorth 2017 "Seven (More) Deadly Sins of Microservices"
DevOpsNorth 2017 "Seven (More) Deadly Sins of Microservices"
 
microXchg 2017: "Microservices: The People and Organisational Impact"
microXchg 2017: "Microservices: The People and Organisational Impact"microXchg 2017: "Microservices: The People and Organisational Impact"
microXchg 2017: "Microservices: The People and Organisational Impact"
 
Why You Should Care About ALS @slidecomet @itseugenec
Why You Should Care About ALS @slidecomet @itseugenecWhy You Should Care About ALS @slidecomet @itseugenec
Why You Should Care About ALS @slidecomet @itseugenec
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 

Ähnlich wie JavaOne 2016 "Java, Microservices, Cloud and Containers"

DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
JAXLondon_Conference
 
All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...
JAXLondon_Conference
 
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and MicroservicesRedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
Redis Labs
 
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
Cloud-Native Fundamentals: Accelerating Development with Continuous IntegrationCloud-Native Fundamentals: Accelerating Development with Continuous Integration
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
VMware Tanzu
 

Ähnlich wie JavaOne 2016 "Java, Microservices, Cloud and Containers" (20)

Cloud Economics for Java at Java2Days
Cloud Economics for Java at Java2DaysCloud Economics for Java at Java2Days
Cloud Economics for Java at Java2Days
 
Evolving to Cloud-Native - Nate Schutta (2/2)
Evolving to Cloud-Native - Nate Schutta (2/2)Evolving to Cloud-Native - Nate Schutta (2/2)
Evolving to Cloud-Native - Nate Schutta (2/2)
 
Evolving to Cloud-Native - Nate Schutta 2/2
Evolving to Cloud-Native - Nate Schutta 2/2Evolving to Cloud-Native - Nate Schutta 2/2
Evolving to Cloud-Native - Nate Schutta 2/2
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
 
From Monoliths to Services: Paying Your Technical Debt
From Monoliths to Services: Paying Your Technical DebtFrom Monoliths to Services: Paying Your Technical Debt
From Monoliths to Services: Paying Your Technical Debt
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
 
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
 
Cloud Economics
Cloud EconomicsCloud Economics
Cloud Economics
 
The Future of Cloud Innovation, featuring Adrian Cockcroft
The Future of Cloud Innovation, featuring Adrian CockcroftThe Future of Cloud Innovation, featuring Adrian Cockcroft
The Future of Cloud Innovation, featuring Adrian Cockcroft
 
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
Cloud-Native Fundamentals: An Introduction to 12-Factor ApplicationsCloud-Native Fundamentals: An Introduction to 12-Factor Applications
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
 
All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...All change! How the new Economics of Cloud will make you think differently ab...
All change! How the new Economics of Cloud will make you think differently ab...
 
Measure and Increase Developer Productivity with Help of Serverless at Server...
Measure and Increase Developer Productivity with Help of Serverless at Server...Measure and Increase Developer Productivity with Help of Serverless at Server...
Measure and Increase Developer Productivity with Help of Serverless at Server...
 
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and MicroservicesRedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
RedisConf18 - Common Redis Use Cases for Cloud Native Apps and Microservices
 
The End of Security as We Know It - Shannon Lietz
The End of Security as We Know It - Shannon LietzThe End of Security as We Know It - Shannon Lietz
The End of Security as We Know It - Shannon Lietz
 
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
Cloud-Native Fundamentals: Accelerating Development with Continuous IntegrationCloud-Native Fundamentals: Accelerating Development with Continuous Integration
Cloud-Native Fundamentals: Accelerating Development with Continuous Integration
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
 
Securing a Cloud Migration
Securing a Cloud MigrationSecuring a Cloud Migration
Securing a Cloud Migration
 
Securing a Cloud Migration
Securing a Cloud MigrationSecuring a Cloud Migration
Securing a Cloud Migration
 

Mehr von Daniel Bryant

Mehr von Daniel Bryant (20)

ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API GatewaysITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
ITKonekt 2023: The Busy Platform Engineers Guide to API Gateways
 
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
CraftConf 2023 "Microservice Testing Techniques: Mocks vs Service Virtualizat...
 
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
 
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
Java Meetup 23: 'Debugging Microservices "Remocally" in Kubernetes with Telep...
 
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
DevRelCon 2022: "Is Product Led Growth (PLG) the “DevOps” of the DevRel World"
 
Fall 22: "From Kubernetes to PaaS to... err, what's next"
Fall 22: "From Kubernetes to PaaS to... err, what's next"Fall 22: "From Kubernetes to PaaS to... err, what's next"
Fall 22: "From Kubernetes to PaaS to... err, what's next"
 
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
Building Microservice Systems Without Cooking Your Laptop: Going “Remocal” wi...
 
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
KubeCrash 22: Debugging Microservices "Remocally" in Kubernetes with Telepres...
 
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
JAX London 22: Debugging Microservices "Remocally" in Kubernetes with Telepre...
 
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
CloudBuilders 2022: "The Past, Present, and Future of Cloud Native API Gateways"
 
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
KubeCon EU 2022: From Kubernetes to PaaS to Err What's NextKubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
KubeCon EU 2022: From Kubernetes to PaaS to Err What's Next
 
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
Devoxx UK 22: Debugging Java Microservices "Remocally" in Kubernetes with Tel...
 
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
 
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
JAX London 2021: Jumpstart Your Cloud Native Development: An Overview of Prac...
 
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
 
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
 
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
MJC 2021: "Debugging Java Microservices Running on Kubernetes with Telepresence"
 
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
 
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
GOTOpia 2/2021 "Cloud Native Development Without the Toil: An Overview of Pra...
 
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
HashiCorp Webinar: "Getting started with Ambassador and Consul on Kubernetes ...
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

JavaOne 2016 "Java, Microservices, Cloud and Containers"

  • 1. Java, Microservices, Cloud and Containers: Migrating without the Tiers (or Tears) Daniel Bryant @danielbryantuk Steve Poole @spoole167 22/09/2016 @danielbryantuk | @spoole167 1
  • 2. The pitch • Moving to the cloud requires a fundamental change in mindset • Technology • Skills (architectural, operational, QA) • Organisational design • DevOps, container technology and microservices are complementary • Migrating in non-trivial • Learn from some of our successes (and mistakes)… 22/09/2016 @danielbryantuk | @spoole167 2
  • 3. Who are we? 22/09/2016 @danielbryantuk | @spoole167 3 Steve Poole IBM Developer @spoole167 Daniel Bryant Chief Scientist, OpenCredo CTO SpectoLabs @danielbryantuk Making Java Real Since Version 0.9 Open Source Advocate DevOps Practitioner (whatever that means!) Driving Change “Biz-dev-QA-ops” Leading change in organisations Experience of Docker, k8s, Go, Java InfoQ, DZone, Voxxed contributor
  • 5. What ‘Cloud’ promises a virtual, dynamic environment which maximizes use, is infinitely scalable, always available and needs minimal upfront investment or commitment Take your code – host it on someone else's machine pay only for the resource you use for the time you use it AND be able to do that very quickly and repeatedly in parallel
  • 6. https://www.flickr.com/photos/skohlmann/ The ability to have ‘cloud burst’ capacity is changing the way software is being designed, developed and supported We’re moving to a more industrial scale: Why buy one computer for a year when you can hire 365 computers for a day..
  • 8. Cloud computing: compute == money Money changes everything With a measureable and direct relationship between $£€¥ and CPU/RAM, disk etc the financial success or failure of a project is even easier to see And that means… Even more focus on value for money.
  • 9. American Society of Civil Engineers Someone will be looking at your leaky app
  • 10. Loosing unnecessary baggage - (you have loads) Java applications have to get lighter. Java 9 modularity will help but you have to consider footprint across the board. Choose your dependencies wisely Your choice of OS & distribution is important. The aim is ‘carry on only’ Your application isn’t going on a long trip https://www.flickr.com/photos/armydre2008/
  • 11. Startup times How long do you want to wait? How long do you have to wait? Do you need to preemptively start instances ‘just in case’ due to start up time? To bad – that costs If the unit of deployment and scaling is an instance of a service it needs to start FAST https://www.flickr.com/photos/91295117@N08/
  • 12. https://www.flickr.com/photos/isherwoodchris/ • Q: How much RAM does your application use? • A: Too much
  • 13. Runtime costs Most cloud providers will charge you for your RAM usage over time: $GB/hr. (Sometimes the charge is $0) Increasing –Xmx directly effects cost. Something businesses can understand Net effect : you’ll be tuning your application to fit into specific RAM sizes. Smaller than you use today. You need to measure where the storage goes. You’ll be picking some components based on memory usage Note that increasing the amount of memory for 1 service increases the bill by the number of concurrent instances https://www.flickr.com/photos/erix/
  • 14. Simply Java applications are going to be running in a remote, constrained and metered environment There will be precise limits on how much disk, CPU, RAM, Bandwidth an application can use and for how long Whether your application is large or small, granular or monolithic. Someone will be paying for each unit used That person will want to get the most out of that investment https://www.flickr.com/photos/rvoegtli/
  • 15. Where you code runs day-to-day and moment-to- moment will be driven by economics, legal requirements and how much risk your business wants to take. Your code has to scale better, be more efficient, resilient, secure and work in constrained environments You will have to design, code, deliver, support and debug code in new ways It’s going to be scary
  • 16. How scary? design, coding, deployment , startup, execution, scaling debugging, security, resilience … Almost everything about your application is effected https://www.flickr.com/photos/mjtmail/
  • 17. Resilient applications Design for short term failure: something fails all the time. Expect data and service outages regularly Fail and recover: don’t diagnose problems in running systems. Kill it and move on Every IO operation you perform may fail – do as few as possible Every IO operation may stall – costing you GB/hrs and resources– timeout everything quickly Every piece of data you receive may be badly formed – check everything Retry, compensation, backout strategies– these are your new friends “Everything in the cloud fails all the time” : Werner Vogels
  • 18. Debugging Remote support for your family? Fancy having to do that for your own apps? You have to assume: You will never be able to log into a remote server. You will never be able to attach a remote debugger to a failing app Ever. All problems must be resolved by local reproduction or logs and dumps (discuss) https://www.flickr.com/photos/carbonnyc/
  • 19. Debugging It gets more challenging. Failures during deployment or initial startup can be difficult or impossible to diagnose. If your service instance didn’t start there is is little chance of logs being kept! Learn to love logs, dumps and traces. Remote log stores and tools are going to be your best friend BTW: they’ll cost too https://www.flickr.com/photos/hinkelstone/
  • 20. Security When you deploy to public cloud your system will be attacked in minutes. Certainly in < 1hr Your systems will always be under threat https://www.flickr.com/photos/ahmadhammoudphotography/
  • 21. It’s all change How you design, code, deploy, debug, support etc will be effected by the metrics and limits imposed on you. Financial metrics and limits always change behavior. It also creates opportunity Java applications have to get leaner and meaner You have to learn new techniques and tools https://www.flickr.com/photos/beigephotos/
  • 23. “Just make it do what the old one does (but better)” • Case studies • ‘Teflon shouldered’ product owner • Rebuilding a service three times • Problem • Performing migration without a clear definition of ‘done’ • Accepting feature creep 22/09/2016 @danielbryantuk | @spoole167 23
  • 24. “Just make it do what the old one does (but better)” • Attempt to retrofit BDD/regression tests around application • Serenity BDD, Cucumber, Jbehave • Work incrementally with QA team • Manually test everything • Create tests for new functionality • Compare input/output • Traffic: Twitter’s Diffy • Datastores: Reconsiliator pattern 22/09/2016 @danielbryantuk | @spoole167 24
  • 25. Twitter’s Diffy and mysqldbcompare 22/09/2016 @danielbryantuk | @spoole167 25 blog.twitter.com/2015/diffy-testing-services-without-writing-tests dev.mysql.com/doc/mysql-utilities/1.5/en/mysqldbcompare.html
  • 27. “Bounding the context” • Case studies • Large business software provider thought they knew their domain • Small CRM company had let domain model entropy • Problem • Development team lost sight of the application big picture • Lack of architectural awareness and ‘broken windows’ 22/09/2016 @danielbryantuk | @spoole167 27
  • 28. Context mapping (static) & event storming (dynamic) 22/09/2016 @danielbryantuk | @spoole167 28 www.infoq.com/articles/ddd-contextmapping ziobrando.blogspot.co.uk/2013/11/introducing-event-storming.html
  • 29. “Bounding the context” • Create ‘seams’ within codebase • Natural domain boundaries • Single responsibility principle • Look for points of ‘friction’ • Extreme ownership • Seize (identify) • Clear (refactor logic / data) • Hold (metrics and rachets) • Build (move code to service) 22/09/2016 @danielbryantuk | @spoole167 29
  • 30. “How small is micro?” • Case studies • UK retailer looking to migrate to cloud and microservices • Keen to minimise risk • Problem • Previous attempts of gradual migration had failed • Integration issues - services either too big or too small • Spent a long time building a ‘microservice platform’ 22/09/2016 @danielbryantuk | @spoole167 30
  • 31. “How small is micro?” • Understand microservice principles and Self-Contained Systems (SCS) • Utilise the strangler pattern • ‘Service Virtualisation’ is valuable for testing • Don’t underestimate the value of PaaS 22/09/2016 @danielbryantuk | @spoole167 31
  • 32. 22/09/2016 @danielbryantuk | @spoole167 32 zeroturnaround.com/rebellabs/microservices-for-the-enterprise/
  • 33. Self-contained systems (SCS) 22/09/2016 @danielbryantuk | @spoole167 33 http://scs-architecture.org/ UI / Biz / Repo Monolith Domains Modules, components, frameworks, libraries
  • 34. Self-contained systems (SCS) 22/09/2016 @danielbryantuk | @spoole167 34 SCS Microservices
  • 35. Strangling your software (not your manager!) 22/09/2016 @danielbryantuk | @spoole167 35 paulhammant.com/2013/07/14/legacy-application-strangulation-case-studies/ www.nginx.com/blog/refactoring-a-monolith-into-microservices/
  • 36. Service Virtualisation (for Dev and Test) • Existing tooling • Hoverfly • Wiremock • VCR/Betamax • Mountebank • mirage 22/09/2016 @danielbryantuk | @spoole167 36
  • 37. Hoverfly • Lightweight Service virtualisation • Open source (Apache 2.0) • Go-based / single binary • Written by @Spectolabs • Flexible API simulation • HTTP / HTTPS • More Protocols to follow? 22/09/2016 @danielbryantuk | @spoole167 37
  • 38. 22/09/2016 @danielbryantuk | @spoole167 38 • Middleware • Remove PII • Rate limit • Add headers • Middleware • Fault injection • Chaos monkey
  • 39. The value of PaaS… 22/09/2016 @danielbryantuk | @spoole167 39
  • 40. The value of PaaS… 22/09/2016 @danielbryantuk | @spoole167 40
  • 41. “Cloud native or ‘lift and shift’” • Case studies • Price comparison website performance dipped upon a migration to the cloud • Problems • Not coding for distributed or ephemeral nature of cloud • No reliable creation of cloud environment • Not testing in the cloud 22/09/2016 @danielbryantuk | @spoole167 41
  • 42. “Cloud native or ‘lift and shift’” • Push apps through to production as early as possible (CI/CD) • Build POCs appropriately • Include building infrastructure in the pipeline • Include NFR testing in the build pipeline • Dev, QA and Ops must cultivate ‘mechanical sympathy’ • Everything in the cloud is networked • Configure local development environments as appropriate 22/09/2016 @danielbryantuk | @spoole167 42
  • 43. NFR testing in the (cloud) pipeline 22/09/2016 @danielbryantuk | @spoole167 43
  • 44. NFRs testing in the (container) pipeline 22/09/2016 @danielbryantuk | @spoole167 44
  • 45. NFR testing resources • Performance • JMeter • Gatling • Fault-tolerance • Hoverfly • Wiremock/Saboteur • Security • bdd-security (OWASP ZAP) • OWASP Dependency-Check • Docker Bench for Security 22/09/2016 @danielbryantuk | @spoole167 45
  • 46. Security is vital (but often ignored) 22/09/2016 @danielbryantuk | @spoole167 46 www.youtube.com/watch?v=c9uvV4ChIXw www.infoq.com/news/2016/08/secure-docker-microservices
  • 47. Shameless plugs… 22/09/2016 @danielbryantuk | @spoole167 47 www.youtube.com/watch?v=A1982GdXXSA
  • 48. “Containerise all the things” • Problem • JVM respecting resource limits • OOM: Unable to create thread • Random application stalling • Case studies • www.notonthehighstreet.com 22/09/2016 @danielbryantuk | @spoole167 48
  • 49. “Containerise all the things” • Set container memory appropriately • docker - - memory=”Xg” • JVM requirements = Heap size (Xmx) + Metaspace + JVM overhead • Account for native thread requirements e.g. thread stack size (Xss) • Watch out for ulimits • Entropy • Host entropy can soon be exhausted by crypto operations • –Djava.security.egd=file:/dev/urandom • Be aware of security ramifications 22/09/2016 @danielbryantuk | @spoole167 49
  • 50. Containerising our knowledge 22/09/2016 @danielbryantuk | @spoole167 50
  • 51. Key lessons learned 22/09/2016 @danielbryantuk | @spoole167 51
  • 52. Lessons learned from the trenches • Specify goals and targets of migration (and retrospect) • Undertake just enough up front design (contexts, APIs, integration) • Understand distributed systems (12 factors etc) • Start pushing to production ASAP • There is nothing wrong with PaaS • Programmable infrastructure is a key enabler • Don’t forget the NFRs • Containers and microservices are complementary to cloud 22/09/2016 @danielbryantuk | @spoole167 52
  • 54. Thanks for listening • Any questions? • Daniel Bryant (@danielbryantuk ) • Steve Pool (@spoole167) 22/09/2016 @danielbryantuk | @spoole167 54