Introduction to Spring Cloud

VMware Tanzu
VMware TanzuVMware Tanzu
Introduction to
Spring Cloud
Slack: #session-introduction-to-spring-cloud
Olga Maciaszek-Sharma @olga_maciaszek
Spencer Gibb @spencerbgibb
Safe Harbor Statement
The following is intended to outline the general direction of VMware's offerings. It is intended for
information purposes only and may not be incorporated into any contract. Any information regarding
pre-release of VMware offerings, future updates or other planned modifications is subject to ongoing
evaluation by VMware and is subject to change. This information is provided without warranty or any kind,
express or implied, and is not a commitment to deliver any material, code, or functionality, and should not
be relied upon in making purchasing decisions regarding VMware's offerings. These purchasing decisions
should only be based on features currently available. The development, release, and timing of any features
or functionality described for VMware's offerings in this presentation remain at the sole discretion of
VMware. VMware has no obligation to update forward looking information in this presentation.
Agenda
• Cloud Native
• Sample Architecture
• Spring Cloud Components
• Revisit Sample Architecture
• Demo
3

Cloud Native
• Distributed
• Scalable
• Resilient
• Automated
• Organizational (Conway’s Law)
• Replaceable
4

Fallacies of Distributed Computing
• The network is reliable.
• Latency is zero.
• Bandwidth is infinite.
• The network is secure.
• Topology doesn't change.
• There is one administrator.
• Transport cost is zero.
• The network is homogeneous.
https://web.archive.org/web/20071223073932/http://java.sys-con.com/read/38665.htm 5

12 Factor Apps https://12factor.net
1.Code in VCS
2.Dependencies
3.Config in environment
4.Backing Services
5.Build, release, run
6.Process
6

7.Port binding
8.Concurrency
9.Disposability
10.Dev/prod parity
11.Logs
12.Admin processes
See also the 1 Factor App and 15 Factor Apps
User Service
Sample Architecture
API Gateway Metrics
Service
Discovery
Fraud
Verifier
Configuration
Card Application
Service
Distributed Configuration
Service
A
Config Server
Service
B
Spring Cloud Config Server
● Pluggable
○ Git
○ Vault
○ Credhub
○ JDBC
○ IaaS resource (S3, etc…)
● Retry
● Spring Boot compatible client
9
Spring Cloud Consul Config
● Bring your own Consul
● Uses key-value store
● Can be on value per key or a file per key
● Can be auto-refreshed
● Spring Boot compatible client
1
0
Others
● Spring Cloud Vault
● Spring Cloud Zookeeper Config
● Direct to IaaS
○ Spring Cloud Alibaba
○ Spring Cloud AWS
○ Spring Cloud Azure
○ Spring Cloud GCP
● Platform
○ K8s config maps
1
1
Service
A
Service
A
Service Registration and Discovery
Service
A
Service
Registry
Service
B
1. Registers 2. Query for Service A instances
3. Connect
Netflix Eureka
● Provided by Spring Cloud Netflix
● Highly Available
● Eventually Consistent
● Netflix uses Spring Cloud Netflix!
http://techblog.netflix.com/2012/09/eureka.html
1
3
Consul by Hashicorp
● Integration by Spring Cloud Consul
● Bring your own Consul Servers
● Can be strongly consistent
● Uses Services API
● Supports consul health checks
● Spring Boot compatible client
1
4
Others
● Spring Cloud Zookeeper Discovery
● Spring Cloud Alibaba (Nacos)
1
5
Client Side Load-balancer
Service
A
Service
A
Service
A
Service
Registry
Service
B
1. Query service A
instances 2. Select the service A instance to
send the request to
Service
A
Service
A
Service
A
Spring Cloud LoadBalancer
● Replaces Netflix Ribbon
● Pluggable algorithm
● Reactive support
● Extensible configuration
1
7
Failure Mitigation
Spring Cloud Circuit Breaker
● Protects from cascading failures
● Fallback
● Pluggable
○ Resilience4j
○ Spring Retry
○ Spring Cloud Alibaba (Sentinel)
● Pluggable algorithm
● Reactive support
1
9
Open
Closed
Half
Open
Failure
threshold
exceeded
Success
Timeout
Reset
Failure
Retry
● Retry failed requests
● Spring Retry
● Project Reactor
● Resilience4j
2
0
Distributed Tracing
Browser
API Gateway
User
Service
Mobile
App
Cart
Service
Inventory
Service
Inventory
DB
User
DB
Spring Cloud Sleuth
● Trouble-shooting across a distributed system
● Instruments for tracing
○ Spring Framework
○ Spring Boot
○ Spring Cloud
2
2
API Gateway
Browser
API Gateway
User
Service
Mobile
App
Cart
Service
Spring Cloud Gateway
● API Gateway
● Spring Boot App
● Focus on developer experience and customization
● Supports Spring Cloud
○ Configuration
○ Service Discovery
○ LoadBalancer
○ Retry/Circuit Breaker
○ Rate Limiting
○ Sleuth
2
4
User Service
(SC Circuit
Breaker)
Sample Architecture with Spring Cloud
Spring Cloud
Gateway
(SC CircuitBreaker,
Retry)
Metrics
Eureka
Service
Discovery
Fraud
Verifier
Spring Cloud
Config Server
Card Application
Service
(SC LoadBalancer)
Demo
What we did not talk about.
More to Spring Cloud
● Spring Cloud Bus
● Spring Cloud OpenFeign
● Spring Cloud Contract
● Spring Cloud Function
● Spring Cloud Stream
● Spring Cloud Task
● Spring Cloud Data Flow
● ...
2
8
Stay Connected.
Slack: #session-introduction-to-spring-cloud
https://github.com/spring-cloud-samples/spring-cloud-intro-demo
https://github.com/spring-cloud
https://spring.io/projects/spring-cloud
Olga Maciaszek-Sharma @olga_maciaszek
Spencer Gibb @spencerbgibb
#springone@s1p
1 of 29

More Related Content

What's hot(20)

Jenkins OverviewJenkins Overview
Jenkins Overview
Ahmed M. Gomaa10.4K views
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Anil Allewar1.1K views
Why Microservice Why Microservice
Why Microservice
Kelvin Yeung487 views
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Amazon Web Services66.7K views
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
Nguyen Tung7.1K views
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
Sanjoy Kumar Roy3.6K views
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices
Amazon Web Services6.2K views
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Roger van de Kimmenade423 views
GraalVMGraalVM
GraalVM
NexThoughts Technologies915 views
Building .NET MicroservicesBuilding .NET Microservices
Building .NET Microservices
VMware Tanzu3.9K views
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Paulo Gandra de Sousa7.4K views
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Amazon Web Services20.1K views
Spring SecuritySpring Security
Spring Security
Knoldus Inc.595 views

Similar to Introduction to Spring Cloud (20)

Wellington MuleSoft Meetup 2021-02-18Wellington MuleSoft Meetup 2021-02-18
Wellington MuleSoft Meetup 2021-02-18
Mary Joy Sabal1.5K views
Advanced Continuous Delivery on AWSAdvanced Continuous Delivery on AWS
Advanced Continuous Delivery on AWS
Amazon Web Services977 views
London MuleSoft Meetup London MuleSoft Meetup
London MuleSoft Meetup
Akshata Sawant15 views
Cloudify 4.6 highlights webinarCloudify 4.6 highlights webinar
Cloudify 4.6 highlights webinar
Cloudify Community465 views
JavaCro'15 - Oracle Java Cloud Service  Java PaaS - Duško VukmanovićJavaCro'15 - Oracle Java Cloud Service  Java PaaS - Duško Vukmanović
JavaCro'15 - Oracle Java Cloud Service Java PaaS - Duško Vukmanović
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association1.9K views

Recently uploaded(20)

Build and Modernize Intelligent Apps​Build and Modernize Intelligent Apps​
Build and Modernize Intelligent Apps​
Lorenzo Barbieri35 views
Oxygen JSON EditorOxygen JSON Editor
Oxygen JSON Editor
Octavian Nadolu20 views
MAXQDA-24-Features-EN.pdfMAXQDA-24-Features-EN.pdf
MAXQDA-24-Features-EN.pdf
Cheer Chain Enterprise Co., Ltd.153 views

Introduction to Spring Cloud