SlideShare a Scribd company logo
Microservices with Spring Cloud
Microservices
with Spring Cloud and Kubernetes
and Istio and ...
2019.03
About me
{
“name” : “Jupil Hwang”,
“role”: “Senior Platform Architecture”,
“company”: “Pivotal”,
“email”: “jupil.hwang@gmail.com”,
”twitter”: “jupil_hwang”,
“github”: “https://github.com/namoo4u”
}
Pivotal ?
Spring Framework
Pivotal Cloud Foundry
Pivotal
Pivotal invests heavily in open-source software
“Pivotal is currently contributing as much software
to open source projects as IBM.”
Source: https://redmonk.com/jgovernor/2017/10/25/some-thoughts-on-the-top-contributors-to-github-2017/
vSphere Openstack AWS
Google
Cloud
Azure &
Azure Stack
Shared Services
Shared Security
Shared Networking
Logging & Metrics / Services Brokers / API Management
Credhub / UAA / Single Sign On
VMWare NSX
Embedded Operating System (Windows / Linux)
Application Code & Frameworks
Buildpacks / Spring Boot / Spring Cloud / Steeltoe
PAS
Pivotal Application
Service
PKS
Pivotal Container
Service
PFS
Pivotal Function
Service
Pivotal Services
Marketplace
Pivotal and
Partner Products
Any App
Every Cloud
One Platform
Concourse
Pivotal Cloud Foundry
Microservices ?
Cloud Native Application
What does cloud native mean?
● Designing the solution as a collection of
microservices that follow the recommendations
in the free ebook Beyond the 12 Factor App:
Exploring the DNA of Highly Scalable, Resilient
Cloud Applications
● Leveraging a container platform to enable
continuous delivery and continuous
deployment
● Eliminating tickets and working in a fully
automated way leveraging DevOps best
practices
● Increasing speed, security, scalability,
scalability, and saving by optimizing the right
mix of DevOps / Microservices / Continuous
Delivery and containers
I. One Codebase, One App*
II. Dependency Management*
V. Build, Release, Run*
III. Configuration*
XI. Logs*
IX. Disposability
IV. Backing Services
X. Environmental Parity*
XII. Administrative Process
VII. Port Binding*
VI. Process
VIII. Concurrency
VALUE & APPROACH
= Time to Market; find the seams; use good SDLC practices
= Dev Productivity; standardize & remove surprises
= Release Mgmt Hygiene; use CI/CD automation /w PCF
= Release Mgmt Hygiene; move to environment vars
= Real-Time Metrics; use PCF features; stdout / stderr
= Auto-Scale; move slow processes to backing services
= Resiliency / Agility; use circuit breaker; loose binding
= Reliability; use well architected PCF, get parity
= Reliability; move to backing service(s), expose as REST
= Ops Efficiency; use PCF features like routing, scaling, etc.
= Cloud Compatibility; move state to backing service(s)
= Auto-Scale, ZDD; design for cloud, use PCF features
Cloud Native Implementation
Looking Beyond 12-Factors
▪ 12-Factor Published in 2012
- In context of Heroku
- A LOT has changed
▪ New Guidance
- Emphasis on Enterprise Java
- 3 new “factors”
• API First
• Telemetry – APM, Logs, Domain-Specific
• Authn / Authz – Security First Design
▪ Must Read for Application Architects
Microservices ?
“ Loosely coupled service oriented
architecture with bounded contexts"
- Adrian Cokcroft -
If every service has to be updated in concert, it’s not loosely coupled!
If you have to know about surrounding services you don’t have a bounded context.
The structure of a microservice
http://chrisrichardson.net/post/microservices/general/2019/02/16/whats-a-service-part-1.html
Disruption
through
Product
Disruption
through
Product
Disruption
through
Product
Disruption
through
Experience
Disruption
through
Business Model
Disruption
through
Business Model
Disruption
through
Experience
Disruption
through
Product
Disruption
through
Experience
Disruption
through
Experience
Disruption
through
Product
Disruption
through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Experience
Maintaining leadership
position through
Product
Maintaining leadership
position through
Product
Maintaining leadership
position through
Product
Maintaining leadership
position through
Experience
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Experience
Maintaining leadership
position through
Product
monolithic vs microservices architecture
Business Logic
User Interface
Data Access
Layer
User Interface
Microservice
Microservice Microservice Microservice Microservice
Microservices!!!
Microservice.io
A pattern language for
microservices
by 강인호
https://www.slideshare.net/Inho
Kang2/microservice-pattern-
launguage
Microservices 의 장단점
Pros Cons
Strong Modular Boundaries Distributed Systems
Independent Deployment Eventual Consistency
Technology Diversity Operational Complexity
분산시스템의 허점
● The network is reliable
● Latency is zero
● Bandwidth is infinite
● The network is secure
● Topology doesn’t change
● There is one administrator
● Transport cost is zero
● The network is homogeneous
Spring Boot
Build Anything
Spring Cloud
Coordinate Anything
Spring Cloud Data Flow
Connect Anything
Spring by Pivotal: The Standard for Cloud Native
Java
Code Clarity | Lower Complexity | Less Tech Debt | Focus on Business Logic | Better Test Coverage | Faster Code
Completion
Spring Boot
Spring Boot
● Create stand-alone Spring applications
● Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
● Provide opinionated 'starter' dependencies to simplify your build configuration
● Automatically configure Spring and 3rd party libraries whenever possible
● Provide production-ready features such as metrics, health checks and
externalized configuration
● Absolutely no code generation and no requirement for XML configuration
Make a Web Application in 144 Char.
Simple Spring Boot Application
Netflix OSS
● Netflix needed to be faster to win / disrupt
● Pioneer and vocal proponent of microservices –
the key to their speed and success
● Netflix OSS supplies parts, but it’s not a solution
Netflix OSS
Ribbon Archaius
Eureka
FeignHystrix
Turbine
Zuul
ClientServer
Spring Cloud
+ =
Spring Cloud
✓ Service registration and discovery
✓ API gateway
✓ Client-side load balancing
✓ Git-backed configuration store
✓ Circuit breakers
✓ OAuth 2.0 security support
✓ Distributed tracing
✓ Event-driven microservices
✓ Orchestrated data pipelines
SpringBoot and Spring Cloud Service for MSA
Netflix OSS and Spring Boot 
https://medium.com/netflix-techblog/netflix-oss-and-spring-boot-coming-full-circle-4855947713a0
Circuit Breaker
Dashboard for PCF
Visualizes a stream of Turbine health
and metric data from the circuit
breakers inside your microservices or
applications.
Service Registry for
PCF
Provides an implementation of the
NetflixOSS Eureka Service Discovery
pattern, as a service.
Config Server for PCF
Delivers a dynamic, central
configuration service to manage an
application’s external properties
across all environments.
Build & Operate Microservices with Spring Cloud
Services
Spring Cloud Config Server
@SpringBootApplication
@EnableConfigServer
public class ConfigServer {
public static void main(String[] args) {
SpringApplication.run(ConfigServer.class, args);
}
}
spring:
cloud:
config:
server:
git:
uri: http://github.com/<repo>/<my-repo>.git
Greeting: Bonjour
application.yml http://github.com/<repo>/<my-
repo>/blob/master/demo.yml
Spring Cloud Config Client
@Configuration
@EnableAutoConfiguration
@RestController
public class GreetingService {
@AutoWired Greeter greeter;
@RequestMapping("/")
public String home() {
return String.format("%s World",
greeter.greeting);
}
@Component
@RefreshScope
public class Greeter {
@Value("${greeting}")
String name = "World";
}
}
spring:
application
name: demo
cloud:
config:
uri: http://my-config-server.com
bootstrap.yml
Refreshing Configuration Context
1. Update Git Repository
2. Send a POST refresh request to the application(s) to refresh
eg. curl –X POST http://my-app.com/refresh
@Component
@RefreshScope
public class Greeter {
@Value("${greeting}")
String name = "World";
}
Client Service Discovery
@SpringBootApplication
@EnableDiscoveryClient
public class MyClientApp{
public static void main(String[] args) {
SpringApplication.run(MyClientApp.class, args);
}
}
public Portfolio accountLookup(String acctId) {
Portfolio p = restTemplate.getForObject(
“http://portfolio-
service/portfolio/{accId}”,
Portfolio.class
acctId);
return p;
}
Spring Cloud Services: Service Registry
Automated deployment of server
component
Security-optimized Eureka service
instance using Oauth2
Bind into CF client application(s)
Cloud Connectors for auto-
reconfiguration
Microservice API Gateways
Netflix uses Zuul and Ribbon for
● Authentication
● Stress Testing
● Canary Testing
● Dynamic Routing
● Service Migration
● Load Shedding
● Security
● Static Response handling
● Active/Active
management
How?
public Portfolio accountLookup(String[acctId) {
Portfolio p = restTemplate.getForObject(
“http://portfolio-
service/portfolio/{accId}”,
Portfolio.class
acctId);
return p;
}
MAGIC!!
@Autowired LoadBalancerClient loadBalancer;
public void doStuff() {
ServiceInstance instance = loadBalancer.choose("stores");
URI storesUri = URI.create(String.format("http://%s:%s",
instance.getHost(), instance.getPort()));
// Do some stuff…
}
How?
API proxy will be created
at /myusers
Ribbon/Zuul creates load
balancer for Eureka
service “users_service”
All requests are
executed in a Hystrix
command
@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
public class MyAPIGateway {
public static void main(String[] args) {
SpringApplication.run(MyAPIGateway.class, args);
}
}
MAGIC!!
zuul:
routes:
users:
path: /myusers/**
serviceId: users_service
Circuit Breaker Pattern
Circuit Breaker Pattern Implementation
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
public class MyClientApp{
public static void main(String[] args) {
SpringApplication.run(MyClientApp.class, args);
}
}
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
pom.xml
@Service
public class FortuneService {
@HystrixCommand(fallbackMethod = "defaultFortune",
commandProperties = {
@HystrixProperty(name="execution.isolation.thread.timeoutInMilliseconds”, value="500")
})
public String getFortune() {
return restTemplate.getForObject("http://fortune-service", String.class);
}
public String defaultFortune() {
logger.debug("Default fortune used.");
return "This fortune is no good. Try another.";
}
}
@HystrixCommand
Hystrix Dashboard
Hystrix Dashboard
Automated deployment dashboard
+ Turbine + RabbitMQ
Bind service into app
Include starter dependency in app:
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-
circuit-breaker</artifactId>
</dependency>
Spring Cloud Services
Config Server
Circuit Breaker
Service Registry
Pivotal has bundled a number of these OSS
projects into Spring Cloud Services for PCF
Spring Cloud
https://spring.io/
Ribbon
Hystrix
Metrics
Tracer
Ribbon
Hystrix
Metrics
Tracer
Ribbon
Hystrix
Metrics
Tracer
But
● Multiple stack
● Multiple frameworks
● Polyglot (Multiple Languages)
● Legacy Applications
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
comparison of platforms
https://en.wikipedia.org/wiki/Microservices
Reduce Complexity with Kubernetes and Istio
Config Server
Service Registry
Circuit Breaker
Kubernetes Configmap
Kubernetes Services / CoreDNS, Labels
Service Mesh
?
SpringBoot and Spring Cloud Service for MSA
A Service Mesh for Microservices
https://istio.io/docs/concepts/what-is-istio/
• Service to Service Communication
(Service Discovery)
• Routing Rules
(A/B testing, Mirror)
• Retries
• Circuit Breaker
• Performance Monitoring
• Tracing
Circuit Breaker: istio
kind: DestinationRule
apiVersion: networking.istio.io/v1alpha3
metadata:
name: foo
spec:
host: foo
trafficPolicy:
connectionPool:
http: {http1MaxPendingRequests: 1, maxRequestsPerConnection: 1}
tcp: {maxConnections: 1}
outlierDetection:
baseEjectionTime: 100.000s
consecutiveErrors: 1
interval: 1.000s
maxEjectionPercent: 100
Tracing: Istio
Microservices with Kubernetes and Istio
- Reducing Microservices Architecture Complexity
https://spring.io/
Proxy - Sidecar
Ingress
Gateway
Istio Control Plane
Kubernetes
spring-cloud-kubernetes
● https://github.com/spring-cloud/spring-cloud-kubernetes/tree/master/spring-
cloud-kubernetes-examples
Istio or Spring Cloud ??
Applications – Spring Cloud
○ Fallbacks
○ Tracing Propagation
○ Security
Polyglot environments – Istio
Istio GA in July 2018.
Istio Control Plane Performance Issues
Storage NetworkingCompute
Dev / Apps
App User
IT / Ops
> kubectl
Kubernetes Dashboard
Load Balancing / Routing
Container Image
Registry
App Monitoring
App Logging
OS Updates
OS Images
K8S Updates
K8S Images
Log & Monitor
Recover & Restart
Backup & Restore
External
Data Services
Cluster
Provisioning
Provision & Scale
Command Line
/ API
Management
GUI
Monitoring
GUI
...Kubernetes alone is not enough for enterprises
Five Domains of a Cloud Native Platform
Don’t Forget About
Learning
HA Design
Hardening
Installation & Integration
Platform Continuous Delivery
DR/BC/Backup
Production Support
Auditing
Monitoring
Logging
Scaling
Upgrades & Lifecycle
Product Development & Planning...Across All of This
Comparing Spring Boot app deployment processes
Spring Boot app deployed to K8s
- Compile Spring Boot app
- Choose base Docker image
- Author Dockerfile w/ app entrypoint
- Build Docker image
- Upload image to container registry
- Decide on JVM tuning parameters to
use when starting pods
- Create kubernetes deployment config
- Use CI/CD tool or kubectl to apply
kubernetes configuration and deploy
pods
- Create service to expose pod for users
- Profit!
Spring Boot app deployed to PAS
- Compile Spring Boot app
- Create manifest.yml to describe the app
- Use CI/CD tool or cf push to deploy
- Profit!
Standardized container images
Governance enforced by the platform
Snowflake container images
Governance enforced by corporate process
65
Magic !!!
Everything
you need to
transform Process &
Culture
Build for
change
Tools
Continuously
Improve
Platform
Any App, Every Cloud,
One Platform
PCF 2.0
Tracker / Spring /
Concourse
Pivotal Labs
Data / AI
Apps
Culture, tools, and platform
Q&A

More Related Content

What's hot (20)

PPTX
Building Your Own DSL with Xtext
GlobalLogic Ukraine
 
PDF
Oracle Drivers configuration for High Availability, is it a developer's job?
Ludovico Caldara
 
PDF
Migration to Oracle Multitenant
Jitendra Singh
 
PPTX
Apache tomcat
Shashwat Shriparv
 
PPTX
VMware vSphere 6.0 - Troubleshooting Training - Day 5
Sanjeev Kumar
 
PDF
Domino server controller domino console
rchavero
 
PDF
Percona server for MySQL 제품 소개
NeoClova
 
PDF
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
PPTX
Workshop Spring - Session 4 - Spring Batch
Antoine Rey
 
PDF
Service mesh(istio) monitoring
Jeong-Ho Na
 
PPTX
Spring Boot Tutorial
Naphachara Rattanawilai
 
PDF
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
PPTX
Laravel - Website Development in Php Framework.
SWAAM Tech
 
PDF
Spring Native and Spring AOT
VMware Tanzu
 
PPTX
Spring ioc
Lhouceine OUHAMZA
 
PPTX
JDBC - JPA - Spring Data
Arturs Drozdovs
 
PPTX
ESTEM_ReactJS_S1.pptx
aissamjadli
 
PPTX
The Case for Chaos
Bruce Wong
 
PDF
API : l'architecture REST
Fadel Chafai
 
PPTX
Docker Networking Overview
Sreenivas Makam
 
Building Your Own DSL with Xtext
GlobalLogic Ukraine
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Ludovico Caldara
 
Migration to Oracle Multitenant
Jitendra Singh
 
Apache tomcat
Shashwat Shriparv
 
VMware vSphere 6.0 - Troubleshooting Training - Day 5
Sanjeev Kumar
 
Domino server controller domino console
rchavero
 
Percona server for MySQL 제품 소개
NeoClova
 
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
Workshop Spring - Session 4 - Spring Batch
Antoine Rey
 
Service mesh(istio) monitoring
Jeong-Ho Na
 
Spring Boot Tutorial
Naphachara Rattanawilai
 
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
Laravel - Website Development in Php Framework.
SWAAM Tech
 
Spring Native and Spring AOT
VMware Tanzu
 
Spring ioc
Lhouceine OUHAMZA
 
JDBC - JPA - Spring Data
Arturs Drozdovs
 
ESTEM_ReactJS_S1.pptx
aissamjadli
 
The Case for Chaos
Bruce Wong
 
API : l'architecture REST
Fadel Chafai
 
Docker Networking Overview
Sreenivas Makam
 

Similar to SpringBoot and Spring Cloud Service for MSA (20)

PPTX
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
VMware Tanzu
 
PDF
Resilient Microservices with Spring Cloud
VMware Tanzu
 
PDF
Spring Boot & Spring Cloud on Pivotal Application Service
VMware Tanzu
 
PDF
Spring and Pivotal Application Service - SpringOne Tour Dallas
VMware Tanzu
 
PDF
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
VMware Tanzu
 
PDF
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
VMware Tanzu
 
PPTX
Spring on PAS - Fabio Marinelli
VMware Tanzu
 
PDF
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
PivotalOpenSourceHub
 
PDF
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Ben Wilcock
 
PPTX
Building 12-factor Cloud Native Microservices
Jakarta_EE
 
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
PDF
Cloud-Native Patterns for Data-Intensive Applications
VMware Tanzu
 
PPTX
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
PDF
Spring and Pivotal Application Service - SpringOne Tour - Boston
VMware Tanzu
 
PDF
JJUG CCC 2018 : Lessons Learned: Spring Cloud -> Docker -> Kubernetes
Mauricio (Salaboy) Salatino
 
PPTX
Spring Boot & Spring Cloud on Pivotal Application Service - Alexandre Roman
VMware Tanzu
 
PDF
Pivotal CloudFoundry on Google cloud platform
Ronak Banka
 
PDF
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
Lightbend
 
PPTX
Delivering Cloud Native Batch Solutions - Dodd Pfeffer
VMware Tanzu
 
PDF
Live Coding 12 Factor App
Emily Jiang
 
Spring Cloud Services with Pivotal Cloud Foundry- Gokhan Goksu
VMware Tanzu
 
Resilient Microservices with Spring Cloud
VMware Tanzu
 
Spring Boot & Spring Cloud on Pivotal Application Service
VMware Tanzu
 
Spring and Pivotal Application Service - SpringOne Tour Dallas
VMware Tanzu
 
Eseguire Applicazioni Cloud-Native con Pivotal Cloud Foundry su Google Cloud ...
VMware Tanzu
 
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
VMware Tanzu
 
Spring on PAS - Fabio Marinelli
VMware Tanzu
 
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
PivotalOpenSourceHub
 
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Ben Wilcock
 
Building 12-factor Cloud Native Microservices
Jakarta_EE
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
Cloud-Native Patterns for Data-Intensive Applications
VMware Tanzu
 
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
Spring and Pivotal Application Service - SpringOne Tour - Boston
VMware Tanzu
 
JJUG CCC 2018 : Lessons Learned: Spring Cloud -> Docker -> Kubernetes
Mauricio (Salaboy) Salatino
 
Spring Boot & Spring Cloud on Pivotal Application Service - Alexandre Roman
VMware Tanzu
 
Pivotal CloudFoundry on Google cloud platform
Ronak Banka
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
Lightbend
 
Delivering Cloud Native Batch Solutions - Dodd Pfeffer
VMware Tanzu
 
Live Coding 12 Factor App
Emily Jiang
 
Ad

More from Oracle Korea (20)

PDF
Oracle Blockchain Platform_Wonjo Yoo
Oracle Korea
 
PDF
Oracle Blockchain_JaeHo Park_CTO
Oracle Korea
 
PDF
Oracle cloud data interface
Oracle Korea
 
PDF
On premise db &amp; cloud database
Oracle Korea
 
PDF
Spring boot microservice metrics monitoring
Oracle Korea
 
PDF
Opentracing jaeger
Oracle Korea
 
PDF
Which Questions We Should Have
Oracle Korea
 
PDF
Oracle NoSQL
Oracle Korea
 
PDF
Enterprise Postgres
Oracle Korea
 
PDF
MySQL Document Store를 활용한 NoSQL 개발
Oracle Korea
 
PDF
API Design Principles Essential 
Oracle Korea
 
PDF
CI/CD 기반의 Microservice 개발
Oracle Korea
 
PDF
kubernetes from beginner to advanced
Oracle Korea
 
PDF
OpenJDK & Graalvm
Oracle Korea
 
PDF
Cloud Native 자바 플랫폼: Graalvm Overview
Oracle Korea
 
PDF
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Oracle Korea
 
PDF
times ten in-memory database for extreme performance
Oracle Korea
 
PDF
[Main Session] 카프카, 데이터 플랫폼의 최강자
Oracle Korea
 
PDF
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
Oracle Korea
 
PDF
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
Oracle Korea
 
Oracle Blockchain Platform_Wonjo Yoo
Oracle Korea
 
Oracle Blockchain_JaeHo Park_CTO
Oracle Korea
 
Oracle cloud data interface
Oracle Korea
 
On premise db &amp; cloud database
Oracle Korea
 
Spring boot microservice metrics monitoring
Oracle Korea
 
Opentracing jaeger
Oracle Korea
 
Which Questions We Should Have
Oracle Korea
 
Oracle NoSQL
Oracle Korea
 
Enterprise Postgres
Oracle Korea
 
MySQL Document Store를 활용한 NoSQL 개발
Oracle Korea
 
API Design Principles Essential 
Oracle Korea
 
CI/CD 기반의 Microservice 개발
Oracle Korea
 
kubernetes from beginner to advanced
Oracle Korea
 
OpenJDK & Graalvm
Oracle Korea
 
Cloud Native 자바 플랫폼: Graalvm Overview
Oracle Korea
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Oracle Korea
 
times ten in-memory database for extreme performance
Oracle Korea
 
[Main Session] 카프카, 데이터 플랫폼의 최강자
Oracle Korea
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
Oracle Korea
 
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
Oracle Korea
 
Ad

Recently uploaded (20)

PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 

SpringBoot and Spring Cloud Service for MSA

  • 2. Microservices with Spring Cloud and Kubernetes and Istio and ... 2019.03
  • 3. About me { “name” : “Jupil Hwang”, “role”: “Senior Platform Architecture”, “company”: “Pivotal”, “email”: “[email protected]”, ”twitter”: “jupil_hwang”, “github”: “https://github.com/namoo4u” }
  • 6. Pivotal invests heavily in open-source software “Pivotal is currently contributing as much software to open source projects as IBM.” Source: https://redmonk.com/jgovernor/2017/10/25/some-thoughts-on-the-top-contributors-to-github-2017/
  • 7. vSphere Openstack AWS Google Cloud Azure & Azure Stack Shared Services Shared Security Shared Networking Logging & Metrics / Services Brokers / API Management Credhub / UAA / Single Sign On VMWare NSX Embedded Operating System (Windows / Linux) Application Code & Frameworks Buildpacks / Spring Boot / Spring Cloud / Steeltoe PAS Pivotal Application Service PKS Pivotal Container Service PFS Pivotal Function Service Pivotal Services Marketplace Pivotal and Partner Products Any App Every Cloud One Platform Concourse Pivotal Cloud Foundry
  • 10. What does cloud native mean? ● Designing the solution as a collection of microservices that follow the recommendations in the free ebook Beyond the 12 Factor App: Exploring the DNA of Highly Scalable, Resilient Cloud Applications ● Leveraging a container platform to enable continuous delivery and continuous deployment ● Eliminating tickets and working in a fully automated way leveraging DevOps best practices ● Increasing speed, security, scalability, scalability, and saving by optimizing the right mix of DevOps / Microservices / Continuous Delivery and containers
  • 11. I. One Codebase, One App* II. Dependency Management* V. Build, Release, Run* III. Configuration* XI. Logs* IX. Disposability IV. Backing Services X. Environmental Parity* XII. Administrative Process VII. Port Binding* VI. Process VIII. Concurrency VALUE & APPROACH = Time to Market; find the seams; use good SDLC practices = Dev Productivity; standardize & remove surprises = Release Mgmt Hygiene; use CI/CD automation /w PCF = Release Mgmt Hygiene; move to environment vars = Real-Time Metrics; use PCF features; stdout / stderr = Auto-Scale; move slow processes to backing services = Resiliency / Agility; use circuit breaker; loose binding = Reliability; use well architected PCF, get parity = Reliability; move to backing service(s), expose as REST = Ops Efficiency; use PCF features like routing, scaling, etc. = Cloud Compatibility; move state to backing service(s) = Auto-Scale, ZDD; design for cloud, use PCF features Cloud Native Implementation
  • 12. Looking Beyond 12-Factors ▪ 12-Factor Published in 2012 - In context of Heroku - A LOT has changed ▪ New Guidance - Emphasis on Enterprise Java - 3 new “factors” • API First • Telemetry – APM, Logs, Domain-Specific • Authn / Authz – Security First Design ▪ Must Read for Application Architects
  • 14. “ Loosely coupled service oriented architecture with bounded contexts" - Adrian Cokcroft - If every service has to be updated in concert, it’s not loosely coupled! If you have to know about surrounding services you don’t have a bounded context.
  • 15. The structure of a microservice http://chrisrichardson.net/post/microservices/general/2019/02/16/whats-a-service-part-1.html
  • 17. Maintaining leadership position through Business Model Maintaining leadership position through Business Model Maintaining leadership position through Business Model Maintaining leadership position through Experience Maintaining leadership position through Product Maintaining leadership position through Product Maintaining leadership position through Product Maintaining leadership position through Experience Maintaining leadership position through Business Model Maintaining leadership position through Business Model Maintaining leadership position through Experience Maintaining leadership position through Product
  • 18. monolithic vs microservices architecture Business Logic User Interface Data Access Layer User Interface Microservice Microservice Microservice Microservice Microservice
  • 20. Microservice.io A pattern language for microservices by 강인호 https://www.slideshare.net/Inho Kang2/microservice-pattern- launguage
  • 21. Microservices 의 장단점 Pros Cons Strong Modular Boundaries Distributed Systems Independent Deployment Eventual Consistency Technology Diversity Operational Complexity
  • 22. 분산시스템의 허점 ● The network is reliable ● Latency is zero ● Bandwidth is infinite ● The network is secure ● Topology doesn’t change ● There is one administrator ● Transport cost is zero ● The network is homogeneous
  • 23. Spring Boot Build Anything Spring Cloud Coordinate Anything Spring Cloud Data Flow Connect Anything Spring by Pivotal: The Standard for Cloud Native Java Code Clarity | Lower Complexity | Less Tech Debt | Focus on Business Logic | Better Test Coverage | Faster Code Completion
  • 25. Spring Boot ● Create stand-alone Spring applications ● Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files) ● Provide opinionated 'starter' dependencies to simplify your build configuration ● Automatically configure Spring and 3rd party libraries whenever possible ● Provide production-ready features such as metrics, health checks and externalized configuration ● Absolutely no code generation and no requirement for XML configuration
  • 26. Make a Web Application in 144 Char. Simple Spring Boot Application
  • 27. Netflix OSS ● Netflix needed to be faster to win / disrupt ● Pioneer and vocal proponent of microservices – the key to their speed and success ● Netflix OSS supplies parts, but it’s not a solution
  • 29. Spring Cloud + = Spring Cloud ✓ Service registration and discovery ✓ API gateway ✓ Client-side load balancing ✓ Git-backed configuration store ✓ Circuit breakers ✓ OAuth 2.0 security support ✓ Distributed tracing ✓ Event-driven microservices ✓ Orchestrated data pipelines
  • 31. Netflix OSS and Spring Boot  https://medium.com/netflix-techblog/netflix-oss-and-spring-boot-coming-full-circle-4855947713a0
  • 32. Circuit Breaker Dashboard for PCF Visualizes a stream of Turbine health and metric data from the circuit breakers inside your microservices or applications. Service Registry for PCF Provides an implementation of the NetflixOSS Eureka Service Discovery pattern, as a service. Config Server for PCF Delivers a dynamic, central configuration service to manage an application’s external properties across all environments. Build & Operate Microservices with Spring Cloud Services
  • 33. Spring Cloud Config Server @SpringBootApplication @EnableConfigServer public class ConfigServer { public static void main(String[] args) { SpringApplication.run(ConfigServer.class, args); } } spring: cloud: config: server: git: uri: http://github.com/<repo>/<my-repo>.git Greeting: Bonjour application.yml http://github.com/<repo>/<my- repo>/blob/master/demo.yml
  • 34. Spring Cloud Config Client @Configuration @EnableAutoConfiguration @RestController public class GreetingService { @AutoWired Greeter greeter; @RequestMapping("/") public String home() { return String.format("%s World", greeter.greeting); } @Component @RefreshScope public class Greeter { @Value("${greeting}") String name = "World"; } } spring: application name: demo cloud: config: uri: http://my-config-server.com bootstrap.yml
  • 35. Refreshing Configuration Context 1. Update Git Repository 2. Send a POST refresh request to the application(s) to refresh eg. curl –X POST http://my-app.com/refresh @Component @RefreshScope public class Greeter { @Value("${greeting}") String name = "World"; }
  • 36. Client Service Discovery @SpringBootApplication @EnableDiscoveryClient public class MyClientApp{ public static void main(String[] args) { SpringApplication.run(MyClientApp.class, args); } } public Portfolio accountLookup(String acctId) { Portfolio p = restTemplate.getForObject( “http://portfolio- service/portfolio/{accId}”, Portfolio.class acctId); return p; }
  • 37. Spring Cloud Services: Service Registry Automated deployment of server component Security-optimized Eureka service instance using Oauth2 Bind into CF client application(s) Cloud Connectors for auto- reconfiguration
  • 38. Microservice API Gateways Netflix uses Zuul and Ribbon for ● Authentication ● Stress Testing ● Canary Testing ● Dynamic Routing ● Service Migration ● Load Shedding ● Security ● Static Response handling ● Active/Active management
  • 39. How? public Portfolio accountLookup(String[acctId) { Portfolio p = restTemplate.getForObject( “http://portfolio- service/portfolio/{accId}”, Portfolio.class acctId); return p; } MAGIC!! @Autowired LoadBalancerClient loadBalancer; public void doStuff() { ServiceInstance instance = loadBalancer.choose("stores"); URI storesUri = URI.create(String.format("http://%s:%s", instance.getHost(), instance.getPort())); // Do some stuff… }
  • 40. How? API proxy will be created at /myusers Ribbon/Zuul creates load balancer for Eureka service “users_service” All requests are executed in a Hystrix command @SpringBootApplication @EnableZuulProxy @EnableDiscoveryClient public class MyAPIGateway { public static void main(String[] args) { SpringApplication.run(MyAPIGateway.class, args); } } MAGIC!! zuul: routes: users: path: /myusers/** serviceId: users_service
  • 42. Circuit Breaker Pattern Implementation @SpringBootApplication @EnableDiscoveryClient @EnableCircuitBreaker public class MyClientApp{ public static void main(String[] args) { SpringApplication.run(MyClientApp.class, args); } } <dependency> <groupId>io.pivotal.spring.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> </dependency> pom.xml
  • 43. @Service public class FortuneService { @HystrixCommand(fallbackMethod = "defaultFortune", commandProperties = { @HystrixProperty(name="execution.isolation.thread.timeoutInMilliseconds”, value="500") }) public String getFortune() { return restTemplate.getForObject("http://fortune-service", String.class); } public String defaultFortune() { logger.debug("Default fortune used."); return "This fortune is no good. Try another."; } } @HystrixCommand
  • 45. Hystrix Dashboard Automated deployment dashboard + Turbine + RabbitMQ Bind service into app Include starter dependency in app: <dependency> <groupId>io.pivotal.spring.cloud</groupId> <artifactId>spring-cloud-services-starter- circuit-breaker</artifactId> </dependency>
  • 46. Spring Cloud Services Config Server Circuit Breaker Service Registry Pivotal has bundled a number of these OSS projects into Spring Cloud Services for PCF
  • 48. But ● Multiple stack ● Multiple frameworks ● Polyglot (Multiple Languages) ● Legacy Applications
  • 52. Reduce Complexity with Kubernetes and Istio Config Server Service Registry Circuit Breaker Kubernetes Configmap Kubernetes Services / CoreDNS, Labels Service Mesh ?
  • 54. A Service Mesh for Microservices https://istio.io/docs/concepts/what-is-istio/ • Service to Service Communication (Service Discovery) • Routing Rules (A/B testing, Mirror) • Retries • Circuit Breaker • Performance Monitoring • Tracing
  • 55. Circuit Breaker: istio kind: DestinationRule apiVersion: networking.istio.io/v1alpha3 metadata: name: foo spec: host: foo trafficPolicy: connectionPool: http: {http1MaxPendingRequests: 1, maxRequestsPerConnection: 1} tcp: {maxConnections: 1} outlierDetection: baseEjectionTime: 100.000s consecutiveErrors: 1 interval: 1.000s maxEjectionPercent: 100
  • 57. Microservices with Kubernetes and Istio - Reducing Microservices Architecture Complexity https://spring.io/ Proxy - Sidecar Ingress Gateway Istio Control Plane Kubernetes
  • 59. Istio or Spring Cloud ?? Applications – Spring Cloud ○ Fallbacks ○ Tracing Propagation ○ Security Polyglot environments – Istio Istio GA in July 2018. Istio Control Plane Performance Issues
  • 60. Storage NetworkingCompute Dev / Apps App User IT / Ops > kubectl Kubernetes Dashboard Load Balancing / Routing Container Image Registry App Monitoring App Logging OS Updates OS Images K8S Updates K8S Images Log & Monitor Recover & Restart Backup & Restore External Data Services Cluster Provisioning Provision & Scale Command Line / API Management GUI Monitoring GUI ...Kubernetes alone is not enough for enterprises
  • 61. Five Domains of a Cloud Native Platform
  • 62. Don’t Forget About Learning HA Design Hardening Installation & Integration Platform Continuous Delivery DR/BC/Backup Production Support Auditing Monitoring Logging Scaling Upgrades & Lifecycle Product Development & Planning...Across All of This
  • 63. Comparing Spring Boot app deployment processes Spring Boot app deployed to K8s - Compile Spring Boot app - Choose base Docker image - Author Dockerfile w/ app entrypoint - Build Docker image - Upload image to container registry - Decide on JVM tuning parameters to use when starting pods - Create kubernetes deployment config - Use CI/CD tool or kubectl to apply kubernetes configuration and deploy pods - Create service to expose pod for users - Profit! Spring Boot app deployed to PAS - Compile Spring Boot app - Create manifest.yml to describe the app - Use CI/CD tool or cf push to deploy - Profit! Standardized container images Governance enforced by the platform Snowflake container images Governance enforced by corporate process
  • 64. 65
  • 66. Everything you need to transform Process & Culture Build for change Tools Continuously Improve Platform Any App, Every Cloud, One Platform PCF 2.0 Tracker / Spring / Concourse Pivotal Labs Data / AI Apps Culture, tools, and platform
  • 67. Q&A