SlideShare a Scribd company logo
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 1
th
김동후
donghu.kim@oracle.com
Spring Boot: Microservice Metrics Monitoring
2019.06.15
12
thOracle
Developer
Meetup
Architecture Evolution:
From Monolithic to Microservices Architecture
Image Source: https://blogs.sap.com/2015/02/25/microservices-the-dismantle-of-the-monolith/
(Single Unit) (Coarse-grained) (Fine-grained)
Monolithic (Pre-SOA) SOA Microservices
Amazon, 2008 Hailo, 2014Netflix, 2012 Twitter, 2013 The Empire
Image Source:
Netflix: http://codeobsession.blogspot.com/2018/02/architecture-at-different-levels-of.html
Twitter: https://blog.twitter.com/engineering/en_us/a/2013/observability-at-twitter.html
Hail-o: https://www.instana.com/blog/introducing-dynamic-focus-application-performance-management/
Amazon: https://aws-de-media.s3.amazonaws.com/images/AWS_Summit_Berlin_2016/sessions/pushing_the_boundaries_1300_microservices_on_aws.pdf
The Empire: https://www.ixxiyourworld.com/en/products/ixxi-images/death-star-4/
Death Star Diagrams
Challenges in Microservices Architecture
Image Source: https://dzone.com/articles/challenges-in-implementing-microservices
Use the Force.
Spring Boot - Microservice Metrics Monitoring
What to Measure?
Metrics
Tracing
Logging
+ Fault
Tolerance
Metrics
An Introduction to Metrics Monitoring
Application Metrics
System Metrics
CPU & Memory usage, Network, Disk I/O
, JVM (Threads, Heap, GC), etc
Request Volume, Duration, Size, Error and Timeout,
Latency, Http Error Codes, Health,
Custom (Counter, Timer, Gauge), etc
CNCF Cloud Native Interactive Landscape
Monitoring: Spring Boot Admin
Created by a company called Codecentric
Open source monitoring software for Spring Boot Actuator
Monitoring: Prometheus
Prometheus is an open-source systems monitoring
and alerting toolkit originally built at SoundCloud
A Monitoring System and Time Series Database
Suited for Containers and Microservices
Monitoring: Grafana
Grafana is an open source, feature rich metrics dashboard
and graph editor for Graphite, Elasticsearch,
OpenTSDB, Prometheus and InfluxDB.
Grafana supports over 30 open source and
commercial data sources.
Monitoring: Prometheus and Grafana
https://docs.cloudposse.com/monitoring-and-alerting/prometheus/
Monitoring with Service Discovery
Service discovery is the automatic detection of devices and services offered by these
devices on a computer network. A service discovery protocol (SDP) is a network
protocol that helps accomplish service discovery. Service discovery aims to reduce the
configuration efforts from users. Wikipedia
https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/
Monitoring with Service Discovery
Discovery
Server
Service A
Service C
Service D
Service E
Discovery
Server
Service A
Service C
Service D
Service E
Load
Balancer
REQUEST
REGISTER
QUERY
The Client-Side Discovery Pattern The Server-Side Discovery Pattern
Monitoring
Server
Monitoring
Server
Service Discovery: Netflix Eureka
https://coe.gitbook.io/guide/service-discovery/eureka
Eureka is a REST based service that is primarily used
in the AWS cloud for locating services for the purpose
of load balancing and failover of middle-tier servers.
At Netflix, Eureka is used for the following purposes
apart from playing a critical part in mid-tier
load balancing.
Service Discovery: Hashicorp Consul
Consul is a service mesh solution providing
a full featured control plane with service discovery,
configuration, and segmentation functionality.
• Service Discovery
• Health Checking
• KV Store
• Secure Service Communication
• Multi Datacenter
Spring Boot Actuator and Micrometer
Micrometer
Micrometer is the metrics collection facility included in Spring Boot 2's Actuator
Spring Boot Actuator
Prometheus, AppOptics, Azure Monitor,
Netflix Atlas, CloudWatch, Datadog, Dynatrace, 
Elastic, Ganglia, Graphite, Humio, Influx/
Telegraf, JMX, KairosDB, New Relic, SignalFx,
Google Stackdriver, StatsD, and Wavefront.
Think SLF4J,
but for Metrics
To help you
monitor and manage
your Spring application
Spring Boot: Microservices Metrics Monitoring
Lab 1: Spring Boot Monitoring with Spring Boot Admin
Love Calculator
Service
Yes-Or-No
Consumer
Love Calculator
Consumer
Love Calculator Application
Love Calculator
Open API
Yes or No
Open API
https://github.com/MangDan/sb-metrics-monitoring-handson
http://localhost:8082/love-calculator-consumer
http://localhost:8083/yes-or-no-consumer
http://localhost:8081/love-calculator
LAB Setup
https://github.com/MangDan/sb-metrics-monitoring-handson
1. 전체 프로그램 및 예제 소스 다운로드
2. 설치 및 환경 구성
2.1 Path 설정 (Java, Maven)
2.2 Eclipse STS (Spring Tool Suite) 설정 (Windows는 구성되어 있으며, macOS 사용자는 가이드 참고)
2.3 Eclipse STS 실행 후 프로젝트 확인 (6개)
2.4 서비스 시작 및 테스트
2.5 서비스 종료
오픈된 커맨드 창 종료(닫기)
c:setx path "%PATH%;c:oracle_dev_meetup0615_windowsjdk-12bin;c:oracle_dev_meetup0615_windowsapache-maven-3.6.1bin;
c:cd oracle_dev_meetup0615_windowssts_workspace
c:oracle_dev_meetup0615_windowssts_workspacestart-all-svc.cmd
Lab 1: Spring Boot Monitoring with Spring Boot Admin
Love Calculator
Service
Love Calculator
Consumer
Yes-Or-No
Consumer
Spring Boot Admin
/actuator
/actuator
/actuator
Love Calculator
Application
https://github.com/MangDan/sb-metrics-monitoring-handson/blob/master/HOL-PART1.md
1. Spring Boot Admin 서버 프로젝트 생성 (선택) 및 실행
2. 각 서비스별로 pom.xml 의존성(dependency) 설정
3. 각 서비스별로 application.properties 설정
4. 모든 서비스 시작 (start-all-svc.cmd)
5. Spring Boot Admin 서버 시작 및 대시보드 확인
6. 모든 서비스 종료 (커맨드 창 종료/닫기)
http://localhost:8090
Lab 2: Spring Boot Monitoring with Eureka and Spring Boot
https://github.com/MangDan/sb-metrics-monitoring-handson/blob/master/HOL-PART2.md
Love Calculator
Service
Love Calculator
Consumer
Yes-Or-No
Consumer
Spring Boot Admin
/actuator
/actuator
/actuator
Love Calculator
Application
Eureka
1. Eureka Server 서버 프로젝트 생성 (선택) 및 시작
2. 각 서비스별로 pom.xml 의존성(dependency) 설정
3. 각 서비스별로 application.properties 설정
4. 각 서비스별로 ~Application.java 설정
5. 서비스 시작 (start-all-svc.cmd)
6. Spring Boot Admin 서버 시작 및 대시보드 확인
http://localhost:8761/eureka
http://localhost:8090
Lab 3: Spring Boot Monitoring with Consul and Prometheus, Grafana
https://github.com/MangDan/sb-metrics-monitoring-handson/blob/master/HOL-PART3.md
Love Calculator
Service
Love Calculator
Consumer
Yes-Or-No
Consumer
/actuator
/actuator
/actuator
Love Calculator
Application
Consul
1. Consul 서버 시작
2. 각 서비스별로 pom.xml 의존성(dependency) 설정
3. 각 서비스별로 application.properties 설정
4. 각 서비스별로 ~Application.java 설정
5. 서비스 시작 (start-all-svc.cmd)
6. Prometheus 서버 설정 및 시작
7. Grafana 서버 시작 및 설정, 대시보드 확인
Prometheus
Grafana
http://localhost:9090
http://localhost:3000
http://localhost:8500/ui
Summary
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted
감사합니다
25

More Related Content

PDF
Ansible with oci
PDF
BOSH / CF Deployment in modern ways #cf_tokyo
PDF
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
PDF
Short Lived Tasks in Cloud Foundry #cfdtokyo
PDF
Microservice With Spring Boot and Spring Cloud
PDF
Introduction to Spring WebFlux #jsug #sf_a1
PDF
Automating the Network
PDF
Introduction to Cloud Foundry #JJUG
Ansible with oci
BOSH / CF Deployment in modern ways #cf_tokyo
Java Microservices with Spring Boot and Spring Cloud - Denver JUG 2019
Short Lived Tasks in Cloud Foundry #cfdtokyo
Microservice With Spring Boot and Spring Cloud
Introduction to Spring WebFlux #jsug #sf_a1
Automating the Network
Introduction to Cloud Foundry #JJUG

What's hot (20)

ODP
Server-side OSGi with Apache Sling
ODP
Server-side OSGi with Apache Sling (Jazoon 2010)
PDF
Why PCF is the best platform for Spring Boot
PPTX
Automating Azure VMs with PowerShell
DOCX
Guide - Migrating from Heroku to AWS using CloudFormation
PDF
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
PPTX
Moving From Actions & Behaviors to Microservices
PDF
Spring Boot & Actuators
PDF
Spring Boot Actuator
PDF
A Series of Fortunate Events: Building an Operator in Java
PDF
Dev stacklabguide
PPTX
Java on Azure JJUG Night Seminar 2016 0322
PDF
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
PDF
Spring Boot Actuator 2.0 & Micrometer
PDF
Oracle Enterprise manager 13c Installation
PDF
Microservices with Spring and Cloud Foundry
PPTX
Scaling Development Environments with Docker
PPTX
Owin from spec to application
PPTX
Automating MySQL Deployments on Kubernetes
PDF
Introduction To Apache Mesos
Server-side OSGi with Apache Sling
Server-side OSGi with Apache Sling (Jazoon 2010)
Why PCF is the best platform for Spring Boot
Automating Azure VMs with PowerShell
Guide - Migrating from Heroku to AWS using CloudFormation
Staying Ahead of the Curve with Spring and Cassandra 4 (SpringOne 2020)
Moving From Actions & Behaviors to Microservices
Spring Boot & Actuators
Spring Boot Actuator
A Series of Fortunate Events: Building an Operator in Java
Dev stacklabguide
Java on Azure JJUG Night Seminar 2016 0322
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Spring Boot Actuator 2.0 & Micrometer
Oracle Enterprise manager 13c Installation
Microservices with Spring and Cloud Foundry
Scaling Development Environments with Docker
Owin from spec to application
Automating MySQL Deployments on Kubernetes
Introduction To Apache Mesos
Ad

Similar to Spring Boot - Microservice Metrics Monitoring (20)

PPTX
Build12 factorappusingmp
PDF
Cloud APIs Overview Tucker
PPTX
Simplify DevOps with Microservices and Mobile Backends.pptx
PPTX
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
PDF
The Future of Cloud Innovation, featuring Adrian Cockcroft
PPTX
Microservices
PPTX
Monoliths to Microservices with Jave EE and Spring Boot
PDF
8 - OpenShift - A look at a container platform: what's in the box
PPTX
Session 41 - Struts 2 Introduction
PPTX
Building 12-factor Cloud Native Microservices
PDF
Surekha_haoop_exp
PDF
Building Microservices Architecture with Spring Boot and Spring Cloud
PDF
All About Microservices and OpenSource Microservice Frameworks
PPSX
Struts 2 - Introduction
PPT
COMPRO- WEB ALBUM & MOTION ANALYZER
PPTX
Vijay Oscon
PDF
"Wie passen Serverless & Autonomous zusammen?"
PDF
03 monoliths to microservices with java ee and spring boot
PPTX
Microservices with kubernetes @190316
PDF
Developing microservices with Java and applying Spring security framework and...
Build12 factorappusingmp
Cloud APIs Overview Tucker
Simplify DevOps with Microservices and Mobile Backends.pptx
Don't Deploy Into the Dark: DORA Metrics for your K8s GitOps Deployments
The Future of Cloud Innovation, featuring Adrian Cockcroft
Microservices
Monoliths to Microservices with Jave EE and Spring Boot
8 - OpenShift - A look at a container platform: what's in the box
Session 41 - Struts 2 Introduction
Building 12-factor Cloud Native Microservices
Surekha_haoop_exp
Building Microservices Architecture with Spring Boot and Spring Cloud
All About Microservices and OpenSource Microservice Frameworks
Struts 2 - Introduction
COMPRO- WEB ALBUM & MOTION ANALYZER
Vijay Oscon
"Wie passen Serverless & Autonomous zusammen?"
03 monoliths to microservices with java ee and spring boot
Microservices with kubernetes @190316
Developing microservices with Java and applying Spring security framework and...
Ad

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Empathic Computing: Creating Shared Understanding
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
Encapsulation theory and applications.pdf
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
Advanced methodologies resolving dimensionality complications for autism neur...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Empathic Computing: Creating Shared Understanding
20250228 LYD VKU AI Blended-Learning.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction

Spring Boot - Microservice Metrics Monitoring

  • 1. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 1 th 김동후 donghu.kim@oracle.com Spring Boot: Microservice Metrics Monitoring 2019.06.15 12 thOracle Developer Meetup
  • 2. Architecture Evolution: From Monolithic to Microservices Architecture Image Source: https://blogs.sap.com/2015/02/25/microservices-the-dismantle-of-the-monolith/ (Single Unit) (Coarse-grained) (Fine-grained) Monolithic (Pre-SOA) SOA Microservices
  • 3. Amazon, 2008 Hailo, 2014Netflix, 2012 Twitter, 2013 The Empire Image Source: Netflix: http://codeobsession.blogspot.com/2018/02/architecture-at-different-levels-of.html Twitter: https://blog.twitter.com/engineering/en_us/a/2013/observability-at-twitter.html Hail-o: https://www.instana.com/blog/introducing-dynamic-focus-application-performance-management/ Amazon: https://aws-de-media.s3.amazonaws.com/images/AWS_Summit_Berlin_2016/sessions/pushing_the_boundaries_1300_microservices_on_aws.pdf The Empire: https://www.ixxiyourworld.com/en/products/ixxi-images/death-star-4/ Death Star Diagrams
  • 4. Challenges in Microservices Architecture Image Source: https://dzone.com/articles/challenges-in-implementing-microservices
  • 8. An Introduction to Metrics Monitoring Application Metrics System Metrics CPU & Memory usage, Network, Disk I/O , JVM (Threads, Heap, GC), etc Request Volume, Duration, Size, Error and Timeout, Latency, Http Error Codes, Health, Custom (Counter, Timer, Gauge), etc CNCF Cloud Native Interactive Landscape
  • 9. Monitoring: Spring Boot Admin Created by a company called Codecentric Open source monitoring software for Spring Boot Actuator
  • 10. Monitoring: Prometheus Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud A Monitoring System and Time Series Database Suited for Containers and Microservices
  • 11. Monitoring: Grafana Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB. Grafana supports over 30 open source and commercial data sources.
  • 12. Monitoring: Prometheus and Grafana https://docs.cloudposse.com/monitoring-and-alerting/prometheus/
  • 13. Monitoring with Service Discovery Service discovery is the automatic detection of devices and services offered by these devices on a computer network. A service discovery protocol (SDP) is a network protocol that helps accomplish service discovery. Service discovery aims to reduce the configuration efforts from users. Wikipedia https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/
  • 14. Monitoring with Service Discovery Discovery Server Service A Service C Service D Service E Discovery Server Service A Service C Service D Service E Load Balancer REQUEST REGISTER QUERY The Client-Side Discovery Pattern The Server-Side Discovery Pattern Monitoring Server Monitoring Server
  • 15. Service Discovery: Netflix Eureka https://coe.gitbook.io/guide/service-discovery/eureka Eureka is a REST based service that is primarily used in the AWS cloud for locating services for the purpose of load balancing and failover of middle-tier servers. At Netflix, Eureka is used for the following purposes apart from playing a critical part in mid-tier load balancing.
  • 16. Service Discovery: Hashicorp Consul Consul is a service mesh solution providing a full featured control plane with service discovery, configuration, and segmentation functionality. • Service Discovery • Health Checking • KV Store • Secure Service Communication • Multi Datacenter
  • 17. Spring Boot Actuator and Micrometer Micrometer Micrometer is the metrics collection facility included in Spring Boot 2's Actuator Spring Boot Actuator Prometheus, AppOptics, Azure Monitor, Netflix Atlas, CloudWatch, Datadog, Dynatrace,  Elastic, Ganglia, Graphite, Humio, Influx/ Telegraf, JMX, KairosDB, New Relic, SignalFx, Google Stackdriver, StatsD, and Wavefront. Think SLF4J, but for Metrics To help you monitor and manage your Spring application
  • 18. Spring Boot: Microservices Metrics Monitoring
  • 19. Lab 1: Spring Boot Monitoring with Spring Boot Admin Love Calculator Service Yes-Or-No Consumer Love Calculator Consumer Love Calculator Application Love Calculator Open API Yes or No Open API https://github.com/MangDan/sb-metrics-monitoring-handson http://localhost:8082/love-calculator-consumer http://localhost:8083/yes-or-no-consumer http://localhost:8081/love-calculator
  • 20. LAB Setup https://github.com/MangDan/sb-metrics-monitoring-handson 1. 전체 프로그램 및 예제 소스 다운로드 2. 설치 및 환경 구성 2.1 Path 설정 (Java, Maven) 2.2 Eclipse STS (Spring Tool Suite) 설정 (Windows는 구성되어 있으며, macOS 사용자는 가이드 참고) 2.3 Eclipse STS 실행 후 프로젝트 확인 (6개) 2.4 서비스 시작 및 테스트 2.5 서비스 종료 오픈된 커맨드 창 종료(닫기) c:setx path "%PATH%;c:oracle_dev_meetup0615_windowsjdk-12bin;c:oracle_dev_meetup0615_windowsapache-maven-3.6.1bin; c:cd oracle_dev_meetup0615_windowssts_workspace c:oracle_dev_meetup0615_windowssts_workspacestart-all-svc.cmd
  • 21. Lab 1: Spring Boot Monitoring with Spring Boot Admin Love Calculator Service Love Calculator Consumer Yes-Or-No Consumer Spring Boot Admin /actuator /actuator /actuator Love Calculator Application https://github.com/MangDan/sb-metrics-monitoring-handson/blob/master/HOL-PART1.md 1. Spring Boot Admin 서버 프로젝트 생성 (선택) 및 실행 2. 각 서비스별로 pom.xml 의존성(dependency) 설정 3. 각 서비스별로 application.properties 설정 4. 모든 서비스 시작 (start-all-svc.cmd) 5. Spring Boot Admin 서버 시작 및 대시보드 확인 6. 모든 서비스 종료 (커맨드 창 종료/닫기) http://localhost:8090
  • 22. Lab 2: Spring Boot Monitoring with Eureka and Spring Boot https://github.com/MangDan/sb-metrics-monitoring-handson/blob/master/HOL-PART2.md Love Calculator Service Love Calculator Consumer Yes-Or-No Consumer Spring Boot Admin /actuator /actuator /actuator Love Calculator Application Eureka 1. Eureka Server 서버 프로젝트 생성 (선택) 및 시작 2. 각 서비스별로 pom.xml 의존성(dependency) 설정 3. 각 서비스별로 application.properties 설정 4. 각 서비스별로 ~Application.java 설정 5. 서비스 시작 (start-all-svc.cmd) 6. Spring Boot Admin 서버 시작 및 대시보드 확인 http://localhost:8761/eureka http://localhost:8090
  • 23. Lab 3: Spring Boot Monitoring with Consul and Prometheus, Grafana https://github.com/MangDan/sb-metrics-monitoring-handson/blob/master/HOL-PART3.md Love Calculator Service Love Calculator Consumer Yes-Or-No Consumer /actuator /actuator /actuator Love Calculator Application Consul 1. Consul 서버 시작 2. 각 서비스별로 pom.xml 의존성(dependency) 설정 3. 각 서비스별로 application.properties 설정 4. 각 서비스별로 ~Application.java 설정 5. 서비스 시작 (start-all-svc.cmd) 6. Prometheus 서버 설정 및 시작 7. Grafana 서버 시작 및 설정, 대시보드 확인 Prometheus Grafana http://localhost:9090 http://localhost:3000 http://localhost:8500/ui
  • 25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 감사합니다 25