SlideShare a Scribd company logo
Migrating Monoliths to Microservices -- M3
©Microsoft Corporation
Azure
Asir Selvasingh
Principal PM Architect
Java on Microsoft Azure
On-point for everything developers
need to build, migrate and scale Java
applications on Azure.
Started software engineering career in
the early days of Java, in 1995, and
built enterprise products, applications
and open source projects.
Migrating Monoliths to Microservices -- M3
Session learning objectives
Migrating Monoliths to Microservices -- M3
References
What is microservices architecture?
suite of small services its
own process lightweight
independently deployable
different
programming languages different data storage
technologies
Microservice Catalyst
quickly penetrate the market
 Not interested
agility and speed scale
Microservices popularized by
 Frameworks
 Platform
 Cloud providers
 Portability across platforms
Representative companies using Java microservices
Microservices are analogous to honeycomb
aligning
start small different materials
Repetitive
independent integrated
grows organically
solid abstracted
reconstruct
Monolith & N-Tier TO Microservice
architecture transformation
Microservice principles (1 of 2)
•
Microservice principles – 12 factor app (2 of 2)
•
•
•
•
•
•
•
•
•
•
•
•
Why use Spring
What is Spring Cloud?
Why Spring Cloud?
•
•
•
•
•
Spring Cloud components
Spring Cloud Config Server
Cannot embed config inside apps
Spring Cloud Service Registry
No more code or URL dependencies
Spring Cloud LoadBalancer
(client-side)
• Moves beyond a single hard-coded
server URL to a load-balanced
solution
• Provides client-side load balancing in
calls to another microservice
• Distributed systems demand an
advanced set of routing and load
balancing behaviors for microservice
to microservice communications
One microservice wants to call another
microservice, looks up the service registry, returns
all the instances of the calling microservice, caller
service headache for which instance it calls
Spring Cloud Gateway
Cannot duplicate or scatter cross cutting measures across microservices – securing,
routing, rate limiting, caching, monitoring, hiding services, etc.
Spring Cloud Gateway
Example - Spring Cloud Gateway and LoadBalancer
combined
• Two instances of callme-service
• Single instance of caller-service, which uses Spring Cloud
Balancer to find the list of available instances of callme-
service
• callme-service ports are generated dynamically
• Spring Cloud Gateway is hiding the complexity of our
system from external client. It is open on 8080 and is
forwarding requests to the downstream based on
request context path.
Spring Cloud Circuit Breaker and Resilience4J
Failure is inevitable, but end users need not
know
Example – Spring Cloud Circuit Breaker and Resilience4j
@Bean
public Customizer<ReactiveResilience4JCircuitBreakerFactory> defaultCustomizer() {
return factory -> factory.configureDefault(id -> new Resilience4JConfigBuilder(id)
.circuitBreakerConfig(CircuitBreakerConfig.custom()
.slidingWindowSize(5)
.permittedNumberOfCallsInHalfOpenState(5)
.failureRateThreshold(50.0F)
.waitDurationInOpenState(Duration.ofMillis(30))
.build())
.timeLimiterConfig(TimeLimiterConfig.custom().timeoutDuration(Duration.ofMillis(200)).build()).build());
}
• slidingWindowSize is equal to 5
• If 3 timeouts during last 5 calls, circuit is switched to
OPEN state
• waitDurationInOpenState is set to 30 milliseconds
• after 30 milliseconds the circuit is switched to
HALF_OPEN state
• permittedNumberOfCallsInHalfOpenState is set to 5
• In this five attempts we get <= 2 timeouts, circuit is
switched to CLOSE state
Spring Cloud Sleuth and Zipkin – Distributed Tracing
Debugging distributed apps can be complex and take long time
• Spring Cloud Sleuth can instrument apps in a
predictable and repeatable way
• Zipkin can zero in on latency problems
• Together, they trace requests through microservices
• Adds trace and span ids to logs
• appname: name of the app that logged the span
• traceId: ID assigned to a single request, job, or action
• spanId: ID of a specific operation that took place
• exportable: should the log be exported to Zipkin?
Capstone (1 of 3) - Spring Cloud components
Capstone (2 of 3) – Spring Cloud Components
Spring
Cloud Apps
Spring Cloud
Components
Spring Cloud
Components
Cloud
Services
App
Consumers
Breaker
dashboard
Service
registry
Distributed
tracing
Config
dashboard
IoT
Mobile
Browser
API
Gateway
Microservices
Microservices
Microservices
Message brokers
Databases
Build distributed systems by -
• Versioning, distributing, and
refreshing configuration via
config server and management
bus
• Dynamically discovering
remote dependencies
• Decentralizing load balancing
decisions
• Preventing cascading failures
through circuit breakers and
bulkheads
• Integrating on the behalf of
specific clients via gateway
• Instrumenting apps for
distributed tracing
Capstone (3 of 3) – Migrate Monolith to Microservices - M3
Decompose monolithic applications using three principles
Denise Yu
https://aka.ms/monoliths-to-microservices
Strangling the monolith
A
App Migration | Modernization Impediments
Pattern – Backends for Frontends (BFF)
Different user experiences want to make similar types of calls
https://samnewman.io/patterns/architectural/bff/
Single BFF for each different type of client
Mikado Methodology – Breaking up a Monolith
The Mikado Method
by Ola Ellnestam and Daniel Brolund
Published by Manning Publications, 2014
Mikado Methodology – Breaking up a Monolith
Existing monolith - one entry point
to the server, from which all the calls
are then dispatched using an action
parameter. There are three actions
that can be performed:
•Apply
•Fetch
•Approve
The Mikado Method
by Ola Ellnestam and Daniel Brolund
Published by Manning Publications, 2014
Break monolith into smaller, more manageable modular components
https://medium.com/nick-tune-tech-strategy-blog/modelling-bounded-contexts-with-the-bounded-context-design-canvas-a-workshop-recipe-1f123e592ab
Securing service-to-
service communications
and sharing user context
between microservices
(with the same JWT)
Siriwardena, P., & Dias, N. (2020). Microservices security in action. New York: Manning Publications.
Modernizing Batch Jobs
Batch processing has been around for a long time. Since the
dawn of automated computing, gathering data, running a
process over it, and generating output from it have been a
fundamental piece of it. As enterprises transition to the cloud, it
is just natural that batch processing also migrates there.
Running batch applications on a modern cloud platform is not only
possible, but provides real benefits – leverage distributed batch
Migrate to Spring Boot 2.x
Migrate Spring Boot Monolith to Spring Microservice Apps
http://say-hello/greeting http://localhost:8090/greeting
Upgrade older variants of Spring Microservice apps
Old Stack New Stack
Spring Cloud Eureka Spring Cloud Service Registry
Spring Cloud Netflix Zuul Spring Cloud Gateway
Spring Cloud Netflix Archaius Spring Cloud Config Server
Spring Cloud Netflix Ribbon Spring Cloud Load Balancer (client-side load balancer)
Spring Cloud Hystrix Spring Cloud Circuit Breaker + Resilience4J
Spring Cloud Netflix Turbine Micrometer + Prometheus
Migrate Servlets to Spring Boot Apps
Spring Microservices – Azure Hosting Options
Azure Spring Cloud PCF on IaaS AKS VMs
Spring Microservices – Azure Hosting Options
Azure Spring Cloud PCF on IaaS AKS VMs
Spring Boot Apps Variants of Spring Microservices
Web Apps (Servlets)
0
Migration Routes
Migration Routes
Spring Boot Apps Variants of Spring Microservices
Web Apps (Servlets)
0
Prep Apps for Azure Spring Cloud
Spring Boot Version Spring Cloud Version Azure Spring Cloud Version
2.1 Greenwich.RELEASE 2.1.2
2.2 Hoxton.SR8 Not needed
2.3 Hoxton.SR8 Not needed
Deploy Spring Microservice Apps to Azure Spring Cloud
$ az spring-cloud create –n my-spring-cloud 
-g my-resource-group –l westus2
$ az spring-cloud config-server set 
--config-file application.yml
$ az spring-cloud app create -n account-service 
--instance-count 1 --is-public true
$ az spring-cloud app deploy -n account-service 
--jar-path targetaccount-service.jar
$ az spring-cloud app logs -f -n account-service
Post-migration to Azure Spring Cloud
Migrating Monoliths to Microservices -- M3
Migrating Monoliths to Microservices -- M3
Migrating Monoliths to Microservices -- M3
Need Microsoft Help to Build or Migrate Your Java
Apps to Azure Spring Cloud? (1 of 2)
We can
a) Guide your design and plan – thru architecture design session / workshop
b) Help build representative proof of concepts or pilot
• By customer and engineers in Java on Azure team
c) Migrate your Java apps to Azure Spring Cloud
• By Microsoft Consulting Services (MCS)
Nominate yourself …
Need Microsoft Help to Build or Migrate Your Java Apps to
Azure Spring Cloud? (2 of 2)
http://aka.ms/pilot-my-spring-cloud-apps
Session takeaways
Learning Objective – be able to Takeaways
Explain microservices Covered what and why for Monolith &
N-tier to Microservice architecture
transformation
Confront monoliths Shared recipes for transforming
monoliths and several migration routes
Dive deeper and go hands-on with
Spring Cloud
Covered base Spring Cloud
components that are backbone for
microservices
Session resources 1 – Spring Cloud
Spring Cloud Config Server
Spring Cloud Service Registry
Spring Cloud Gateway
Spring Cloud Load Balancer
Spring Cloud Circuit Breaker
Spring Cloud Sleuth and Zipkin
Session resources 2 - References
Session resources 3 – Azure Spring Cloud
https://docs.microsoft.com/en-us/azure/spring-cloud/
https://github.com/microsoft/azure-spring-cloud-training
https://github.com/Azure-Samples/azure-spring-cloud
https://github.com/Azure-Samples/spring-petclinic-microservices
Q&A
Migrating Monoliths to Microservices -- M3

More Related Content

What's hot (20)

PDF
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
confluent
 
PPTX
Serverless integration with Knative and Apache Camel on Kubernetes
Claus Ibsen
 
PDF
Fundamentals of Apache Kafka
Chhavi Parasher
 
PPTX
Apache Airflow overview
NikolayGrishchenkov
 
PPTX
Introduction to Docker - 2017
Docker, Inc.
 
PDF
Angular Dependency Injection
Nir Kaufman
 
PDF
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
PDF
Kubernetes architecture
Janakiram MSV
 
PPTX
Getting up to speed with MirrorMaker 2 | Mickael Maison, IBM and Ryanne Dolan...
HostedbyConfluent
 
ODP
Stream processing using Kafka
Knoldus Inc.
 
PDF
The New JavaScript: ES6
Rob Eisenberg
 
PPTX
.Net Core - not your daddy's dotnet
Rick van den Bosch
 
PPTX
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Flink Forward
 
PDF
Kubernetes Application Deployment with Helm - A beginner Guide!
Krishna-Kumar
 
PDF
Kubernetes 101
Crevise Technologies
 
PDF
Quarkus - a next-generation Kubernetes Native Java framework
SVDevOps
 
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Arjun Thakur
 
PPTX
Introduction of OpenStack cascading solution
Joe Huang
 
PDF
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
Jo Hoon
 
PPTX
Apache Camel K - Copenhagen
Claus Ibsen
 
Creating Connector to Bridge the Worlds of Kafka and gRPC at Wework (Anoop Di...
confluent
 
Serverless integration with Knative and Apache Camel on Kubernetes
Claus Ibsen
 
Fundamentals of Apache Kafka
Chhavi Parasher
 
Apache Airflow overview
NikolayGrishchenkov
 
Introduction to Docker - 2017
Docker, Inc.
 
Angular Dependency Injection
Nir Kaufman
 
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
Kubernetes architecture
Janakiram MSV
 
Getting up to speed with MirrorMaker 2 | Mickael Maison, IBM and Ryanne Dolan...
HostedbyConfluent
 
Stream processing using Kafka
Knoldus Inc.
 
The New JavaScript: ES6
Rob Eisenberg
 
.Net Core - not your daddy's dotnet
Rick van den Bosch
 
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Flink Forward
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Krishna-Kumar
 
Kubernetes 101
Crevise Technologies
 
Quarkus - a next-generation Kubernetes Native Java framework
SVDevOps
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Arjun Thakur
 
Introduction of OpenStack cascading solution
Joe Huang
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
Jo Hoon
 
Apache Camel K - Copenhagen
Claus Ibsen
 

Similar to Migrating Monoliths to Microservices -- M3 (20)

PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
PDF
Spring boot microservice metrics monitoring
Oracle Korea
 
PDF
Spring Boot - Microservice Metrics Monitoring
DonghuKIM2
 
PPTX
Introduction to microservices
Anil Allewar
 
PDF
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Red Hat Developers
 
PDF
Azure Spring Cloud Workshop - June 17, 2020
VMware Tanzu
 
PDF
Azure Service Fabric - Hamida Rebai - CCDays
CodeOps Technologies LLP
 
PPTX
SaaS transformation with OCE - uEngineCloud
uEngine Solutions
 
PPTX
Microservices
Ramesh (@Mavuluri)
 
PDF
Developing microservices with Java and applying Spring security framework and...
IRJET Journal
 
PPT
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
Eduardo Patrocinio
 
PPTX
2020-02-10 Java on Azure Solution Briefing
Ed Burns
 
DOC
Resume
Md Zahir Uddin
 
PPTX
Designing CloudStack Clouds
ShapeBlue
 
PPTX
Azure in Developer Perspective
rizaon
 
PPTX
VMware vFabric - Webinar with CIO Magazine
Al Sargent
 
PPTX
Application Centric Microservices from Redhat Summit 2015
Ken Owens
 
PDF
Developing scalable enterprise serverless applications on azure with .net
Callon Campbell
 
PDF
Building Microservices Architecture with Spring Boot and Spring Cloud
Naresh IT
 
PDF
VMworld 2013: NSX PCI Reference Architecture Workshop Session 3 - Operational...
VMworld
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Araf Karsh Hamid
 
Spring boot microservice metrics monitoring
Oracle Korea
 
Spring Boot - Microservice Metrics Monitoring
DonghuKIM2
 
Introduction to microservices
Anil Allewar
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Red Hat Developers
 
Azure Spring Cloud Workshop - June 17, 2020
VMware Tanzu
 
Azure Service Fabric - Hamida Rebai - CCDays
CodeOps Technologies LLP
 
SaaS transformation with OCE - uEngineCloud
uEngine Solutions
 
Microservices
Ramesh (@Mavuluri)
 
Developing microservices with Java and applying Spring security framework and...
IRJET Journal
 
Lessons Learned during IBM SmartCloud Orchestrator Deployment at a Large Tel...
Eduardo Patrocinio
 
2020-02-10 Java on Azure Solution Briefing
Ed Burns
 
Designing CloudStack Clouds
ShapeBlue
 
Azure in Developer Perspective
rizaon
 
VMware vFabric - Webinar with CIO Magazine
Al Sargent
 
Application Centric Microservices from Redhat Summit 2015
Ken Owens
 
Developing scalable enterprise serverless applications on azure with .net
Callon Campbell
 
Building Microservices Architecture with Spring Boot and Spring Cloud
Naresh IT
 
VMworld 2013: NSX PCI Reference Architecture Workshop Session 3 - Operational...
VMworld
 
Ad

Recently uploaded (20)

PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Ad

Migrating Monoliths to Microservices -- M3

  • 1. Migrating Monoliths to Microservices -- M3
  • 2. ©Microsoft Corporation Azure Asir Selvasingh Principal PM Architect Java on Microsoft Azure On-point for everything developers need to build, migrate and scale Java applications on Azure. Started software engineering career in the early days of Java, in 1995, and built enterprise products, applications and open source projects.
  • 3. Migrating Monoliths to Microservices -- M3
  • 7. What is microservices architecture? suite of small services its own process lightweight independently deployable different programming languages different data storage technologies
  • 8. Microservice Catalyst quickly penetrate the market  Not interested agility and speed scale
  • 9. Microservices popularized by  Frameworks  Platform  Cloud providers  Portability across platforms
  • 10. Representative companies using Java microservices
  • 11. Microservices are analogous to honeycomb aligning start small different materials Repetitive independent integrated grows organically solid abstracted reconstruct
  • 12. Monolith & N-Tier TO Microservice architecture transformation
  • 14. Microservice principles – 12 factor app (2 of 2) • • • • • • • • • • • •
  • 16. What is Spring Cloud?
  • 19. Spring Cloud Config Server Cannot embed config inside apps
  • 20. Spring Cloud Service Registry No more code or URL dependencies
  • 21. Spring Cloud LoadBalancer (client-side) • Moves beyond a single hard-coded server URL to a load-balanced solution • Provides client-side load balancing in calls to another microservice • Distributed systems demand an advanced set of routing and load balancing behaviors for microservice to microservice communications One microservice wants to call another microservice, looks up the service registry, returns all the instances of the calling microservice, caller service headache for which instance it calls
  • 22. Spring Cloud Gateway Cannot duplicate or scatter cross cutting measures across microservices – securing, routing, rate limiting, caching, monitoring, hiding services, etc.
  • 24. Example - Spring Cloud Gateway and LoadBalancer combined • Two instances of callme-service • Single instance of caller-service, which uses Spring Cloud Balancer to find the list of available instances of callme- service • callme-service ports are generated dynamically • Spring Cloud Gateway is hiding the complexity of our system from external client. It is open on 8080 and is forwarding requests to the downstream based on request context path.
  • 25. Spring Cloud Circuit Breaker and Resilience4J Failure is inevitable, but end users need not know
  • 26. Example – Spring Cloud Circuit Breaker and Resilience4j @Bean public Customizer<ReactiveResilience4JCircuitBreakerFactory> defaultCustomizer() { return factory -> factory.configureDefault(id -> new Resilience4JConfigBuilder(id) .circuitBreakerConfig(CircuitBreakerConfig.custom() .slidingWindowSize(5) .permittedNumberOfCallsInHalfOpenState(5) .failureRateThreshold(50.0F) .waitDurationInOpenState(Duration.ofMillis(30)) .build()) .timeLimiterConfig(TimeLimiterConfig.custom().timeoutDuration(Duration.ofMillis(200)).build()).build()); } • slidingWindowSize is equal to 5 • If 3 timeouts during last 5 calls, circuit is switched to OPEN state • waitDurationInOpenState is set to 30 milliseconds • after 30 milliseconds the circuit is switched to HALF_OPEN state • permittedNumberOfCallsInHalfOpenState is set to 5 • In this five attempts we get <= 2 timeouts, circuit is switched to CLOSE state
  • 27. Spring Cloud Sleuth and Zipkin – Distributed Tracing Debugging distributed apps can be complex and take long time • Spring Cloud Sleuth can instrument apps in a predictable and repeatable way • Zipkin can zero in on latency problems • Together, they trace requests through microservices • Adds trace and span ids to logs • appname: name of the app that logged the span • traceId: ID assigned to a single request, job, or action • spanId: ID of a specific operation that took place • exportable: should the log be exported to Zipkin?
  • 28. Capstone (1 of 3) - Spring Cloud components
  • 29. Capstone (2 of 3) – Spring Cloud Components Spring Cloud Apps Spring Cloud Components Spring Cloud Components Cloud Services App Consumers Breaker dashboard Service registry Distributed tracing Config dashboard IoT Mobile Browser API Gateway Microservices Microservices Microservices Message brokers Databases Build distributed systems by - • Versioning, distributing, and refreshing configuration via config server and management bus • Dynamically discovering remote dependencies • Decentralizing load balancing decisions • Preventing cascading failures through circuit breakers and bulkheads • Integrating on the behalf of specific clients via gateway • Instrumenting apps for distributed tracing
  • 30. Capstone (3 of 3) – Migrate Monolith to Microservices - M3 Decompose monolithic applications using three principles
  • 33. App Migration | Modernization Impediments
  • 34. Pattern – Backends for Frontends (BFF) Different user experiences want to make similar types of calls https://samnewman.io/patterns/architectural/bff/ Single BFF for each different type of client
  • 35. Mikado Methodology – Breaking up a Monolith The Mikado Method by Ola Ellnestam and Daniel Brolund Published by Manning Publications, 2014
  • 36. Mikado Methodology – Breaking up a Monolith Existing monolith - one entry point to the server, from which all the calls are then dispatched using an action parameter. There are three actions that can be performed: •Apply •Fetch •Approve The Mikado Method by Ola Ellnestam and Daniel Brolund Published by Manning Publications, 2014
  • 37. Break monolith into smaller, more manageable modular components https://medium.com/nick-tune-tech-strategy-blog/modelling-bounded-contexts-with-the-bounded-context-design-canvas-a-workshop-recipe-1f123e592ab
  • 38. Securing service-to- service communications and sharing user context between microservices (with the same JWT) Siriwardena, P., & Dias, N. (2020). Microservices security in action. New York: Manning Publications.
  • 39. Modernizing Batch Jobs Batch processing has been around for a long time. Since the dawn of automated computing, gathering data, running a process over it, and generating output from it have been a fundamental piece of it. As enterprises transition to the cloud, it is just natural that batch processing also migrates there. Running batch applications on a modern cloud platform is not only possible, but provides real benefits – leverage distributed batch
  • 40. Migrate to Spring Boot 2.x
  • 41. Migrate Spring Boot Monolith to Spring Microservice Apps http://say-hello/greeting http://localhost:8090/greeting
  • 42. Upgrade older variants of Spring Microservice apps Old Stack New Stack Spring Cloud Eureka Spring Cloud Service Registry Spring Cloud Netflix Zuul Spring Cloud Gateway Spring Cloud Netflix Archaius Spring Cloud Config Server Spring Cloud Netflix Ribbon Spring Cloud Load Balancer (client-side load balancer) Spring Cloud Hystrix Spring Cloud Circuit Breaker + Resilience4J Spring Cloud Netflix Turbine Micrometer + Prometheus
  • 43. Migrate Servlets to Spring Boot Apps
  • 44. Spring Microservices – Azure Hosting Options Azure Spring Cloud PCF on IaaS AKS VMs
  • 45. Spring Microservices – Azure Hosting Options Azure Spring Cloud PCF on IaaS AKS VMs
  • 46. Spring Boot Apps Variants of Spring Microservices Web Apps (Servlets) 0 Migration Routes
  • 47. Migration Routes Spring Boot Apps Variants of Spring Microservices Web Apps (Servlets) 0
  • 48. Prep Apps for Azure Spring Cloud Spring Boot Version Spring Cloud Version Azure Spring Cloud Version 2.1 Greenwich.RELEASE 2.1.2 2.2 Hoxton.SR8 Not needed 2.3 Hoxton.SR8 Not needed
  • 49. Deploy Spring Microservice Apps to Azure Spring Cloud $ az spring-cloud create –n my-spring-cloud -g my-resource-group –l westus2 $ az spring-cloud config-server set --config-file application.yml $ az spring-cloud app create -n account-service --instance-count 1 --is-public true $ az spring-cloud app deploy -n account-service --jar-path targetaccount-service.jar $ az spring-cloud app logs -f -n account-service
  • 50. Post-migration to Azure Spring Cloud
  • 54. Need Microsoft Help to Build or Migrate Your Java Apps to Azure Spring Cloud? (1 of 2) We can a) Guide your design and plan – thru architecture design session / workshop b) Help build representative proof of concepts or pilot • By customer and engineers in Java on Azure team c) Migrate your Java apps to Azure Spring Cloud • By Microsoft Consulting Services (MCS) Nominate yourself …
  • 55. Need Microsoft Help to Build or Migrate Your Java Apps to Azure Spring Cloud? (2 of 2) http://aka.ms/pilot-my-spring-cloud-apps
  • 56. Session takeaways Learning Objective – be able to Takeaways Explain microservices Covered what and why for Monolith & N-tier to Microservice architecture transformation Confront monoliths Shared recipes for transforming monoliths and several migration routes Dive deeper and go hands-on with Spring Cloud Covered base Spring Cloud components that are backbone for microservices
  • 57. Session resources 1 – Spring Cloud Spring Cloud Config Server Spring Cloud Service Registry Spring Cloud Gateway Spring Cloud Load Balancer Spring Cloud Circuit Breaker Spring Cloud Sleuth and Zipkin
  • 58. Session resources 2 - References
  • 59. Session resources 3 – Azure Spring Cloud https://docs.microsoft.com/en-us/azure/spring-cloud/ https://github.com/microsoft/azure-spring-cloud-training https://github.com/Azure-Samples/azure-spring-cloud https://github.com/Azure-Samples/spring-petclinic-microservices
  • 60. Q&A