SlideShare a Scribd company logo
1
© 2016 Pivotal
Advanced Spring Boot with Consul
Mike Gendelman, Systems Mgmt. Architect, Nomura
@MikeGendelman
2
Learn More. Stay Connected.
§  Reduce Complexity
§  Automate Everything
§  Standardization
§  Adaptable
Twitter: twitter.com/springcentral
YouTube: spring.io/video
LinkedIn: spring.io/linkedin
Google Plus: spring.io/gplus
3
Agenda
§  Modern Software Development Challenges
§  Review of Basic Spring Boot Applications
§  Enhanced Spring Boot Applications with Consul
§  Demo
§  Next Steps
4
Modern Software Development Challenges
§  Development Teams
•  Smaller teams
•  Turnover
•  Quickly changing technology
§  Platform Agility
•  Containers, public clouds, private clouds and hybrid
•  Migration on its own does not improve the applications
§  Regulatory & Compliance
5
Agenda
§  Modern Software Development Challenges
§  Review of Basic Spring Boot Applications
§  Enhanced Spring Boot Applications with Consul
§  Demo
§  Conclusion
6
Simple Spring Boot Applications
Invoice
Service
§  Invoice Service calls the Tax Service to calculate tax
§  Location of Tax Service must be known by the Invoice Service
§  Two basic Spring Boot applications
Tax
Service
7
Standard Spring Boot Rest POM
8
Standard Spring Boot Rest Application
9
Standard Spring Boot Rest Controller
10
Standard Spring Boot application.yml
11
Agenda
§  Modern Software Development Challenges
§  Review of Basic Spring Boot Applications
§  Enhanced Spring Boot Applications with Consul
§  Demo
§  Conclusion
12
Consul
“
Consul provides first-class support for
service discovery, health checking, K/
V storage, and multiple datacenters.
Consul.io
13
Spring Boot with Consul
Invoice
Service
Consul
Agent
Tax
Service
Consul
Server
§  Consul Agent
•  Health Check
•  Forward Queries
§  Consul Server
•  Store Data
•  Respond to Queries
•  Leader Election
14
Spring Boot with Consul
Spring Boot
Application
Configuration
Service Registration
Service Discovery
Service Health
Consul
Spring Cloud
Consul
15
Advantages
Monitoring Deployment Configuration
•  Update at run-time
•  No local configuration
•  Dynamic discovery of
endpoints
•  Start order does not
matter
•  Simple deployment
•  Separation of
environments
•  Discover services to
monitor
•  Health of the service is
more important than
the heath of a single
instance
16
Spring Boot Rest POM + Consul
17
Spring Boot Rest Application + Consul
18
Spring Boot Rest Controller + Consul
19
Spring Boot Bootstrap.yml for Consul
20
Calling the Tax Service
restTemplate.getForObject("http://"+host + ":" + port
+"/tax/{subtotal}",Double.class, subtotal );	
restTemplate.getForObject("http://tax-service/tax/
{subtotal}",Double.class, subtotal );	
With Consul
Without Consul
21
Add the Properties to Consul
22
The New Service
23
Setting Up Consul
§  Requires at least three Consul Servers per cluster for establish quorum
§  Every host must run a consul agent
§  Agents are stateless and forward all request to the servers
§  Same executable can be started as a server or an agent
§  Recommend different clusters for production and non-production
§  Development environment can be setup with a single local instance:
consul agent –dev -ui
24
Demo
SPRING BOOT & CONSUL
25
Next Steps
https://github.com/mgendelman/spring-boot-consul-demo-tax.git
https://github.com/mgendelman/spring-boot-consul-demo-invoice.git
https://www.consul.io/
https://cloud.spring.io/spring-cloud-consul/

More Related Content

What's hot

Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 

What's hot (20)

Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Building Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorBuilding Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and Blazor
 
Docker란 무엇인가? : Docker 기본 사용법
Docker란 무엇인가? : Docker 기본 사용법Docker란 무엇인가? : Docker 기본 사용법
Docker란 무엇인가? : Docker 기본 사용법
 
Docker Introduction.pdf
Docker Introduction.pdfDocker Introduction.pdf
Docker Introduction.pdf
 
Présentation de EasyAdmin, le bundle d'admin de Symfony
Présentation de EasyAdmin, le bundle d'admin de SymfonyPrésentation de EasyAdmin, le bundle d'admin de Symfony
Présentation de EasyAdmin, le bundle d'admin de Symfony
 
Conception web et ses elements créer un site web
Conception web et ses elements   créer un site webConception web et ses elements   créer un site web
Conception web et ses elements créer un site web
 
Improving app performance with Kotlin Coroutines
Improving app performance with Kotlin CoroutinesImproving app performance with Kotlin Coroutines
Improving app performance with Kotlin Coroutines
 
Midi technique - présentation docker
Midi technique - présentation dockerMidi technique - présentation docker
Midi technique - présentation docker
 
Building MAUI UIs in C#.pptx
Building MAUI UIs in C#.pptxBuilding MAUI UIs in C#.pptx
Building MAUI UIs in C#.pptx
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Docker basics
Docker basicsDocker basics
Docker basics
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Presentation SOAP
 Presentation SOAP Presentation SOAP
Presentation SOAP
 
BWE in Janus
BWE in JanusBWE in Janus
BWE in Janus
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 
Introduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUGIntroduction to Docker - IndiaOpsUG
Introduction to Docker - IndiaOpsUG
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and Ktor
 
How NOT to Measure Latency
How NOT to Measure LatencyHow NOT to Measure Latency
How NOT to Measure Latency
 

Similar to Advanced Spring Boot with Consul

FORCES - EBS Upgrade Compared to SaaS Cloud.pdf
FORCES - EBS Upgrade Compared to SaaS Cloud.pdfFORCES - EBS Upgrade Compared to SaaS Cloud.pdf
FORCES - EBS Upgrade Compared to SaaS Cloud.pdf
JacobYeboa1
 
Ashutosh_Sharma_7 Yrs_Manual Testing
Ashutosh_Sharma_7 Yrs_Manual TestingAshutosh_Sharma_7 Yrs_Manual Testing
Ashutosh_Sharma_7 Yrs_Manual Testing
Ashutosh Sharma
 
Digitalizing enterprise finance processes with Low Code – The success story o...
Digitalizing enterprise finance processes with Low Code – The success story o...Digitalizing enterprise finance processes with Low Code – The success story o...
Digitalizing enterprise finance processes with Low Code – The success story o...
dox42
 
Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6
Bonitasoft
 

Similar to Advanced Spring Boot with Consul (20)

FORCES - EBS Upgrade Compared to SaaS Cloud.pdf
FORCES - EBS Upgrade Compared to SaaS Cloud.pdfFORCES - EBS Upgrade Compared to SaaS Cloud.pdf
FORCES - EBS Upgrade Compared to SaaS Cloud.pdf
 
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
 
apidays Dubai & Middle East 2023 - Combining APIs and Events, Richard Bosch, ...
apidays Dubai & Middle East 2023 - Combining APIs and Events, Richard Bosch, ...apidays Dubai & Middle East 2023 - Combining APIs and Events, Richard Bosch, ...
apidays Dubai & Middle East 2023 - Combining APIs and Events, Richard Bosch, ...
 
Cloud Native Applications for Cloud Foundry using Spring Cloud : A Workshop
Cloud Native Applications for Cloud Foundry using Spring Cloud : A WorkshopCloud Native Applications for Cloud Foundry using Spring Cloud : A Workshop
Cloud Native Applications for Cloud Foundry using Spring Cloud : A Workshop
 
Process Cloud Service Deep dive
Process Cloud Service Deep diveProcess Cloud Service Deep dive
Process Cloud Service Deep dive
 
geo spatial innovation
geo spatial innovationgeo spatial innovation
geo spatial innovation
 
Mainframe Application Testing both With and Without Live Data
Mainframe Application Testing both With and Without Live DataMainframe Application Testing both With and Without Live Data
Mainframe Application Testing both With and Without Live Data
 
Ashutosh_Sharma_7 Yrs_Manual Testing
Ashutosh_Sharma_7 Yrs_Manual TestingAshutosh_Sharma_7 Yrs_Manual Testing
Ashutosh_Sharma_7 Yrs_Manual Testing
 
Measuring User Adoption of Your Cognos BI System
Measuring User Adoption of Your Cognos BI SystemMeasuring User Adoption of Your Cognos BI System
Measuring User Adoption of Your Cognos BI System
 
Outsystems user group 2021 03 04 - cm app
Outsystems user group 2021 03 04 - cm appOutsystems user group 2021 03 04 - cm app
Outsystems user group 2021 03 04 - cm app
 
Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010
Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010
Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010
 
Quickstart for continuous integration
Quickstart for continuous integrationQuickstart for continuous integration
Quickstart for continuous integration
 
How to Manage an International Equipment Leasing Program
How to Manage an International Equipment Leasing ProgramHow to Manage an International Equipment Leasing Program
How to Manage an International Equipment Leasing Program
 
Keynote: Software Kept Eating the World (Pivotal Cloud Platform Roadshow)
Keynote: Software Kept Eating the World (Pivotal Cloud Platform Roadshow)Keynote: Software Kept Eating the World (Pivotal Cloud Platform Roadshow)
Keynote: Software Kept Eating the World (Pivotal Cloud Platform Roadshow)
 
Pivoting to Cloud: How an MSP Brokers Cloud Services
Pivoting to Cloud: How an MSP Brokers Cloud Services Pivoting to Cloud: How an MSP Brokers Cloud Services
Pivoting to Cloud: How an MSP Brokers Cloud Services
 
A Framework to Measure and Maximize Cloud ROI
A Framework to Measure and Maximize Cloud ROIA Framework to Measure and Maximize Cloud ROI
A Framework to Measure and Maximize Cloud ROI
 
You've Got Mail! with Michael van der Haven
You've Got Mail! with Michael van der HavenYou've Got Mail! with Michael van der Haven
You've Got Mail! with Michael van der Haven
 
Digitalizing enterprise finance processes with Low Code – The success story o...
Digitalizing enterprise finance processes with Low Code – The success story o...Digitalizing enterprise finance processes with Low Code – The success story o...
Digitalizing enterprise finance processes with Low Code – The success story o...
 
Adopting DevOps for 2-Speed IT
Adopting DevOps for 2-Speed ITAdopting DevOps for 2-Speed IT
Adopting DevOps for 2-Speed IT
 
Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6Product Overview: Mobile and 4X Faster Bonita BPM 6
Product Overview: Mobile and 4X Faster Bonita BPM 6
 

More from VMware Tanzu

More from VMware Tanzu (20)

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

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 

Advanced Spring Boot with Consul