5. A map for Cloud-native patterns
Stateless
DDD /
Bounded
context / fine
grain
12 factors
Circuit
breaker
Client LB
YP / Service
Registry
asynchronous
API first
API gateway
event driven
disposable
(12X)
chaos
engineering
CI/CD
Small iterations
Continuous refactoring
instant scale up
/ scale down
site reliability
engineering
Continuous
update / patch
Vault
External
config’s
Contract
Data services
abstractions
anti fragile
/
resiliency
product centric observability
SLO / SLI
Design
Security
Behavior
Team
Distributed
Architectures
Value via
communication
6. A map for Cloud-native patterns
12 factors
Circuit
breaker
Client LB
YP / Service
Registry
asynchronous
API gateway
event driven
disposable
(12X)
chaos
engineering
CI/CD
Small iterations
Continuous refactoring
instant scale up
/ scale down
site reliability
engineering
Continuous
update / patch
Vault
External
config’s
Contract
Data services
abstractions
anti fragile
/
resiliency
product centric observability
SLO / SLI
Design
Security
Behavior
Team
Distributed
Architectures
Value via
communication
Stateless
DDD /
Bounded
context / fine
grain
8. Demo app architecture
API Gateway
Spring Cloud Gateway
Frontend UI
Spring Boot + Vue.js
Users API
Spring Cloud
Connections API
Spring Cloud
Feeds API
Spring Cloud
Search API
Spring Cloud
Posts API
Spring Cloud
Service Discovery
Netflix Eureka
httpshttps
10. API first
API as a product
➔ Design fine-grained APIs
◆ Balance between chatty and coarse-grained APIs
➔ Apply domain driven design, embrace bounded context principles
➔ Distributed architecture: a way to scale out your application workloads
➔ Composability: build your app from component parts
➔ Hide your microservices implementation using Spring Cloud Gateway
◆ Keep your public API stable, handle breaking changes with care
11. API gateway and Service discovery in action
API Gateway
Spring Cloud Gateway
Frontend UI
Spring Boot + Vue.js
Users API
Spring Cloud
Connections API
Spring Cloud
Feeds API
Spring Cloud
Search API
Spring Cloud
Posts API
Spring Cloud
Service Discovery
Netflix Eureka
httpshttps
12. Service discovery
Know where you are
➔ Leverage Spring Cloud to locate your services
◆ Pluggable DiscoveryClient extensions: Consul, Kubernetes, Netflix Eureka
➔ Think dynamic, not static: you may scale out your app (more instances), or scale to zero
➔ Build with resilience in mind: apply circuit breaker pattern
◆ You don’t know when a service is down
➔ Spring Cloud provides a high level platform abstraction
◆ WebClient / RestTemplate nicely fit with Netflix OSS, Resilience4j, Kubernetes
13. Scaling out your app
API Gateway
Spring Cloud Gateway
Frontend UI
Spring Boot + Vue.js
Users API
Spring Cloud
Connections API
Spring Cloud
Feeds API
Spring Cloud
Search API
Spring Cloud
Posts API
Spring Cloud
Service Discovery
Netflix Eureka
httpshttps
15. Chaos engineering
“Organize” the chaos, Murphy’s law is coming! Or … Failure is normal !
➔ Disposability: get help from both your design and platform features
◆ Kill your app and wait for “scream”
◆ Let the platform recover your app and analyse what happens
◆ Scale out your app, kill a container and analyze what happens
➔ Test often, test early, break often, break early (tested last week …)
◆ Functional tests are not enough: the datacenter will burn
◆ More time to enhance your design
➔ Never trust the network
◆ “It was DNS” or the Load balancer or …
16. Observability & monitoring
Improved measures optimize mission effectiveness:
give sense, collect sense, shared sense
➔ Leverage out-of-the-box non-functional instruments
◆ Just add Spring Boot Actuator and Micrometer Prometheus Exporter
➔ Use tailored tools to scrape metrics
◆ Prometheus, Datadog, Dynatrace, Application Insights, Wavefront, etc.
➔ Create ad-hoc dashboards depending on who’s viewing it
◆ Build your own dashboard using Grafana
17. Exposing app metrics
API gateway
Spring Cloud Gateway
Frontend UI
Spring Boot + Vue.js
httpshttps
Prometheus
Database
Grafana
Dashboard
22. Cloud-native patterns seen as a “mille-feuille”
Methodology
Learn the necessary practices to
build modern software
Tools
Build with products focused on
developer productivity
Platform
Run every app, on every cloud,
on a unified platform
Cloud-native
software
Pivotal Labs and
Services
Pivotal Cloud Foundry
Best-in-class products
Your teams
Pivotal
Culture
Continually improve and deliver
customer success