O'Reilly logo
live online training icon Live Online training

Microservices with Spring Cloud

Leverage the power of Spring to create resilient microservices

Marcin Grzejszczak

The desire to create microservice-based architecture is on the rise. With the increasing complexity of such solutions there is a need for tools that allow Java developers to tackle distributed system issues in a simple way.

One of such mature tools is Spring Cloud - a Spring Boot based set of tooling. Constantly adapting to the requirements of the modern software development, Spring Cloud allows you to apply complex distributed system patterns with a one-liner or just via convention. Throughout this course you will learn the basics of Spring Cloud and how to apply it in your systems.

What you'll learn-and how you can apply it

By the end of this live, hands-on, online course, you’ll understand:

  • What Spring Cloud is and how to apply it in your project
  • How to communicate between services via HTTP and messaging
  • How to gather metrics and perform latency analysis of your applications

And you’ll be able to:

  • Write Spring Cloud microservices in no time
  • Discover instances of your applications via Spring Cloud’s service discovery integration
  • Gather metrics with Micrometer, perform latency analysis and tracing with Spring Cloud Sleuth

This training course is for you because...

  • You’re a Java developer
  • You work with microservices
  • You want to become a microservices developer

Prerequisites

  • Intermediate knowledge of Java
  • Basic knowledge of Spring Boot, Spring WebMvc and Git

Recommended preparation:

Recommended follow-up:

About your instructor

  • Marcin Grzejszczak is a software engineer at Pivotal. He has written two books, Mockito Instant and Mockito Cookbook and co-authored the Applied Continuous Delivery Live Lessons with Josh Long. Marcin is co-founder of the Warsaw Cloud Native meetup. Currently he is working as lead of the Spring Cloud Sleuth, Spring Cloud Contract, and Spring Cloud Pipelines projects. You can follow Marcin on Twitter @mgrzejszczak.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

What is Spring Cloud and what does Spring Boot have to do with it? (60 min)

  • Presentation: Understanding the basic concepts of Spring Boot, Spring Cloud as a portfolio project and Spring Cloud dependency management.
  • Presentation: How to create and properly setup Spring Boot based projects using the Spring Initializr project.
  • Presentation: Creating a Spring Cloud Config server and referencing such properties in a Spring Cloud application.
  • Activity: Externalizing configuration via Spring Cloud Config. In this lab, students will use the Project Initializr (start.spring.io) to generate two projects - a Spring Cloud Config server and a Spring Cloud Config client application.
  • Q&A
  • Break (5 min)

How can microservices communicate and what is service discovery? (60 min)

  • Presentation: Issues related to microservice based communications, the basic concepts of service discovery, and Spring Cloud Netflix.
  • Presentation: Understanding how to set up a Spring Cloud Netflix Eureka server and how to communicate with that from the client perspective.
  • Presentation: Setting up a Spring Cloud Netflix Eureka server and how to communicate with that from the client perspective.
  • Activity: Service to service communication with Spring Cloud. In this lab, students will use the Project Initializr (start.spring.io) to generate a Spring Cloud Eureka server and two client applications.
  • Q&A
  • Break (5 min)

How can microservices gather metrics? How can microservices not cascade failure? (60 min)

  • Presentation: Issues related to microservice metrics gathering and aggregation via project Micrometer.
  • Presentation: Issues related to microservice failure propagation and how can this issue be tackled via a circuit breaker pattern.
  • Presentation: Understanding the basic concepts of distributed tracing via Spring Cloud Sleuth, Zipkin and the Elastic Logstash Kibana stack.
  • Activity: Circuit breaking, metrics aggregation and latency analysis with Spring Cloud. In this lab, students will use the Micrometer project to create custom metrics in their Spring Cloud based applications, generated via Spring Initilzr.
  • Q&A
  • Break (5 min)

How can we implement an API gateway in a distributed system? How can we work with messaging when dealing with microservices? (60 min)

  • Presentation: Understanding the basic concepts of Spring Cloud Gateway.
  • Presentation: Understanding the basic concepts of messaging based systems and of Spring Cloud Stream with RabbitMQ.
  • Activity: API gateway, messaging and microservices testing. In this lab, students will generate two Spring Cloud Stream applications that will talk to each other over Spring Cloud Stream with RabbitMQ.
  • Q&A