SlideShare a Scribd company logo
Building a Microservice Ecosystem:
Some Assembly (Still) Required
Daniel Bryant
@danielbryantuk
Agenda
• What is a microservice platform/ecosystem
• Local development of services can be hard
• Think about your build pipeline(s)
• Testing requires a paradigm shift
• Consider the infrastructure
• Plan for the inevitable…
28/10/2015 @danielbryantuk
Who Am I?
• London Java Community Associate
• Adopt OpenJDK and JSR
• InfoQ Editor, DZone MVB, Voxxed
28/10/2015 @danielbryantuk
• Principal Consultant at OpenCredo
• Technical/digital transformation
• Java, Golang, CI/CD, DevOps
• Microservices, cloud and containers
• Maintainer of muservicesweekly.com
So, What is a Microservice?
“Loosely coupled service oriented architecture
with bounded contexts”
Adrian Cockcroft
“Applications that fit in your head”
James Lewis
28/10/2015 @danielbryantuk
What do I mean by ‘ecosystem’?
• Build
– Local development, pipelines and integration
• Test
– From local integration to E2E
• Deploy
• Operate
• Observe
– Monitoring/logging/alerting
28/10/2015 @danielbryantuk
Adrian Cockcroft’s Thoughts
28/10/2015 @danielbryantuk
www.slideshare.net/adriancockcroft/microxchg-microservices
Alexis Richardson’s Thoughts
28/10/2015 @danielbryantuk
gotocon.com/goto-london-2015/#!#schedulePopupExtras-7011
Joe Beda’s Thoughts
www.eightypercent.net/post/layers-in-the-stack.html
28/10/2015 @danielbryantuk
wikibon.com/wp-content/uploads/container_implementations.png
Technology Choices
28/10/2015 @danielbryantuk
28/10/2015 @danielbryantuk
Core (up front?) Decisions
• Platform
– Cloud Foundry
– Amazon ECS, Deis, Flynn
– Docker Swarm (Tutum)
– Kubernetes
– Mesos
– HashiCorp Nomad
– DIY (maybe leverage Netflix’s stuff?)
28/10/2015 @danielbryantuk
Core (up front?) Decisions
• Packaging
– Services/tasks/jobs
– ’buildpacked’
– VMs
– Containers
• Is Docker a de facto standard?…
28/10/2015 @danielbryantuk
Build
28/10/2015 @danielbryantuk
Developing Locally: The Basics
• GitHub’s Boxen (Puppet)
• Pivotal’s Sprout (Chef)
• Mac-dev-playbook (Ansible)
• Vagrant (Otto?)
• Docker Compose (Docker machine)
28/10/2015 @danielbryantuk
Developing Locally
• The naïve approach
– Replication of env per service
– …and dependencies and data stores and...
– Soon gets crazy
• Local profiles + mocking/stubbing
– Spring profiles + Mockito etc
28/10/2015 @danielbryantuk
Developing Locally
• Service virtualisation
– Mountebank, Wiremock (Saboteur), Mirage
• ‘Production-in-a-box’ (IFTTT)
– Docker Compose, Vagrant, cf_nise_installer
• Environment leasing
– Create your own env (e.g. Hailo)
28/10/2015 @danielbryantuk
Developing Locally
www.opencredo.com/2015/09/20/working-locally-with-microservices/
28/10/2015 @danielbryantuk
Create a Pipeline
28/10/2015 @danielbryantuk
Multi-service / Multi-pipeline?
28/10/2015 @danielbryantuk
?
Test
28/10/2015 @danielbryantuk
Always Remember…
28/10/2015 @danielbryantuk
blog.bbv.ch/2012/06/13/acceptance-test-driven-development/
Testing Basics
• Toby Clemson’s article
– martinfowler.com/articles/microservice-testing
28/10/2015 @danielbryantuk
Multi-service / Multi-pipeline?
28/10/2015 @danielbryantuk
?
Pipeline
• Multiple pipelines?
– Beware of rubber stamping (distributed monolith)
– ‘semver’ if you must (semver.org) e.g. 1.2.1
• Shared staging
– Critical path testing (why not prod?)
• Ensured consistency
– Consumer-based contracts
– Backwards compatibility
28/10/2015 @danielbryantuk
Integration Testing
• Contracts
– Pact-JVM github.com/DiUS/pact-jvm
– PACT broker github.com/bethesque/pact_broker
– Examples: github.com/mstine/microservices-pact
28/10/2015 @danielbryantuk
My Opinions
• BDD services API
– Serenity BDD
• Contract tests (failure is a conversation)
• Component test and unit test (as normal)
– Maven surefire/failsafe
• BDD critical paths throughout application
– Including API journey
28/10/2015 @danielbryantuk
Final Words on Testing
• Don’t forget the “ilities”
• Security / reliability
– ZAP (from the OWASP team)
– github.com/continuumsecurity/bdd-security
• Performance / scalability
– Jmeter (Jenkins Performance plugin)
– flood.io
28/10/2015 @danielbryantuk
Deploy
28/10/2015 @danielbryantuk
Separate Deploy and Release
• Feature flags
– Difficult at scale (and distribution)
– Enable at ingress
• Incremental (phased) rollout
• Canary vs blue/green
• Avoid datastore migrations (if possible)
28/10/2015 @danielbryantuk
Centralise Configuration
28/10/2015 @danielbryantuk
Centralise Configuration
• Consul & consul-template
• Etcd/ZK & confd
• Netflix Archaius
• Spring Cloud
• Watch out for application rollback!
28/10/2015 @danielbryantuk
Operate
28/10/2015 @danielbryantuk
Building Blocks
• Standardise on an OS
– Amazon Linux vs mainstream distros
• HashiCorp Terraform
– VMWare? cloud-init and vcloud-tools
– “Boot my secure government cloud”
• “CAPS”
– Chef, Ansible, Puppet, SaltStack
– Automated sysadmin
28/10/2015 @danielbryantuk
DevOps and Programmable Infra
• It involves programming…
• Introduce SOLID principles
• Good CI/CD principles
– Gitflow etc
28/10/2015 @danielbryantuk
Service Discovery
• External
– HAProxy / nginx / ELB etc
• Client-side
– Netflix Ribbon (with Prana)
– ‘Baker Street’ (extending SmartStack)
– srv-router
• Kubernetes and CF are good to go
28/10/2015 @danielbryantuk
Service Discovery
28/10/2015 @danielbryantuk
External
28/10/2015 @danielbryantuk
Client-side
28/10/2015 @danielbryantuk
Service Discovery
• External
– HAProxy / nginx / ELB etc
• Client-side
– Netflix Ribbon (with Prana)
– ‘Baker Street’ (extending SmartStack)
– srv-router
• Kubernetes and CF are good to go
28/10/2015 @danielbryantuk
Observe
28/10/2015 @danielbryantuk
Monitoring and People
28/10/2015 @danielbryantuk
www.infoq.com/news/2015/06/too-big-to-fail
Start with the Basics
• Health checks
– Coda Hale (DropWizard) Metrics
– Spring Boot actuator
• KPIs for apps (and business)
– Assertions / invariants
– Throughput
– Queue length
28/10/2015 @danielbryantuk
Logging
• “What every engineer should know”
• “10 Tips for Proper Application Logging”
• ElasticSearch-Logstash-Kibana (ELK)
– Buffer/proxy log sending or…
– Mount directory into container
28/10/2015 @danielbryantuk
Kibana FTW
28/10/2015 @danielbryantuk
Distributed Tracing
• github.com/daniel-bryant-uk/correlation-id-async
• MDC logging (logback.qos.ch/manual/mdc.html )
• Zipkin/Brave (github.com/openzipkin/docker-zipkin )
28/10/2015 @danielbryantuk
Monitoring
• Push
– Spring Boot actuator e.g. InfluxDbExporter
• Pull
– E.g. Telegraf (shout to Tareq Abedrabbo)
• InfluxDB vs prometheus vs graphite vs opentsdb
• Information radiators
– Aggregate vs individual
28/10/2015 @danielbryantuk
Aggregation: Sick Cattle, Not Sick Pets
Grafana FTW
28/10/2015 @danielbryantuk
Problems?
• Rob Ewaschuk’s “Philosophy on Alerting”
• Brendan Gregg’s USE method
– “check utilization, saturation, and errors.”
• “DevOps Troubleshooting”
– Kyle Rankin
28/10/2015 @danielbryantuk
Summary
• Looked at “microservice platforms”
• Local development of 3+ services is hard
• Think about your build pipeline(s)
• Testing requires a paradigm shift
• Consider the infrastructure
• Plan for the inevitable issues…
• Try not to create your own platform...
28/10/2015 @danielbryantuk
28/10/2015 @danielbryantuk
Thanks
Feedback is always welcomed!
daniel.bryant@opencredo.com
@danielbryantuk
www.muservicesweekly.com
28/10/2015 @danielbryantuk

More Related Content

PPTX
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
PDF
JavaOne 2015: 12 Factor App
PPTX
muCon 2014 "Building Java Microservices for the Cloud"
PPTX
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
PPTX
Developer Week - Reacting to an event-driven world
PDF
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
PDF
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
PDF
Circuit breaker mechanism for Microservices based architecture
12 Factor, or Cloud Native Apps – What EXACTLY Does that Mean for Spring Deve...
JavaOne 2015: 12 Factor App
muCon 2014 "Building Java Microservices for the Cloud"
From a monolith to microservices + REST: The evolution of LinkedIn's architec...
Developer Week - Reacting to an event-driven world
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Circuit breaker mechanism for Microservices based architecture

What's hot (20)

PDF
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
PPTX
EMC World 2016 12 Factor Apps FTW
PPTX
Microservices + Oracle: A Bright Future
PDF
Microservices Architecture
PDF
Cloud Foundry Technical Overview
PDF
Full-Stack Development with Spring Boot and VueJS
PPTX
12 factor app an introduction
PPTX
Micro Service Architecture
PPTX
Going MicroServices with Net
PDF
introduction to micro services
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
PPTX
Breaking the Monolith
PPTX
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
PPTX
Badge des bonnes pratiques OpenSSF de la CII
PDF
The Microservices and DevOps Journey
PDF
Node and Micro-Services at IBM
PDF
Resilient and Adaptable Systems with Cloud Native APIs
PDF
Microservices and functional programming
PDF
Cloud Native Architectures for Devops
PDF
Cloud Native Patterns with Bluemix Developer Console
Creating Polyglot Communication Between Kubernetes Clusters and Legacy System...
EMC World 2016 12 Factor Apps FTW
Microservices + Oracle: A Bright Future
Microservices Architecture
Cloud Foundry Technical Overview
Full-Stack Development with Spring Boot and VueJS
12 factor app an introduction
Micro Service Architecture
Going MicroServices with Net
introduction to micro services
Understanding MicroSERVICE Architecture with Java & Spring Boot
Breaking the Monolith
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
Badge des bonnes pratiques OpenSSF de la CII
The Microservices and DevOps Journey
Node and Micro-Services at IBM
Resilient and Adaptable Systems with Cloud Native APIs
Microservices and functional programming
Cloud Native Architectures for Devops
Cloud Native Patterns with Bluemix Developer Console
Ad

Viewers also liked (20)

PPT
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
PDF
Soa with consul
PDF
JEE on DC/OS
PDF
Simple REST with Dropwizard
PDF
Production Ready Web Services with Dropwizard
PDF
Monitoring microservices platform
PDF
Dropwizard Spring - the perfect Java REST server stack
PDF
Addressing Systemic Complexity with SOA and Cloud
PDF
Dropwizard and Groovy
PDF
Docker and IBM Integration Bus
PPTX
J1 2015 "Thinking Fast and Slow with Software Development"
PDF
Question the Status Quo - Seaford 2011
PPTX
Dropwizard Introduction
PDF
WildFly Swarm: Criando Microservices com Java EE 7
PDF
JBoss Fuse - Fuse workshop Error Handling
PDF
Haufe #msaday: "Building a Microservice Ecosystem"
PDF
Simple REST-APIs with Dropwizard and Swagger
PDF
Technical Introduction to IBM Integration Bus
PDF
Improve business process with microservice integration
PPTX
SC 2015: Thinking Fast and Slow with Software Development
Codemotion Rome 2015 - Microservices with IBM Bluemix and DevOps Services
Soa with consul
JEE on DC/OS
Simple REST with Dropwizard
Production Ready Web Services with Dropwizard
Monitoring microservices platform
Dropwizard Spring - the perfect Java REST server stack
Addressing Systemic Complexity with SOA and Cloud
Dropwizard and Groovy
Docker and IBM Integration Bus
J1 2015 "Thinking Fast and Slow with Software Development"
Question the Status Quo - Seaford 2011
Dropwizard Introduction
WildFly Swarm: Criando Microservices com Java EE 7
JBoss Fuse - Fuse workshop Error Handling
Haufe #msaday: "Building a Microservice Ecosystem"
Simple REST-APIs with Dropwizard and Swagger
Technical Introduction to IBM Integration Bus
Improve business process with microservice integration
SC 2015: Thinking Fast and Slow with Software Development
Ad

Similar to J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required" (20)

PPTX
JAX London 2014 "Building Java Applications for the Cloud: The DHARMA princip...
PPTX
JavaOne 2014: Cloud Developer's DHARMA: Redefining 'done' for Cloud applications
PPTX
LJC 2015 "The Crafty Consultants Guide to DevOps"
PDF
Haufe #msaday - Building a Microservice Ecosystem by Daniel Bryant
PDF
Building a microservice ecosystem
PDF
vJUG24 2016 "Seven (More) Deadly Sins of Microservice"
PPTX
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
PPTX
O'Reilly SACON "Continuous Delivery Patterns for Contemporary Architecture"
PPTX
OReilly SACON 2016 "A Practical Guide for Continuous Delivery with Containers"
PPTX
Codemotion Rome 2018 "Continuous Delivery with Containers: The Good, the Bad ...
PDF
Building effective Java applications for the Cloud: The DHARMA principles - D...
PDF
Dublin Microservice "Introduction to Service Meshes"
PPTX
LJC 05/14 "Cloud Developer's DHARMA"
PDF
SwisscomSoftwareDay 2016 "The Trials and Tribulations of Making Software Small"
PPTX
O'Reilly SACON NY 2018 "Continuous Delivery Patterns for Contemporary Archite...
PDF
muCon 2016: "Seven (More) Deadly Sins of Microservices"
PDF
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
PDF
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
PPTX
Continuous Delivery with Containers: The Good, the Bad, and the Ugly - Daniel...
PPTX
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
JAX London 2014 "Building Java Applications for the Cloud: The DHARMA princip...
JavaOne 2014: Cloud Developer's DHARMA: Redefining 'done' for Cloud applications
LJC 2015 "The Crafty Consultants Guide to DevOps"
Haufe #msaday - Building a Microservice Ecosystem by Daniel Bryant
Building a microservice ecosystem
vJUG24 2016 "Seven (More) Deadly Sins of Microservice"
jSpring 2018 "Continuous Delivery Patterns for Modern Architectures and Java"
O'Reilly SACON "Continuous Delivery Patterns for Contemporary Architecture"
OReilly SACON 2016 "A Practical Guide for Continuous Delivery with Containers"
Codemotion Rome 2018 "Continuous Delivery with Containers: The Good, the Bad ...
Building effective Java applications for the Cloud: The DHARMA principles - D...
Dublin Microservice "Introduction to Service Meshes"
LJC 05/14 "Cloud Developer's DHARMA"
SwisscomSoftwareDay 2016 "The Trials and Tribulations of Making Software Small"
O'Reilly SACON NY 2018 "Continuous Delivery Patterns for Contemporary Archite...
muCon 2016: "Seven (More) Deadly Sins of Microservices"
PlatformCon 23: "The Busy Platform Engineers Guide to API Gateways"
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
Continuous Delivery with Containers: The Good, the Bad, and the Ugly - Daniel...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...

More from Daniel Bryant (20)

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

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
KodekX | Application Modernization Development
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Modernizing your data center with Dell and AMD
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
KodekX | Application Modernization Development
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Electronic commerce courselecture one. Pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Modernizing your data center with Dell and AMD
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"

Editor's Notes

  • #47: https://github.com/codecentric/spring-boot-starter-batch-web/blob/master/src/main/java/de/codecentric/batch/metrics/InfluxdbMetricsExporter.java