Book description
Spring Microservices in Action teaches you how to build microservice-based applications using Java and the Spring platform.
About the Technology
Microservices break up your code into small, distributed, and independent services that require careful forethought and design. Fortunately, Spring Boot and Spring Cloud simplify your microservice applications, just as the Spring Framework simplifies enterprise Java development. Spring Boot removes the boilerplate code involved with writing a REST-based service. Spring Cloud provides a suite of tools for the discovery, routing, and deployment of microservices to the enterprise and the cloud.
About the Book
Spring Microservices in Action teaches you how to build microservice-based applications using Java and the Spring platform. You'll learn to do microservice design as you build and deploy your first Spring Cloud application. Throughout the book, carefully selected real-life examples expose microservice-based patterns for configuring, routing, scaling, and deploying your services. You'll see how Spring's intuitive tooling can help augment and refactor existing applications with microservices.
What's Inside
- Core microservice design principles
- Managing configuration with Spring Cloud Config
- Client-side resiliency with Spring, Hystrix, and Ribbon
- Intelligent routing using Netflix Zuul
- Deploying Spring Cloud applications
About the Reader
This book is written for developers with Java and Spring experience.
About the Author
John Carnell is a senior cloud engineer with twenty years of experience in Java.
Quotes
Spring is fast becoming the framework for microservices-this book shows you why and how.
- John Guthrie, Dell/EMC
A complete real-world bible for any microservices project in Spring.
- Mirko Bernardoni, Ixxus
Thorough and practical...with all the special capabilities of Spring thrown in.
- Vipul Gupta, SAP
Learn how to tame complex and distributed system design. Highly recommended.
- Ashwin Raj, Innocepts
Publisher resources
Table of contents
- Spring Microservices in Action
- Copyright
- Brief Table of Contents
- Table of Contents
- Preface
- Acknowledgments
- About this Book
- About the Author
- About the Cover Illustration
-
Chapter 1. Welcome to the cloud, Spring
- 1.1. What’s a microservice?
- 1.2. What is Spring and why is it relevant to microservices?
- 1.3. What you’ll learn in this book
- 1.4. Why is this book relevant to you?
- 1.5. Building a microservice with Spring Boot
- 1.6. Why change the way we build applications?
- 1.7. What exactly is the cloud?
- 1.8. Why the cloud and microservices?
- 1.9. Microservices are more than writing the code
- 1.10. Using Spring Cloud in building your microservices
- 1.11. Spring Cloud by example
- 1.12. Making sure our examples are relevant
- 1.13. Summary
- Chapter 2. Building microservices with Spring Boot
-
Chapter 3. Controlling your configuration with Spring Cloud configuration server
- 3.1. On managing configuration (and complexity)
- 3.2. Building our Spring Cloud configuration server
-
3.3. Integrating Spring Cloud Config with a Spring Boot client
- 3.3.1. Setting up the licensing service Spring Cloud Config server dependencies
- 3.3.2. Configuring the licensing service to use Spring Cloud Config
- 3.3.3. Wiring in a data source using Spring Cloud configuration server
- 3.3.4. Directly Reading Properties using the @Value Annotation
- 3.3.5. Using Spring Cloud configuration server with Git
- 3.3.6. Refreshing your properties using Spring Cloud configuration server
- 3.4. Protecting sensitive configuration information
- 3.5. Closing thoughts
- 3.6. Summary
- Chapter 4. On service discovery
-
Chapter 5. When bad things happen: client resiliency patterns with Spring Cloud and Netflix Hystrix
- 5.1. What are client-side resiliency patterns?
- 5.2. Why client resiliency matters
- 5.3. Enter Hystrix
- 5.4. Setting up the licensing server to use Spring Cloud and Hystrix
- 5.5. Implementing a circuit breaker using Hystrix
- 5.6. Fallback processing
- 5.7. Implementing the bulkhead pattern
- 5.8. Getting beyond the basics; fine-tuning Hystrix
- 5.9. Thread context and Hystrix
- 5.10. Summary
-
Chapter 6. Service routing with Spring Cloud and Zuul
- 6.1. What is a services gateway?
- 6.2. Introducing Spring Cloud and Netflix Zuul
- 6.3. Configuring routes in Zuul
- 6.4. The real power of Zuul: filters
- 6.5. Building your first Zuul pre-filter generating correlation IDs
- 6.6. Building a post filter receiving correlation IDs
- 6.7. Building a dynamic route filter
- 6.8. Summary
- Chapter 7. Securing your microservices
- Chapter 8. Event-driven architecture with Spring Cloud Stream
-
Chapter 9. Distributed tracing with Spring Cloud Sleuth and Zipkin
- 9.1. Spring Cloud Sleuth and the correlation ID
-
9.2. Log aggregation and Spring Cloud Sleuth
- 9.2.1. A Spring Cloud Sleuth/Papertrail implementation in action
- 9.2.2. Create a Papertrail account and configure a syslog connector
- 9.2.3. Redirecting Docker output to Papertrail
- 9.2.4. Searching for Spring Cloud Sleuth trace IDs in Papertrail
- 9.2.5. Adding the correlation ID to the HTTP response with Zuul
-
9.3. Distributed tracing with Open Zipkin
- 9.3.1. Setting up the Spring Cloud Sleuth and Zipkin dependencies
- 9.3.2. Configuring the services to point to Zipkin
- 9.3.3. Installing and configuring a Zipkin server
- 9.3.4. Setting tracing levels
- 9.3.5. Using Zipkin to trace transactions
- 9.3.6. Visualizing a more complex transaction
- 9.3.7. Capturing messaging traces
- 9.3.8. Adding custom spans
- 9.4. Summary
-
Chapter 10. Deploying your microservices
- 10.1. EagleEye: setting up your core infrastructure in the cloud
- 10.2. Beyond the infrastructure: deploying EagleEye
- 10.3. The architecture of a build/deployment pipeline
- 10.4. Your build and deployment pipeline in action
- 10.5. Beginning your build deploy/pipeline: GitHub and Travis CI
-
10.6. Enabling your service to build in Travis CI
- 10.6.1. Core build run-time configuration
- 10.6.2. Pre-build tool installations
- 10.6.3. Executing the build
- 10.6.4. Tagging the source control code
- 10.6.5. Building the microservices and creating the Docker images
- 10.6.6. Pushing the images to Docker Hub
- 10.6.7. Starting the services in Amazon ECS
- 10.6.8. Kicking off the platform tests
- 10.7. Closing thoughts on the build/deployment pipeline
- 10.8. Summary
- Appendix A. Running a cloud on your desktop
- Appendix B. OAuth2 grant types
- Index
- List of Figures
- List of Tables
- List of Listings
Product information
- Title: Spring Microservices in Action
- Author(s):
- Release date: July 2017
- Publisher(s): Manning Publications
- ISBN: 9781617293986
You might also like
book
Spring Microservices in Action, Second Edition
By dividing large applications into separate self-contained units, Microservices are a great step toward reducing complexity …
book
Spring REST: Building Java Microservices and Cloud Applications
Design and develop Java-based RESTful APIs using the latest versions of the Spring MVC and Spring …
book
Microservices in Action
Microservices in Action is a practical book about building and deploying microservice-based applications. Written for developers …
book
Cloud Native Spring in Action
Build and deliver production-grade cloud-native apps with Spring framework and Kubernetes. In Cloud Native Spring in …