SlideShare a Scribd company logo
CLOUD NATIVE MICROSERVICES
WITH SPRING CLOUD
CONOR SVENSSON
@CONORS10
SPRING BOOT
SPRING BOOT
▸ Stand-alone Spring-based applications
▸ Tomcat embedded container (supports Jetty & JBoss
Undertow too)
▸ Starter POMs
▸ Annotation driven
▸ Java Configuration Beans
SPRING BOOT
DEPLOYMENT
▸ Self contained jar
▸ Web application archive
▸ Build targets
▸ $ mvn spring-boot:run
▸ $ gradle bootRun
SPRING BOOT
ACME HOME LOANS
ACME HOME LOANS
LOAN APPLICATION
EXTERNAL
CREDIT
SERVICE
WEBSITE
SERVICE
SUBMISSION
SERVICE
1
2 3
ACME HOME LOANS
ACME HOME LOANS
ACME HOME LOANS
SPRING BOOT
CONFIGURATION BEANS
SPRING BOOT
TESTING
▸ spring-boot-starter-test starter POM provides:
▸ Spring Test
▸ Unit
▸ Hamcrest + Assert4J (v1.4)
▸ Mockito
▸ MockMvc
▸ @WebIntegrationTest
SPRING CLOUD
SPRING CLOUD
▸ Microservice friendly components
▸ Distributed & versioned configuration
▸ Service discovery
▸ Dynamic routing
▸ Circuit breakers
▸ Distributed messaging
▸ Getting started:
SPRING CLOUD
SPRING CLOUD
▸ Config
▸ Netflix
▸ Bus
▸ Cloud Foundry
▸ Cluster
▸ Consul
▸ Security
▸ Sleuth
▸ Data Flow
▸ Stream
▸ Modules
▸ Task
▸ Zookeeper
▸ AWS
▸ Connectors
▸ CLI
SPRING CLOUD
CONFIG SERVER
▸ Git hosted configuration repository
▸ SVN & filesystem also supported (see implementations
of
org.springframework.cloud.config.server.EnvironmentR
epository)
▸ Multiple security options w/Spring Security (HTTP Basic ->
OAuth bearer tokens)
▸ Push updates via Spring Cloud Bus
SPRING CLOUD
CONFIG SERVER
SPRING CLOUD
CONFIG SERVER CONFIGURATION
application.yml:
SPRING CLOUD
CLIENT CONFIGURATION FILE
website.yml:
SPRING CLOUD
RESOURCE FORMAT
/{application}/{profile}[/{label}]
/{application}-{profile}.yml
/{label}/{application}-{profile}.yml
/{application}-{profile}.properties
/{label}/{application}-{profile}.properties
(label: master by default)
SPRING CLOUD
RESOLVED CONFIGURATION
SPRING CLOUD
SHARED RESOURCES
▸ Place in application.yml in root of configuration repo
▸ Profile specific configuration always takes precedence
over shared
▸ E.g. Eureka server (more on this shortly)
SPRING CLOUD
CLIENT CONFIGURATION
bootstrap.yml:
SPRING CLOUD
CLIENT PROFILES
▸ Annotate classes to associate with a profile
▸ @Profile(“…”)
▸ Configuration (bootstrap/application properties)
▸ spring.profiles.active = …
▸ Command line
▸ -Dspring.profiles.active=…
▸ Environment variable
▸ SPRING_PROFILES_ACTIVE=…
SPRING CLOUD
RESOLVED CLIENT CONFIGURATION
SPRING CLOUD
CONFIG SERVER GOTCHAS
▸ Client’s don’t fail on Config Server failure - boot with
defaults (e.g. port 8080)
▸ To enable use spring.cloud.config.failFast=true
▸ Enable retries:
▸ Add spring-retry and spring-boot-starter-aop
▸ spring.cloud.config.retry.
NETFLIX OSS + SPRING
SPRING CLOUD NETFLIX
▸ Service discovery (Eureka)
▸ Client side load balancing (Ribbon)
▸ Dynamic routing (Zuul)
▸ Circuit breaker (Hystrix)
▸ + a few others…
NETFLIX OSS + SPRING
EUREKA
▸ Service discovery client & server
▸ Maintains registry of clients with metadata
▸ Host/port
▸ Health indicator URL
▸ Client heartbeats (30 sec default - changing not encouraged)
▸ Lease renewed with server
▸ Service available when client & server(s) metadata cache all in sync
▸ Can take up to 3 heart beats
NETFLIX OSS + SPRING
EUREKA SERVER
NETFLIX OSS + SPRING
EUREKA SERVER DASHBOARD
NETFLIX OSS + SPRING
EUREKA CLIENT SETUP
@EnableEurekaClient annotation
application.yml in Config Server repo
NETFLIX OSS + SPRING
RIBBON
▸ Client side loan balancer
▸ Can delegate to Eureka for server lists
▸ Or list servers
▸ stores.ribbon.listOfServers=… +
ribbon.eureka.enabled=false
NETFLIX OSS + SPRING
RIBBON USAGE
▸ Via RestTemplate
▸ No different to normal usage - Spring Cloud Commons
abstraction
▸ Qualifier’s required if using regular & Ribbon enabled
RestTemplate
NETFLIX OSS + SPRING
ZUUL
▸ JVM based router & load balancer
▸ Provides single point of entry to services
▸ Including single point of authentication
▸ By default creates route for every service in Eureka
▸ Refer to http://localhost/credit-service routes to http://credit-
service
▸ Filters provide limited entry points to system
NETFLIX OSS + SPRING
ZUUL SERVER CREATION
‣ Include dependency spring-cloud-starter-zuul
‣ @EnableZuulProxy application annotation
‣ E.g. Allow access only to credit-service
NETFLIX OSS + SPRING
SIDECAR
▸ Non-JVM access to components via Zuul proxy
▸ Setup Spring Boot application with @EnableSidecar
▸ Configure for your service:
▸ sidecar.port=… + sidecar.health-ui=…
▸ Access all services by Zuul URL (Sidecar running on port
80)
▸ http://localhost/config-server
NETFLIX OSS + SPRING
HYSTRIX
▸ Circuit breaker
▸ Threshold breached (20 failures in 5 seconds) => breaker
kicks in
▸ Default timeout threshold 1 second
▸ Per dependency thread pools
▸ Async command support (not Spring @Async)
▸ Sync or async fallback
NETFLIX OSS + SPRING
HYSTRIX CLIENT
▸ @EnableCircuitBreaker application annotation
▸ @HystrixCommand on applicable methods
NETFLIX OSS + SPRING
NETFLIX OSS + SPRING
HYSTRIX STREAM - PRE-REQUESTS
NETFLIX OSS + SPRING
HYSTRIX STREAM - POST-REQUESTS
NETFLIX OSS + SPRING
HYSTRIX DASHBOARD
NETFLIX OSS + SPRING
HYSTRIX STREAM
NETFLIX OSS + SPRING
HYSTRIX DASHBOARD
NETFLIX OSS + SPRING
TURBINE - AGGREGATE MULTIPLE HYSTRIX CLIENTS
NETFLIX OSS + SPRING
MONITORING
▸ Add dependency spring-boot-actuator
▸ Makes available various application metrics via /metrics
endpoint
▸ Integration also available with DropWizard metrics (add
dependency)
▸ Spring Cloud
▸ Spectator (supersedes Servo) - metrics collection
▸ Atlas - metrics backend
NETFLIX OSS + SPRING
CLOUD FOUNDRY
CLOUD FOUNDRY
▸ Cloud Foundry
▸ PAAS
▸ Supports multiple languages & frameworks
▸ Manages VM containers for deployments within a
“space”
▸ Multiple spaces for different environments
▸ Command-line tool (cf)
CLOUD FOUNDRY
SPRING CLOUD FOUNDRY + CONNECTORS
▸ Spring Cloud Foundry
▸ Binding of CF single sign on to your services
▸ Integration with CF Service Discovery
▸ Spring Cloud Connectors
▸ Connectors for Spring Cloud on CF
▸ Config Server
▸ Eureka (Service Discovery)
▸ Hystrix (Circuit Breaker)
CLOUD FOUNDRY
CLOUD FOUNDRY DEPLOYMENT
▸ Signup to preferred CF platform
CLOUD FOUNDRY
CLOUD FOUNDRY DEPLOYMENT
▸ Create Spring Cloud components in CF provider
▸ Config Server
▸ Eureka (Service Discovery)
▸ Hystrix (Circuit Breaker)
▸ Update client applications
▸ CF provider client libraries (see https://docs.pivotal.io/spring-cloud-
services/index.html)
▸ Deploy
▸ cf push AcmeWebsite  -p website/target/website-0-SNAPSHOT.jar
ACME HOME LOANS
NETFLIX OSS + SPRING
DOWNSIDES
▸ A lot of magic
▸ ADD (Annotation driven development)
▸ Dependency management
▸ RestTemplates - Ribbon enabled != Standard HTTP
▸ Lack of proper polygot support - libraries are in Java (Sidecar is OK as a
middle ground)
▸ Spring Hystrix documentation is pretty light
▸ £££ to use core components (Config Server, Eureka) on Cloud Foundry
NETFLIX OSS + SPRING
ALTHOUGH…
NETFLIX OSS + SPRING
THANKS
conor@huffle.com.au
@conors10
NETFLIX OSS + SPRING
RESOURCES
▸ Spring Cloud documentation - http://projects.spring.io/spring-cloud/spring-cloud.html
▸ Spring Boot sample projects - https://github.com/spring-projects/spring-boot/tree/master/
spring-boot-samples
▸ Spring Cloud sample projects - https://github.com/spring-cloud-samples
▸ Hystrix annotations - https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-
javanica
▸ Useful demonstration of Spring Cloud usage - http://callistaenterprise.se/blogg/teknik/
2015/05/20/blog-series-building-microservices/
▸ Creation of Spring Cloud Components on Pivotal Web Services https://docs.pivotal.io/spring-
cloud-services/index.html
▸ Code to accompany this talk - https://github.com/conor10/homeloans
▸ https://www.huffle.com.au

More Related Content

What's hot

Lifecycle of a pod
Lifecycle of a podLifecycle of a pod
Lifecycle of a pod
Harshal Shah
 
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s ClustersDeploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Syah Dwi Prihatmoko
 
Istio canaries and kubernetes
Istio  canaries and kubernetesIstio  canaries and kubernetes
Istio canaries and kubernetes
Red Hat Developers
 
Exploring the Future of Helm
Exploring the Future of HelmExploring the Future of Helm
Exploring the Future of Helm
Matthew Farina
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scale
Sudhir Tonse
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consul
Nguyen Sy Thanh Son
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsSf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Peter Ss
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
Giragadurai Vallirajan
 
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
OpenStack Korea Community
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
Weaveworks
 
Docker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and DemoDocker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and Demo
Brian Christner
 
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service  | anyninesBuilding a Production Grade PostgreSQL Cloud Foundry Service  | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
anynines GmbH
 
Architecting for Microservices Part 2
Architecting for Microservices Part 2Architecting for Microservices Part 2
Architecting for Microservices Part 2
Elana Krasner
 
Challenges of Kubernetes On-premise Deployment
Challenges of Kubernetes On-premise DeploymentChallenges of Kubernetes On-premise Deployment
Challenges of Kubernetes On-premise Deployment
Vietnam Open Infrastructure User Group
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
Vietnam Open Infrastructure User Group
 
Criteo meetup - S.R.E Tech Talk
Criteo meetup - S.R.E Tech TalkCriteo meetup - S.R.E Tech Talk
Criteo meetup - S.R.E Tech Talk
Pierre Mavro
 
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
OpenStack Korea Community
 
Cloud Native User Group: Prometheus Day 2
Cloud Native User Group:  Prometheus Day 2Cloud Native User Group:  Prometheus Day 2
Cloud Native User Group: Prometheus Day 2
smalltown
 
Running your dockerized application(s) on AWS Elastic Container Service
Running your dockerized application(s) on AWS Elastic Container ServiceRunning your dockerized application(s) on AWS Elastic Container Service
Running your dockerized application(s) on AWS Elastic Container Service
Marco Pas
 

What's hot (20)

Lifecycle of a pod
Lifecycle of a podLifecycle of a pod
Lifecycle of a pod
 
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s ClustersDeploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
 
Istio canaries and kubernetes
Istio  canaries and kubernetesIstio  canaries and kubernetes
Istio canaries and kubernetes
 
Exploring the Future of Helm
Exploring the Future of HelmExploring the Future of Helm
Exploring the Future of Helm
 
MicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scaleMicroServices at Netflix - challenges of scale
MicroServices at Netflix - challenges of scale
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
 
Microservices with docker swarm and consul
Microservices with docker swarm and consulMicroservices with docker swarm and consul
Microservices with docker swarm and consul
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment modelsSf bay area Kubernetes meetup dec8 2016 - deployment models
Sf bay area Kubernetes meetup dec8 2016 - deployment models
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
Docker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and DemoDocker Swarm 1.12 Overview and Demo
Docker Swarm 1.12 Overview and Demo
 
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service  | anyninesBuilding a Production Grade PostgreSQL Cloud Foundry Service  | anynines
Building a Production Grade PostgreSQL Cloud Foundry Service | anynines
 
Architecting for Microservices Part 2
Architecting for Microservices Part 2Architecting for Microservices Part 2
Architecting for Microservices Part 2
 
Challenges of Kubernetes On-premise Deployment
Challenges of Kubernetes On-premise DeploymentChallenges of Kubernetes On-premise Deployment
Challenges of Kubernetes On-premise Deployment
 
Quick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico LinQuick and Solid - Baremetal on OpenStack | Rico Lin
Quick and Solid - Baremetal on OpenStack | Rico Lin
 
Criteo meetup - S.R.E Tech Talk
Criteo meetup - S.R.E Tech TalkCriteo meetup - S.R.E Tech Talk
Criteo meetup - S.R.E Tech Talk
 
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
[OpenInfra Days Korea 2018] Day 2 - E5-1: "Invited Talk: Kubicorn - Building ...
 
Cloud Native User Group: Prometheus Day 2
Cloud Native User Group:  Prometheus Day 2Cloud Native User Group:  Prometheus Day 2
Cloud Native User Group: Prometheus Day 2
 
Running your dockerized application(s) on AWS Elastic Container Service
Running your dockerized application(s) on AWS Elastic Container ServiceRunning your dockerized application(s) on AWS Elastic Container Service
Running your dockerized application(s) on AWS Elastic Container Service
 

Similar to Cloud Native Microservices with Spring Cloud

Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
Conor Svensson
 
Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring
Conor Svensson
 
The Good Parts / The Hard Parts
The Good Parts / The Hard PartsThe Good Parts / The Hard Parts
The Good Parts / The Hard Parts
Noah Zoschke
 
Traefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architecturesTraefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architectures
Jakub Hajek
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
Mathieu Buffenoir
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
Ortus Solutions, Corp
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
PROIDEA
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure Detection
Vincent Composieux
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
Deivid Hahn Fração
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
Takayoshi Tanaka
 
Going Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGoing Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAM
George Tourkas
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
Juraj Hantak
 
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
zshoylev
 
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
NETWAYS
 
App Deployment on Cloud
App Deployment on CloudApp Deployment on Cloud
App Deployment on Cloud
Ajey Pratap Singh
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
Walter Liu
 
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
CODE BLUE
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
Jakub Hajek
 
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAconCloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Mario-Leander Reimer
 

Similar to Cloud Native Microservices with Spring Cloud (20)

Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring Java Microservices with Netflix OSS & Spring
Java Microservices with Netflix OSS & Spring
 
The Good Parts / The Hard Parts
The Good Parts / The Hard PartsThe Good Parts / The Hard Parts
The Good Parts / The Hard Parts
 
Traefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architecturesTraefik as an open source edge router for microservice architectures
Traefik as an open source edge router for microservice architectures
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
ITB2019  Serverless CFML on AWS Lambda - Pete FreitagITB2019  Serverless CFML on AWS Lambda - Pete Freitag
ITB2019 Serverless CFML on AWS Lambda - Pete Freitag
 
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub HajekJDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
JDO 2019: Container orchestration with Docker Swarm - Jakub Hajek
 
Workshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure DetectionWorkshop Consul .- Service Discovery & Failure Detection
Workshop Consul .- Service Discovery & Failure Detection
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
 
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10New features of Azure Cloud Provider in OpenShift Container Platform 3.10
New features of Azure Cloud Provider in OpenShift Container Platform 3.10
 
Going Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAMGoing Serverless on AWS with Golang and SAM
Going Serverless on AWS with Golang and SAM
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
10. th cncf meetup - Routing microservice-architectures-with-traefik-cncfsk
 
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
 
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
OSMC 2022 | Ignite: Observability with Grafana & Prometheus for Kafka on Kube...
 
App Deployment on Cloud
App Deployment on CloudApp Deployment on Cloud
App Deployment on Cloud
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
[CB16] 80時間でWebを一周:クロムミウムオートメーションによるスケーラブルなフィンガープリント by Isaac Dawson
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
 
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAconCloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
 

More from Conor Svensson

web3j Overview
web3j Overviewweb3j Overview
web3j Overview
Conor Svensson
 
Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain
Conor Svensson
 
Web3j 2.0 Update
Web3j 2.0 UpdateWeb3j 2.0 Update
Web3j 2.0 Update
Conor Svensson
 
Blockchain - Navigating this Game-Changing Technology
Blockchain - Navigating this Game-Changing TechnologyBlockchain - Navigating this Game-Changing Technology
Blockchain - Navigating this Game-Changing Technology
Conor Svensson
 
web3j 1.0 update
web3j 1.0 updateweb3j 1.0 update
web3j 1.0 update
Conor Svensson
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3jJava and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
Conor Svensson
 
Ether mining 101 v2
Ether mining 101 v2Ether mining 101 v2
Ether mining 101 v2
Conor Svensson
 
web3j overview
web3j overviewweb3j overview
web3j overview
Conor Svensson
 
Ether Mining 101
Ether Mining 101Ether Mining 101
Ether Mining 101
Conor Svensson
 

More from Conor Svensson (9)

web3j Overview
web3j Overviewweb3j Overview
web3j Overview
 
Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain Building Java and Android apps on the blockchain
Building Java and Android apps on the blockchain
 
Web3j 2.0 Update
Web3j 2.0 UpdateWeb3j 2.0 Update
Web3j 2.0 Update
 
Blockchain - Navigating this Game-Changing Technology
Blockchain - Navigating this Game-Changing TechnologyBlockchain - Navigating this Game-Changing Technology
Blockchain - Navigating this Game-Changing Technology
 
web3j 1.0 update
web3j 1.0 updateweb3j 1.0 update
web3j 1.0 update
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3jJava and the blockchain - introducing web3j
Java and the blockchain - introducing web3j
 
Ether mining 101 v2
Ether mining 101 v2Ether mining 101 v2
Ether mining 101 v2
 
web3j overview
web3j overviewweb3j overview
web3j overview
 
Ether Mining 101
Ether Mining 101Ether Mining 101
Ether Mining 101
 

Recently uploaded

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

Cloud Native Microservices with Spring Cloud

  • 1. CLOUD NATIVE MICROSERVICES WITH SPRING CLOUD CONOR SVENSSON @CONORS10
  • 2.
  • 3.
  • 4. SPRING BOOT SPRING BOOT ▸ Stand-alone Spring-based applications ▸ Tomcat embedded container (supports Jetty & JBoss Undertow too) ▸ Starter POMs ▸ Annotation driven ▸ Java Configuration Beans
  • 5. SPRING BOOT DEPLOYMENT ▸ Self contained jar ▸ Web application archive ▸ Build targets ▸ $ mvn spring-boot:run ▸ $ gradle bootRun
  • 8. ACME HOME LOANS LOAN APPLICATION EXTERNAL CREDIT SERVICE WEBSITE SERVICE SUBMISSION SERVICE 1 2 3
  • 13. SPRING BOOT TESTING ▸ spring-boot-starter-test starter POM provides: ▸ Spring Test ▸ Unit ▸ Hamcrest + Assert4J (v1.4) ▸ Mockito ▸ MockMvc ▸ @WebIntegrationTest
  • 14.
  • 15.
  • 16.
  • 17. SPRING CLOUD SPRING CLOUD ▸ Microservice friendly components ▸ Distributed & versioned configuration ▸ Service discovery ▸ Dynamic routing ▸ Circuit breakers ▸ Distributed messaging ▸ Getting started:
  • 18. SPRING CLOUD SPRING CLOUD ▸ Config ▸ Netflix ▸ Bus ▸ Cloud Foundry ▸ Cluster ▸ Consul ▸ Security ▸ Sleuth ▸ Data Flow ▸ Stream ▸ Modules ▸ Task ▸ Zookeeper ▸ AWS ▸ Connectors ▸ CLI
  • 19. SPRING CLOUD CONFIG SERVER ▸ Git hosted configuration repository ▸ SVN & filesystem also supported (see implementations of org.springframework.cloud.config.server.EnvironmentR epository) ▸ Multiple security options w/Spring Security (HTTP Basic -> OAuth bearer tokens) ▸ Push updates via Spring Cloud Bus
  • 21. SPRING CLOUD CONFIG SERVER CONFIGURATION application.yml:
  • 25. SPRING CLOUD SHARED RESOURCES ▸ Place in application.yml in root of configuration repo ▸ Profile specific configuration always takes precedence over shared ▸ E.g. Eureka server (more on this shortly)
  • 27. SPRING CLOUD CLIENT PROFILES ▸ Annotate classes to associate with a profile ▸ @Profile(“…”) ▸ Configuration (bootstrap/application properties) ▸ spring.profiles.active = … ▸ Command line ▸ -Dspring.profiles.active=… ▸ Environment variable ▸ SPRING_PROFILES_ACTIVE=…
  • 29. SPRING CLOUD CONFIG SERVER GOTCHAS ▸ Client’s don’t fail on Config Server failure - boot with defaults (e.g. port 8080) ▸ To enable use spring.cloud.config.failFast=true ▸ Enable retries: ▸ Add spring-retry and spring-boot-starter-aop ▸ spring.cloud.config.retry.
  • 30.
  • 31. NETFLIX OSS + SPRING SPRING CLOUD NETFLIX ▸ Service discovery (Eureka) ▸ Client side load balancing (Ribbon) ▸ Dynamic routing (Zuul) ▸ Circuit breaker (Hystrix) ▸ + a few others…
  • 32. NETFLIX OSS + SPRING EUREKA ▸ Service discovery client & server ▸ Maintains registry of clients with metadata ▸ Host/port ▸ Health indicator URL ▸ Client heartbeats (30 sec default - changing not encouraged) ▸ Lease renewed with server ▸ Service available when client & server(s) metadata cache all in sync ▸ Can take up to 3 heart beats
  • 33. NETFLIX OSS + SPRING EUREKA SERVER
  • 34. NETFLIX OSS + SPRING EUREKA SERVER DASHBOARD
  • 35. NETFLIX OSS + SPRING EUREKA CLIENT SETUP @EnableEurekaClient annotation application.yml in Config Server repo
  • 36. NETFLIX OSS + SPRING RIBBON ▸ Client side loan balancer ▸ Can delegate to Eureka for server lists ▸ Or list servers ▸ stores.ribbon.listOfServers=… + ribbon.eureka.enabled=false
  • 37. NETFLIX OSS + SPRING RIBBON USAGE ▸ Via RestTemplate ▸ No different to normal usage - Spring Cloud Commons abstraction ▸ Qualifier’s required if using regular & Ribbon enabled RestTemplate
  • 38. NETFLIX OSS + SPRING ZUUL ▸ JVM based router & load balancer ▸ Provides single point of entry to services ▸ Including single point of authentication ▸ By default creates route for every service in Eureka ▸ Refer to http://localhost/credit-service routes to http://credit- service ▸ Filters provide limited entry points to system
  • 39. NETFLIX OSS + SPRING ZUUL SERVER CREATION ‣ Include dependency spring-cloud-starter-zuul ‣ @EnableZuulProxy application annotation ‣ E.g. Allow access only to credit-service
  • 40. NETFLIX OSS + SPRING SIDECAR ▸ Non-JVM access to components via Zuul proxy ▸ Setup Spring Boot application with @EnableSidecar ▸ Configure for your service: ▸ sidecar.port=… + sidecar.health-ui=… ▸ Access all services by Zuul URL (Sidecar running on port 80) ▸ http://localhost/config-server
  • 41. NETFLIX OSS + SPRING HYSTRIX ▸ Circuit breaker ▸ Threshold breached (20 failures in 5 seconds) => breaker kicks in ▸ Default timeout threshold 1 second ▸ Per dependency thread pools ▸ Async command support (not Spring @Async) ▸ Sync or async fallback
  • 42. NETFLIX OSS + SPRING HYSTRIX CLIENT ▸ @EnableCircuitBreaker application annotation ▸ @HystrixCommand on applicable methods
  • 43. NETFLIX OSS + SPRING
  • 44. NETFLIX OSS + SPRING HYSTRIX STREAM - PRE-REQUESTS
  • 45. NETFLIX OSS + SPRING HYSTRIX STREAM - POST-REQUESTS
  • 46. NETFLIX OSS + SPRING HYSTRIX DASHBOARD
  • 47. NETFLIX OSS + SPRING HYSTRIX STREAM
  • 48. NETFLIX OSS + SPRING HYSTRIX DASHBOARD
  • 49. NETFLIX OSS + SPRING TURBINE - AGGREGATE MULTIPLE HYSTRIX CLIENTS
  • 50. NETFLIX OSS + SPRING MONITORING ▸ Add dependency spring-boot-actuator ▸ Makes available various application metrics via /metrics endpoint ▸ Integration also available with DropWizard metrics (add dependency) ▸ Spring Cloud ▸ Spectator (supersedes Servo) - metrics collection ▸ Atlas - metrics backend
  • 51. NETFLIX OSS + SPRING
  • 52.
  • 53. CLOUD FOUNDRY CLOUD FOUNDRY ▸ Cloud Foundry ▸ PAAS ▸ Supports multiple languages & frameworks ▸ Manages VM containers for deployments within a “space” ▸ Multiple spaces for different environments ▸ Command-line tool (cf)
  • 54. CLOUD FOUNDRY SPRING CLOUD FOUNDRY + CONNECTORS ▸ Spring Cloud Foundry ▸ Binding of CF single sign on to your services ▸ Integration with CF Service Discovery ▸ Spring Cloud Connectors ▸ Connectors for Spring Cloud on CF ▸ Config Server ▸ Eureka (Service Discovery) ▸ Hystrix (Circuit Breaker)
  • 55. CLOUD FOUNDRY CLOUD FOUNDRY DEPLOYMENT ▸ Signup to preferred CF platform
  • 56. CLOUD FOUNDRY CLOUD FOUNDRY DEPLOYMENT ▸ Create Spring Cloud components in CF provider ▸ Config Server ▸ Eureka (Service Discovery) ▸ Hystrix (Circuit Breaker) ▸ Update client applications ▸ CF provider client libraries (see https://docs.pivotal.io/spring-cloud- services/index.html) ▸ Deploy ▸ cf push AcmeWebsite  -p website/target/website-0-SNAPSHOT.jar
  • 58. NETFLIX OSS + SPRING DOWNSIDES ▸ A lot of magic ▸ ADD (Annotation driven development) ▸ Dependency management ▸ RestTemplates - Ribbon enabled != Standard HTTP ▸ Lack of proper polygot support - libraries are in Java (Sidecar is OK as a middle ground) ▸ Spring Hystrix documentation is pretty light ▸ £££ to use core components (Config Server, Eureka) on Cloud Foundry
  • 59. NETFLIX OSS + SPRING ALTHOUGH…
  • 60. NETFLIX OSS + SPRING THANKS conor@huffle.com.au @conors10
  • 61. NETFLIX OSS + SPRING RESOURCES ▸ Spring Cloud documentation - http://projects.spring.io/spring-cloud/spring-cloud.html ▸ Spring Boot sample projects - https://github.com/spring-projects/spring-boot/tree/master/ spring-boot-samples ▸ Spring Cloud sample projects - https://github.com/spring-cloud-samples ▸ Hystrix annotations - https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix- javanica ▸ Useful demonstration of Spring Cloud usage - http://callistaenterprise.se/blogg/teknik/ 2015/05/20/blog-series-building-microservices/ ▸ Creation of Spring Cloud Components on Pivotal Web Services https://docs.pivotal.io/spring- cloud-services/index.html ▸ Code to accompany this talk - https://github.com/conor10/homeloans ▸ https://www.huffle.com.au