SlideShare a Scribd company logo
MONOLITH -> MICROSERVICES
A GUIDED ADVENTURE
@MIKEGEHARD, @PIVOTAL
ABOUT ME
▸ Working with clients to migrate legacy monoliths ->
microservices
▸ Worked on the Spring Cloud Services team
▸ Trying not to be a Chief Principal Senior Consultant
Scientist
ABOUT YOU
▸ Have a monolith that needs migrating?
▸ Actively migrating a monolith?
▸ Building microservices net new?
▸ This talk has a little bit for all of you…
AGENDA
▸ Where did these ideas come from?
▸ Which comes first?
▸ What is the path?
BACKGROUND
https://twitter.com/barinek
HTTP://WWW.APPCONTINUUM.IO/
https://twitter.com/simonbrown
MODULAR MONOLITH
NOTICE ANY
SIMILARITIES?
THIS SHOULD NOT
BE REVOLUTIONARY
WHICH COMES
FIRST?
The Journey from Monolith to Microservices: a Guided Adventure
MONOLITH OR
MICROSERVICES
IT DEPENDS…
HTTP://WWW.APPCONTINUUM.IO/
MODULAR MONOLITH
IF YOU CAN’T BUILD A WELL
STRUCTURED MONOLITH, WHAT MAKES
YOU THINK YOU CAN BUILD A WELL
STRUCTURED SET OF MICROSERVICES?
UNKNOWN
TEXT
WELL STRUCTURED MONOLITH
WINNER?
BOUNDARIES?
BOUNDED
CONTEXTS
2003 2013
SOUND FAMILAR?
HOW DO I GET
THERE?
The Journey from Monolith to Microservices: a Guided Adventure
GOALS
▸ Migrate a monolith that was in production, making money,
to a more sustainable solution for the future.
▸ Architect for scalability of app in the future.
▸ Allow multiple teams to deliver business value quickly.
▸ Allow for addition of resources without overcrowding.
CURRENT STATE
▸ API servers
▸ Multiple clients, including JavaScript front end
▸ Some dead code
▸ Lack of comprehensive, current API tests
The Journey from Monolith to Microservices: a Guided Adventure
WHERE DO WE
START?
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
GOAL: VALIDATE YOU DON'T BREAK ANY
CLIENT FACING BEHAVIOR WHILE MIGRATING
STEP 1: API LEVEL TESTS
CURRENT STATE
APICLIENT
CLIENT
CLIENT
CLIENT
DESIRED END STATE
CLIENT
CLIENT
CLIENT
CLIENT
OLD API OLD API
OLD APIOLD API
WHAT STAYED THE
SAME?
TESTS
APITEST
TEST
TEST
TEST
HTTPS://GITHUB.COM/REALESTATE-COM-AU/PACT
RESULT: YOU NOW KNOW WHEN YOU
HAVE BROKEN USER FACING
BEHAVIOR BEFORE YOU GO INTO
PRODUCTION
GOAL: BEGIN TO UNDERSTAND
WHAT BOUNDED CONTEXTS EXIST
STEP 2: ARRANGE APPLICATION SO YOU
CAN SEE YOUR DOMAIN
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
STEP 2: ARRANGE APPLICATION SO YOU CAN SEE YOUR DOMAIN
▸ Minimizes the number of directories where changes
happen.
▸ Less costly to experiment with/evolve bounded contexts.
▸ Delaying architecture decisions.
GOAL: GIVE MORE SPACE IN THE CODEBASE
AND SOLIDIFY DEPENDENCIES/BOUNDARIES.
STEP 3: BREAK OUT COMPONENTS
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
WHAT ABOUT DATABASES?
▸ Application manages?
▸ Component manages?
▸ “It depends…”
RULE: MIGRATIONS ONLY
TOUCH ONE TABLE.
WHY?
STEP 3: BREAK OUT COMPONENTS
▸ More room in the codebase for multiple teams.
▸ Strict boundaries between framework code and domain
code.
▸ Moving closer to microservices without the overhead of
multiple processes.
▸ Stopping here gives you a lot of benefits without overhead
of microservices.
GOAL: IT DEPENDS…
STEP 4: PROMOTE YOUR FIRST
MICROSERVICE
WHY EXTRACT A MICROSERVICE?
▸ Scaling a certain bounded context becomes an issue.
▸ You want to deploy one bounded context more frequently.
▸ Many, many other reasons that I won’t cover here.
The Journey from Monolith to Microservices: a Guided Adventure
WHY NOT EXTRACT A MICROSERVICE?
▸ Cost of managing the service outweighs the benefits.
▸ Dysfunctional communication patterns in the org
▸ Many, many other reasons that I won’t cover here.
BILLING
EMAIL
BILLING
EMAIL
STEP 4: EXTRACT YOUR FIRST MICRO SERVICE
▸ Congratulations you now have a distributed system!!!
▸ And with that distributed system come new costs:
▸ Billing now needs to know how to contact the email
service.
▸ Network communication between billing and email will
fail at some point.
GOAL: ABSTRACT LOCATION AND
QUANTITY OF SERVICE INSTANCES
SERVICE DISCOVERY
BILLING
EMAIL
SERVICE DISCOVERY
SERVICE DISCOVERY
▸ Service calls are most loosely coupled to location and
number of instances.
▸ Client side load balancing can reduce number of
network calls.
▸ But there is an additional applications to run and monitor.
GOAL: PROTECT AGAINST CASCADING
FAILURES THAT CAUSE SYSTEM DOWNTIME
CIRCUIT BREAKER
The Journey from Monolith to Microservices: a Guided Adventure
BILLING
EMAIL
SERVICE DISCOVERY
CIRCUIT BREAKER
CIRCUIT BREAKERS
▸ Increased resiliency of system when the network or a
service fails...because they will.
▸ Increased visibility of health of system as a whole.
▸ But there is an additional applications to run and monitor.
CONGRATULATIONS YOU
ARE THE PROUD OWNER OF
A SET OF MICROSERVICES!!
NEXT STEPS
▸ Break out more microservices as necessary.
▸ Change up the communication interface...maybe use a
message queue?
▸ Don't do anything and continue to make money.
▸ The choice is up to you!
SOURCE CODE
▸ https://github.com/mikegehard/
journeyFromMonolithToMicroservices (Java)
▸ https://github.com/mikegehard/user-management-
evolution-kotlin (Kotlin)
THANK YOU!
QUESTIONS?
@MIKEGEHARD, @PIVOTAL

More Related Content

PDF
Application Security in a Container World - Akash Mahajan - BCC 2017
PDF
AWS DevOps Event - Innovating with DevOps on AWS
PDF
Deep Dive on Continuous Integration and Continuous Delivery in Anypoint Platf...
PPTX
DevOps and AWS - Code PaLOUsa 2017
PPTX
Ed Elliott - Practical DSC in Azure
PDF
Turn On The Lights
PDF
Bitbucket Pipelines: Serverless CI/CD That Will Save Your Life
PPTX
How to Implement Hybrid Cloud Solutions Successfully
Application Security in a Container World - Akash Mahajan - BCC 2017
AWS DevOps Event - Innovating with DevOps on AWS
Deep Dive on Continuous Integration and Continuous Delivery in Anypoint Platf...
DevOps and AWS - Code PaLOUsa 2017
Ed Elliott - Practical DSC in Azure
Turn On The Lights
Bitbucket Pipelines: Serverless CI/CD That Will Save Your Life
How to Implement Hybrid Cloud Solutions Successfully

What's hot (17)

PDF
Lessons Learned from building a serverless API
PPTX
AWS Summit - Trends in Advanced Monitoring for AWS environments
PDF
Using Cookies to Store Your Postman Secrets
PDF
Event driven infrastructure
PDF
Tracking Huge Files with Git LFS
PDF
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...
PDF
Mini-Training: Netflix Simian Army
PPTX
DevOps Days Toronto: From 6 Months Waterfall to 1 hour Code Deploys
PDF
How to Adopt Serverless and Get to Production Faster
PDF
Serverless architectures
PDF
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
PDF
Scaling Gilt: from monolith ruby app to micro service scala service architecture
PDF
Build a JIRA Server Add-on as a Microservice - You Can Do It!
PPTX
Jeffrey Snover - Empowering DevOps with Azure Stack
PPTX
DevOps Transformation at Dynatrace and with Dynatrace
PPTX
Azure dev ops integrations with Jenkins
PDF
Surviving Serverless Testing: The ultimate Guide
Lessons Learned from building a serverless API
AWS Summit - Trends in Advanced Monitoring for AWS environments
Using Cookies to Store Your Postman Secrets
Event driven infrastructure
Tracking Huge Files with Git LFS
AWS DevOps Event - AWS Services enabling DevOps - Continuous Integration & Au...
Mini-Training: Netflix Simian Army
DevOps Days Toronto: From 6 Months Waterfall to 1 hour Code Deploys
How to Adopt Serverless and Get to Production Faster
Serverless architectures
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
Scaling Gilt: from monolith ruby app to micro service scala service architecture
Build a JIRA Server Add-on as a Microservice - You Can Do It!
Jeffrey Snover - Empowering DevOps with Azure Stack
DevOps Transformation at Dynatrace and with Dynatrace
Azure dev ops integrations with Jenkins
Surviving Serverless Testing: The ultimate Guide
Ad

Viewers also liked (20)

PDF
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
PPTX
Monoliths and Microservices
PPTX
Breaking the Monolith
PPTX
From Monolithic to Microservices in 45 Minutes
PPTX
The Cloud Native Journey
PDF
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
PDF
Service-oriented architecture
PDF
Concevoir et déployer vos applications a base de microservices sur Cloud Foundry
PDF
Events and microservices
PDF
How to disassemble a monolithic app in (not-so) micro-services
PPTX
Transforming the Monolith at 20M tph
PDF
Intel IT Open Cloud - What's under the Hood and How do we Drive it?
PPTX
From Monolith to Microservices with Cassandra, Grpc, and Falcor (Luke Tillman...
PDF
Microservices: Organizing Large Teams for Rapid Delivery
PPTX
Building a Foundation for Global Digital Marketing
PPTX
What's new in Pivotal Cloud Foundry 1.6
PPTX
Applying a Developer-Centric Approach to API Design from API Architect Ronnie...
PPTX
Managing a Microservices Development Team (And advanced Microservice concerns)
PPTX
DevOps Friendly Doc Publishing for APIs & Microservices
PDF
Securing application deployments in multi-tenant CI/CD environments
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Monoliths and Microservices
Breaking the Monolith
From Monolithic to Microservices in 45 Minutes
The Cloud Native Journey
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
Service-oriented architecture
Concevoir et déployer vos applications a base de microservices sur Cloud Foundry
Events and microservices
How to disassemble a monolithic app in (not-so) micro-services
Transforming the Monolith at 20M tph
Intel IT Open Cloud - What's under the Hood and How do we Drive it?
From Monolith to Microservices with Cassandra, Grpc, and Falcor (Luke Tillman...
Microservices: Organizing Large Teams for Rapid Delivery
Building a Foundation for Global Digital Marketing
What's new in Pivotal Cloud Foundry 1.6
Applying a Developer-Centric Approach to API Design from API Architect Ronnie...
Managing a Microservices Development Team (And advanced Microservice concerns)
DevOps Friendly Doc Publishing for APIs & Microservices
Securing application deployments in multi-tenant CI/CD environments
Ad

Similar to The Journey from Monolith to Microservices: a Guided Adventure (20)

PPTX
2 5404811386729530203
PPTX
The "Why", "What" & "How" of Microservices - short version
PPTX
Tef con2016 (1)
PPTX
20180616 r gonzalez_from once per month to multiple times a day b
PDF
Test Strategies for Microservices with Christoph Ebeling
PDF
Service Mesh Talk for CTO Forum
PDF
Getting Managers to Ride the Cloud
PDF
ITB2017 - Day2 Keynote - Box Microservices
PDF
Micro Services Architecture
PPTX
Surviving as a Monolith in a Microservices World - by Blair Olynyk, Hyperwallet
PDF
21st Docker Switzerland Meetup - ISTIO
PDF
Best Practices to Secure Containerized Apps with Next-Gen WAF
PPTX
Concepto de “new normal”: Arquitectura híbrida
PDF
Webinar - Order out of Chaos: Avoiding the Migration Migraine
PDF
From Monoliths to Services: Paying Your Technical Debt
PPTX
Webinar : Microservices and Containerization
DOCX
Take testing-to-cloud
PDF
Arsitektur Aplikasi Modern - Faisal Henry Susanto
PPTX
Service Mesh CTO Forum (Draft 3)
PPTX
The End of server management - Continuous delivery meetup Paris
2 5404811386729530203
The "Why", "What" & "How" of Microservices - short version
Tef con2016 (1)
20180616 r gonzalez_from once per month to multiple times a day b
Test Strategies for Microservices with Christoph Ebeling
Service Mesh Talk for CTO Forum
Getting Managers to Ride the Cloud
ITB2017 - Day2 Keynote - Box Microservices
Micro Services Architecture
Surviving as a Monolith in a Microservices World - by Blair Olynyk, Hyperwallet
21st Docker Switzerland Meetup - ISTIO
Best Practices to Secure Containerized Apps with Next-Gen WAF
Concepto de “new normal”: Arquitectura híbrida
Webinar - Order out of Chaos: Avoiding the Migration Migraine
From Monoliths to Services: Paying Your Technical Debt
Webinar : Microservices and Containerization
Take testing-to-cloud
Arsitektur Aplikasi Modern - Faisal Henry Susanto
Service Mesh CTO Forum (Draft 3)
The End of server management - Continuous delivery meetup Paris

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PDF
Spring Update | July 2023
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Boot 3 And Beyond
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Spring Update | July 2023
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Boot 3 And Beyond
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Domain-Driven Design: Theory vs Practice

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Approach and Philosophy of On baking technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
KodekX | Application Modernization Development
PDF
Machine learning based COVID-19 study performance prediction
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Approach and Philosophy of On baking technology
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
KodekX | Application Modernization Development
Machine learning based COVID-19 study performance prediction
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The AUB Centre for AI in Media Proposal.docx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Monthly Chronicles - July 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Building Integrated photovoltaic BIPV_UPV.pdf
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation

The Journey from Monolith to Microservices: a Guided Adventure