The Beginner’s Guide to Spring Cloud

Original by @ryanjbaxter

https://slides.com/spencer/the-beginners-guide-to-spring-cloud/live

Nice To Meet You

Spring Cloud Core Lead

@spencerbgibb

Agenda

  • Spring Cloud Background
  • Key Projects
  • Getting Down and Dirty With Spring Cloud
  • Questions

Survey Time

Anyone Know This Guy?

Why Spring Cloud?

  • In general, cloud-native apps are a good thing, just not easy
  • It was easy for big companies to put forth the resources to succeed with cloud-native, but what about the little guys?
  • Why do we have to reinvent the wheel each time someone wants to build a Cloud Native app?
  • Follow the Spring Boot model of providing useful defaults for cloud-native apps with the ability to easily configure them
  • Cloud agnostic

Spring Cloud Components

Configuration

Service

Discovery

Circuit

Breakers

Routing &

Messaging

API

Gateway

Tracing

CI Pipelines

& Testing

Yes, There Are More

  • Spring Cloud Bus
  • Spring Cloud Stream
  • Spring Cloud Data
  • Spring Cloud Task
  • Spring Cloud AWS
  • ... and more

Configuration

  • We want to remove the configuration out of the application to centralized store across all environments
  • Spring Cloud Config Server can use Git, SVN, filesystem, Vault or JDBC to store config
  • Config clients (microservice apps) retrieve the configuration from the server on startup
  • Can be notified of changes and process changes in a refresh event

Service Discovery

  • With the dynamic nature of any cloud-native application depending on things like URLs can be problematic
  • Service Discovery allows micro-services to easily discover the routes to the services it needs to use
  • Netflix Eureka
  • Zookeeper
  • Consul

Routing and Messaging

  • Your cloud native app will be composed of many microservices so communication will be critical
  • Spring Cloud supports communication via HTTP requests or via messaging
  • Routing and Load Balancing:
    • Netflix Ribbon and Feign
  • Messaging:
    • RabbitMQ or Kafka

API Gateway

  • API Gateways allow you to route API requests (internal or external) to the correct service
  • Leverages service discovery and load balancer
  • Netflix Zuul
  • Spring Cloud Gateway

Circuit Breakers

  • Failure is inevitable, but your user’s
    don’t need to know
  • Circuit breakers can help an application function in the face of failure
  • Netflix Hystrix

Tracing

  • A single request to get data from your application may result in an exponentially large number of requests to various microservices
  • Tracing these requests through the application is critical when debugging issues
  • Spring Cloud
    Sleuth and Zipkin

CI Pipelines and Testing

  • Building, testing, and deploying the various services is critical to having a successful cloud native application
  • Spring Cloud Pipelines is an opinionated pipeline for Jenkins or Concourse that will automatically create pipelines for your apps
  • Spring Cloud Contract allows you to accurately mock dependencies between services using published contracts
     


Demo

Q & A

 

Spencer Gibb

@spencerbgibb

http://spencer.gibb.us

https://github.com/spencergibb

Spring Cloud

@springcloud

http://cloud.spring.io

https://github.com/spring-cloud

https://github.com/spring-cloud-samples

Original by: Ryan Baxter

@ryanjbaxter

http://ryanjbaxter.com

https://github.com/ryanjbaxter

The Beginner’s Guide to Spring Cloud

By Spencer Gibb

The Beginner’s Guide to Spring Cloud

  • 3,011