This document discusses building resilient microservices with Spring Cloud. It defines criteria for cloud native, cloud resilient, cloud friendly, and cloud ready applications. It also describes Spring Cloud features for service discovery, circuit breakers, and gateway routing that help meet these criteria. The presentation includes demos of Spring Cloud service discovery and circuit breakers, and a Kubernetes demo using Spring Cloud Kubernetes.
11. Cloud Ready
! No file system requirements
! Containerized
! Platform managed addresses and ports
! Consume Platform services
12. Cloud Friendly
! 12 Factor apps
! Horizontally scalable
! Leverage platform for HA
13. Cloud Resilient
! Design for failure
! Apps are unaffected by dependent service failure
! Proactive testing for failure
! Metrics and monitoring baked in
! Cloud agnostic runtime implementation
17. Spring Cloud
Simple and accessible programming
model for the most common
distributed systems and microservice
patterns
! Service Discovery
! Config Management
! Circuit Breakers
! Gateways, Tracing
! AWS, GCP, AZure, K8s
! And more...
Spring & Spring Boot
The world’s #1 enterprise Java
application development framework
and the leading quickstart
microservices engine
! IoC / Dependency Injection
! AOP, Data, Transactions
! HTTP, REST, Reactive,
Sockets
! Build, Test, Integrate, Run
! Instrumentation, Scheduling
! And more...
Build Anything Coordinate Anything
INCLUDES INCLUDES
Spring Cloud Data Flow
Cloud native connectors and data
orchestration pipelines for the most
common integration scenarios
! Many, many connectors
! Stream & batch processing
! Host on PCF (PAS & PKS) &
K8s
! Simple Spring Flow UI
! Metrics, Health, Insights
! And more...
Connect Anything
INCLUDES
22. Cover w/ Image
Spring Cloud Service Discovery
■ Key tenets of microservice
based architecture
■ Provides HTTP interface + client
libs for client registry and
discovery
■ Different implementations based
on the underlying platform.
■ Support for Netflix Eureka and
K8s
27. Cover w/ Image
■ Stop cascading failures in a
Distributed System
■ Fail fast and Rapidly
recoverLoad shedding and
failing fast
■ Near realtime monitoring,
alerting and operational control
■ Fallback and gracefully degrade
when possible
Spring Cloud Circuit Breaker
38. Cover w/ Image
■ Spring Cloud Discovery Client
Integration
■ Circuit Breaker Integration
■ Built on Reactor, Spring Boot
■ Supports
■ YAML based Config
■ Java Fluent API
Spring Cloud Gateway Features
44. Cover w/ Image
■ Hot reload of ConfigMap/Secrets
■ Map Spring config support with ConfigMap:
@Values, @ConfigurationProperties
■ Native Service Discovery without using an
Eureka instance
■ DiscoveryClient uses Kubernetes DNS
resolver and cluster events
■ Use @LoadBalanced and
LoadBalancerClient for client-side load
balancing across running pods
■ Spring Cloud Circuit breaker support (Hystrix
and Resilience4j)
Spring Cloud Kubernetes
46. Cover w/ Image
Use it
Existing Spring Cloud apps
Uses client side load balancing
Uses Discovery Client
Is OK to use the Kubernetes API server directly
Maybe not for you (coz I like writing YAML!)
Just planning on running only on Kubernetes
Familiar with Kubernetes
Should I use Spring Cloud K8s?
47. Cover w/ Image
■ Spring Cloud Gateway
■ Spring Cloud Service Discovery
■ Spring Cloud Circuit Breaker
■ Spring Cloud Kubernetes
What we covered
48. Cloud Resilient
! Design for failure
! Apps are unaffected by dependent service failure
! Proactive testing for failure
! Metrics and monitoring baked in
! Cloud agnostic runtime implementation
49.
50. Cover w/ Image
■ Revolutionized design of
bridges by using reinforced
concrete and arches
■ Always validated his design by
conducting Full-Scale Load
Tests
■ Emphasized learning from past
Designs
https://en.wikipedia.org/wiki/Robert_Maillart
Robert Maillart
53. ■ Code based on S1P presentation by Ryan Baxter and Alex Roman
■ Code for Demo https://github.com/abhinavrau/spring-cloud-k8s-demo
■ Neal Ford presentation of “Stories every developer should know
■ Spring Cloud Projects: https://spring.io/projects/spring-cloud