Spring Boot Intermediate Microservices: Resilient Microservices with Spring Boot 2 and Spring Cloud
- Jens Boje
- Jens Boje
Learn to build a resilient microservice infrastructure using proven patterns with Spring Boot 2 and Spring Cloud
Resilience and fault tolerance are a must, or your system will fall apart.
Our guides give you brief lessons on a single topic to get you started in no time. We leave the fluff out so you can focus and learn better and fast
In this guide, we will build a tiny web application using the microservice we created in "Spring Boot: How To Get Started and Build a Microservice" and expand the scenario with common microservice patterns for building a reliable fault-tolerant infrastructure. You can follow along without having read the previous book.
You learn best by coding. The way I love learning too.
We use Spring Boot 2 with the Milestone 2.
What you will build:
We will write a simple web client application for our microservice and improve it with each step to handling load balancing, failovers, service discovery and more. In each stage, we implement one pattern and discuss its advantages and disadvantages.
At the end of the book, you will have an understanding of what the patterns solve and how to implement them in Spring Boot.
What you will learn:
- How to access a remote API with Spring's RestTemplate
- How to do retries and fallbacks in case of API errors
- How to add client side load balancing to it
- How to use the circuit breaker pattern with Spring Cloud
- How to register and discover services
- What the role of a gateway is
- How you can easily add a gateway
- How to store configurations in a central place
You must have experience with developing in Java and should have some knowledge of Spring Boot. If you are new to Spring Boot, check out the first guide to get started.
If you have questions, do not hesitate to contact me using the email address at the end of the book. I'll answer your questions and improve the book with your feedback. Promised!
About the Author
Actionable information that can change your life for the price of a pizza but lasts much longer.
Jens is a software architect, developer, father of a wonderful daughter, husband to a marvelous wife and minimalist. He loves exploring new things and making life better.
What he does not like are dogmatic beliefs, people stuck in dogmas and forcing themselves upon others.
He blogs about programming at codeboje.de and relaxation and personal development at how-to-relax.com.
In this Book
Building the Consumer Application
Basic Retry and Fallback Functionality
Client-Side Load Balancing
Moving Behind a Gateway
Notes on Using Spring Boot 2 Milestones