SlideShare a Scribd company logo
1 of 56
Download to read offline
JAVA MICROSERVICES WITH
NETFLIX OSS & SPRING
CONOR SVENSSON
SPRING BOOT
SPRING BOOT
▸ Stand-alone Spring-based applications
▸ Tomcat embedded container (supports Jetty & JBoss
Undertow too)
▸ Starter POMs
▸ Annotation driven
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
TESTING
▸ spring-boot-starter-test starter POM provides:
▸ Spring Test
▸ Unit
▸ Hamcrest + Assert4J (v1.4)
▸ Mockito
▸ MockMvc
▸ @WebIntegrationTest
SPRING BOOT
CONFIGURATION BEANS
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
NETFLIX OSS + SPRING
LOGGING
▸ Logback is the default choice
▸ Alternative starters are provided
▸ Using alternatives (such as log4j2) requires exclusions
throughout the starter POMs
NETFLIX OSS + SPRING
DOWNSIDES
▸ A lot of magic - e.g. CORS filters
▸ 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
NETFLIX OSS + SPRING
ALTHOUGH…
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/
▸ Spring project dependency selector - http://start.spring.io/
▸ Code to accompany this talk - https://github.com/conor10/homeloans
▸ https://www.huffle.com.au
NETFLIX OSS + SPRING
THANKS
conor@huffle.com.au

More Related Content

What's hot

AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWSAWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWSsmalltown
 
Service discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudService discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudMarcelo Serpa
 
Spring Cloud Into Production
Spring Cloud Into ProductionSpring Cloud Into Production
Spring Cloud Into ProductionTodd Miller
 
Gatekeeper: API gateway
Gatekeeper: API gatewayGatekeeper: API gateway
Gatekeeper: API gatewayChengHui Weng
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...KCDItaly
 
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, KayentaNetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, Kayentaaspyker
 
Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryAlain Sahli
 
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 modelsPeter Ss
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internalsShapeBlue
 
Microservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSMicroservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSDenis Danov
 
Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusWeaveworks
 
Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on DockerDocker, Inc.
 
Knative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre RomanKnative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre RomanKCDItaly
 
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Henning Jacobs
 
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...Lee Calcote
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18CodeOps Technologies LLP
 
Kubernetes your next application server
Kubernetes  your next application serverKubernetes  your next application server
Kubernetes your next application serverRed Hat Developers
 

What's hot (20)

AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWSAWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
 
Service discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring CloudService discovery with Eureka and Spring Cloud
Service discovery with Eureka and Spring Cloud
 
Spring Cloud Into Production
Spring Cloud Into ProductionSpring Cloud Into Production
Spring Cloud Into Production
 
Gatekeeper: API gateway
Gatekeeper: API gatewayGatekeeper: API gateway
Gatekeeper: API gateway
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
Multi-Clusters Made Easy with Liqo:
Getting Rid of Your Clusters Keeping Them...
 
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, KayentaNetflixOSS Meetup S6E2 - Spinnaker, Kayenta
NetflixOSS Meetup S6E2 - Spinnaker, Kayenta
 
Microservices with Spring and Cloud Foundry
Microservices with Spring and Cloud FoundryMicroservices with Spring and Cloud Foundry
Microservices with Spring and Cloud Foundry
 
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
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internals
 
Microservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSSMicroservices with Spring Cloud and Netflix OSS
Microservices with Spring Cloud and Netflix OSS
 
Monitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with PrometheusMonitoring Weave Cloud with Prometheus
Monitoring Weave Cloud with Prometheus
 
Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on Docker
 
The elements of kubernetes
The elements of kubernetesThe elements of kubernetes
The elements of kubernetes
 
Knative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre RomanKnative goes
 beyond serverless | Alexandre Roman
Knative goes
 beyond serverless | Alexandre Roman
 
Istio on Kubernetes
Istio on KubernetesIstio on Kubernetes
Istio on Kubernetes
 
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
 
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
Create Great CNCF User-Base from Lessons Learned from Other Open Source Commu...
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
 
Kubernetes your next application server
Kubernetes  your next application serverKubernetes  your next application server
Kubernetes your next application server
 

Viewers also liked

Data stream processing and micro service architecture
Data stream processing and micro service architectureData stream processing and micro service architecture
Data stream processing and micro service architectureVyacheslav Benedichuk
 
The seven more deadly sins of microservices final
The seven more deadly sins of microservices finalThe seven more deadly sins of microservices final
The seven more deadly sins of microservices finalHaufe-Lexware GmbH & Co KG
 
Building a Modern Microservices Architecture at Gilt: The Essentials
Building a Modern Microservices Architecture at Gilt: The EssentialsBuilding a Modern Microservices Architecture at Gilt: The Essentials
Building a Modern Microservices Architecture at Gilt: The EssentialsC4Media
 
Deployment Automation with Microservices
Deployment Automation with MicroservicesDeployment Automation with Microservices
Deployment Automation with MicroservicesGanesh Ghag
 
Developing and deploying applications with Spring Boot and Docker (@oakjug)
Developing and deploying applications with Spring Boot and Docker (@oakjug)Developing and deploying applications with Spring Boot and Docker (@oakjug)
Developing and deploying applications with Spring Boot and Docker (@oakjug)Chris Richardson
 
Continuous Delivery - Voxxed Days Bucharest 2017
Continuous Delivery - Voxxed Days Bucharest 2017Continuous Delivery - Voxxed Days Bucharest 2017
Continuous Delivery - Voxxed Days Bucharest 2017Rafał Leszko
 
Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...
Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...
Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...Voxxed Days Thessaloniki
 
From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...
From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...
From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...Renaud Visage
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...C4Media
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudJames Heggs
 
Microservices deployment patterns
Microservices deployment patternsMicroservices deployment patterns
Microservices deployment patternsAbhishek Tiwari
 

Viewers also liked (13)

Data stream processing and micro service architecture
Data stream processing and micro service architectureData stream processing and micro service architecture
Data stream processing and micro service architecture
 
The seven more deadly sins of microservices final
The seven more deadly sins of microservices finalThe seven more deadly sins of microservices final
The seven more deadly sins of microservices final
 
Building a Modern Microservices Architecture at Gilt: The Essentials
Building a Modern Microservices Architecture at Gilt: The EssentialsBuilding a Modern Microservices Architecture at Gilt: The Essentials
Building a Modern Microservices Architecture at Gilt: The Essentials
 
Deployment Automation with Microservices
Deployment Automation with MicroservicesDeployment Automation with Microservices
Deployment Automation with Microservices
 
Developing and deploying applications with Spring Boot and Docker (@oakjug)
Developing and deploying applications with Spring Boot and Docker (@oakjug)Developing and deploying applications with Spring Boot and Docker (@oakjug)
Developing and deploying applications with Spring Boot and Docker (@oakjug)
 
Continuous Delivery - Voxxed Days Bucharest 2017
Continuous Delivery - Voxxed Days Bucharest 2017Continuous Delivery - Voxxed Days Bucharest 2017
Continuous Delivery - Voxxed Days Bucharest 2017
 
Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...
Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...
Voxxed Days Thessaloniki 2016 - Continuous Delivery: Jenkins, Docker and Spri...
 
From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...
From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...
From a Monolithic to a Distributed API Architecture
 at Eventbrite - Presente...
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
 
Zero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google CloudZero to Continuous Delivery on Google Cloud
Zero to Continuous Delivery on Google Cloud
 
Microservices deployment patterns
Microservices deployment patternsMicroservices deployment patterns
Microservices deployment patterns
 
Edge architecture ieee international conference on cloud engineering
Edge architecture   ieee international conference on cloud engineeringEdge architecture   ieee international conference on cloud engineering
Edge architecture ieee international conference on cloud engineering
 
Zuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne PlatformZuul @ Netflix SpringOne Platform
Zuul @ Netflix SpringOne Platform
 

Similar to Java Microservices with Netflix OSS & Spring

Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
The Good Parts / The Hard Parts
The Good Parts / The Hard PartsThe Good Parts / The Hard Parts
The Good Parts / The Hard PartsNoah 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 architecturesJakub Hajek
 
StackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackStackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackChiradeep Vittal
 
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-cncfskJuraj Hantak
 
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 SAMGeorge Tourkas
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with KubernetesDeivid Hahn Fração
 
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...Anthony Burke
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3SJakub Hajek
 
Stockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless ChallengesStockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless Challengesİbrahim Gürses
 
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 FreitagOrtus Solutions, Corp
 
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 @BASTAconMario-Leander Reimer
 
Traefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3STraefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3SJakub Hajek
 
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 HajekPROIDEA
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes WorkshopWalter Liu
 
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.10Takayoshi Tanaka
 

Similar to Java Microservices with Netflix OSS & Spring (20)

Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
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
 
StackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackStackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStack
 
ecs-presentation
ecs-presentationecs-presentation
ecs-presentation
 
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
 
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
 
Scaling Microservices with Kubernetes
Scaling Microservices with KubernetesScaling Microservices with Kubernetes
Scaling Microservices with Kubernetes
 
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
Security Practitioners guide to Micro Segmentation with VMware NSX and Log In...
 
Canary deployment with Traefik and K3S
Canary deployment with Traefik and K3SCanary deployment with Traefik and K3S
Canary deployment with Traefik and K3S
 
Stockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless ChallengesStockholm Serverless Meetup - Serverless Challenges
Stockholm Serverless Meetup - Serverless Challenges
 
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
 
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
 
Introduction to istio
Introduction to istioIntroduction to istio
Introduction to istio
 
Traefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3STraefik 2.x features - canary deployment with Traefik and K3S
Traefik 2.x features - canary deployment with Traefik and K3S
 
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
 
The state of the swarm
The state of the swarmThe state of the swarm
The state of the swarm
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Big Data on AWS
Big Data on AWSBig Data on AWS
Big Data on AWS
 
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
 

More from 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
 
Blockchain - Navigating this Game-Changing Technology
Blockchain - Navigating this Game-Changing TechnologyBlockchain - Navigating this Game-Changing Technology
Blockchain - Navigating this Game-Changing TechnologyConor Svensson
 
Java and the blockchain - introducing web3j
Java and the blockchain - introducing web3jJava and the blockchain - introducing web3j
Java and the blockchain - introducing web3jConor 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

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Java Microservices with Netflix OSS & Spring

  • 1. JAVA MICROSERVICES WITH NETFLIX OSS & SPRING CONOR SVENSSON
  • 2.
  • 3.
  • 4. SPRING BOOT SPRING BOOT ▸ Stand-alone Spring-based applications ▸ Tomcat embedded container (supports Jetty & JBoss Undertow too) ▸ Starter POMs ▸ Annotation driven
  • 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
  • 12. SPRING BOOT TESTING ▸ spring-boot-starter-test starter POM provides: ▸ Spring Test ▸ Unit ▸ Hamcrest + Assert4J (v1.4) ▸ Mockito ▸ MockMvc ▸ @WebIntegrationTest
  • 13.
  • 14.
  • 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. NETFLIX OSS + SPRING LOGGING ▸ Logback is the default choice ▸ Alternative starters are provided ▸ Using alternatives (such as log4j2) requires exclusions throughout the starter POMs
  • 53. NETFLIX OSS + SPRING DOWNSIDES ▸ A lot of magic - e.g. CORS filters ▸ 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
  • 54. NETFLIX OSS + SPRING ALTHOUGH…
  • 55. 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/ ▸ Spring project dependency selector - http://start.spring.io/ ▸ Code to accompany this talk - https://github.com/conor10/homeloans ▸ https://www.huffle.com.au
  • 56. NETFLIX OSS + SPRING THANKS conor@huffle.com.au