Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Microservices with Spring Boot 3 and Spring Cloud, Third Edition
Microservices with Spring Boot 3 and Spring Cloud, Third Edition

Microservices with Spring Boot 3 and Spring Cloud, Third Edition: Build resilient and scalable microservices using Spring Cloud, Istio, and Kubernetes , Third Edition

Arrow left icon
Profile Icon Magnus Larsson AB
Arrow right icon
R$50 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (23 Ratings)
Paperback Aug 2023 706 pages 3rd Edition
eBook
R$80 R$200.99
Paperback
R$250.99
Subscription
Free Trial
Renews at R$50p/m
Arrow left icon
Profile Icon Magnus Larsson AB
Arrow right icon
R$50 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (23 Ratings)
Paperback Aug 2023 706 pages 3rd Edition
eBook
R$80 R$200.99
Paperback
R$250.99
Subscription
Free Trial
Renews at R$50p/m
eBook
R$80 R$200.99
Paperback
R$250.99
Subscription
Free Trial
Renews at R$50p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Microservices with Spring Boot 3 and Spring Cloud, Third Edition

Microservices with Spring Boot 3 and Spring Cloud, Third Edition: Build resilient and scalable microservices using Spring Cloud, Istio, and Kubernetes

Welcome to Packt Early Access. We’re giving you an exclusive preview of this book before it goes on sale. It can take many months to write a book, but our authors have cutting-edge information to share with you today. Early Access gives you an insight into the latest developments by making chapter drafts available. The chapters may be a little rough around the edges right now, but our authors will update them over time.You can dip in and out of this book or follow along from start to finish; Early Access is designed to be flexible. We hope you enjoy getting to know more about the process of writing a Packt book.

  1. Chapter 1: Introduction to Microservices
  2. Chapter 2: Introduction to Spring Boot
  3. Chapter 3: Creating a Set of Cooperating Microservices
  4. Chapter 4: Deploying Our Microservices Using Docker
  5. Chapter...

Technical requirements

No installations are required for this chapter. However, you may be interested in taking a look at the C4 model conventions, https://c4model.com, since the illustrations in this chapter are inspired by the C4 model.

This chapter does not contain any source code.

My way into microservices

When I first learned about the concept of microservices back in 2014, I realized that I had been developing microservices (well, kind of) for a number of years without knowing it was microservices I was dealing with. I was involved in a project that started in 2009 where we developed a platform based on a set of separated features. The platform was delivered to a number of customers that deployed it on-premises. To make it easy for customers to pick and choose what features they wanted to use from the platform, each feature was developed as an autonomous software component; that is, it had its own persistent data and only communicated with other components using well-defined APIs.

Since I can’t discuss specific features in this project’s platform, I have generalized the names of the components, which are labeled from Component A to Component F. The composition of the platform as a set of components is illustrated as follows:

Diagram  Description automatically generated

Figure...

Defining a microservice

A microservice architecture is about splitting up monolithic applications into smaller components, which achieves two major goals:

  • Faster development, enabling continuous deployments
  • Easier to scale, manually or automatically

A microservice is essentially an autonomous software component that is independently upgradeable, replaceable, and scalable. To be able to act as an autonomous component, it must fulfill certain criteria, as follows:

  • It must conform to a shared-nothing architecture; that is, microservices don’t share data in databases with each other!
  • It must only communicate through well-defined interfaces, either using APIs and synchronous services or preferably by sending messages asynchronously. The APIs and message formats used must be stable, well documented, and evolve by following a defined versioning strategy.
  • It must be deployed as separate runtime processes. Each instance of a microservice...

Challenges with microservices

In the Challenges with autonomous software components section, we have already seen some of the challenges that autonomous software components can bring (and they all apply to microservices as well), as follows:

  • Many small components that use synchronous communication can cause a chain of failure problem, especially under high load
  • Keeping the configuration up to date for many small components can be challenging
  • It’s hard to track a request that’s being processed and involves many components, for example, when performing root cause analysis, where each component stores log records locally
  • Analyzing the usage of hardware resources on a component level can be challenging as well
  • Manual configuration and management of many small components can become costly and error-prone

Another downside (but not always obvious initially) of decomposing an application into a group of autonomous components is that...

Design patterns for microservices

This topic will cover the use of design patterns to mitigate challenges with microservices, as described in the preceding section. Later in this book, we will see how we can implement these design patterns using Spring Boot, Spring Cloud, Kubernetes, and Istio.

The concept of design patterns is actually quite old; it was invented by Christopher Alexander back in 1977. In essence, a design pattern is about describing a reusable solution to a problem when given a specific context. Using a tried and tested solution from a design pattern can save a lot of time and increase the quality of the implementation compared to spending time inventing the solution ourselves.

The design patterns we will cover are as follows:

  • Service discovery
  • Edge server
  • Reactive microservices
  • Central configuration
  • Centralized log analysis
  • Distributed tracing
  • Circuit breaker
  • Control loop
  • Centralized monitoring and...

Software enablers

As we’ve already mentioned, we have a number of very good open source tools that can help us both meet our expectations of microservices and, most importantly, handle the new challenges that come with them:

  • Spring Boot, an application framework
  • Spring Cloud/Netflix OSS, a mix of application framework and ready-to-use services
  • Docker, a tool for running containers on a single server
  • Kubernetes, a container orchestrator that manages a cluster of servers that run containers
  • Istio, a service mesh implementation

The following table maps the design patterns we will need to handle these challenges, along with the corresponding open source tool that will be used in this book to implement the design patterns:

...

Design Pattern

Spring Boot

Spring Cloud

Kubernetes

Other important considerations

To be successful when it comes to implementing a microservice architecture, there are a number of related areas to consider as well. I will not cover these areas in this book; instead, I’ll just briefly mention them here as follows:

  • Importance of DevOps: One of the benefits of a microservice architecture is that it enables shorter delivery times and, in extreme cases, allows continuous delivery of new versions. To be able to deliver that fast, you need to establish an organization where dev and ops work together under the mantra you built it, you run it. This means that developers are no longer allowed to simply pass new versions of the software over to the operations team. Instead, the dev and ops organizations need to work much more closely together, organized into teams that have full responsibility for the end-to-end life cycle of one microservice (or a group of related microservices). Besides the organizational part of dev/ops...

Summary

In this introductory chapter, I described my own way into microservices and delved into a bit of their history. We defined what a microservice is – a kind of autonomous distributed component with some specific requirements. We also went through both the good and challenging aspects of microservice-based architecture.

To handle these challenges, we defined a set of design patterns and briefly mapped the capabilities of open source products such as Spring Boot, Spring Cloud, Kubernetes, and Istio to the design patterns.

You’re eager to develop your first microservice now, right? In the next chapter, you will be introduced to Spring Boot and complementary open source tools that we will use to develop our first microservices.

Join our community on Discord

Join our community’s Discord space for discussion with the author and other readers:

https://packt.link/SpringBoot3e

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Build cloud-native production-ready microservices and stay ahead of the curve
  • Understand the challenges of building large-scale microservice architectures
  • Learn how to get the best out of the latest updates, including Spring Boot 3, Spring Cloud, Kubernetes, and Istio

Description

Looking to build and deploy microservices but not sure where to start? Check out Microservices with Spring Boot 3 and Spring Cloud, Third Edition. With a practical approach, you'll begin with simple microservices and progress to complex distributed applications. Learn essential functionality and deploy microservices using Kubernetes and Istio. This book covers Java 17, Spring Boot 3, and Spring Cloud 2022. Java EE packages are replaced with the latest Jakarta EE packages. Code examples are updated and deprecated APIs have been replaced, providing the most up to date information. Gain knowledge of Spring's AOT module, observability, distributed tracing, and Helm 3 for Kubernetes packaging. Start with Docker Compose to run microservices with databases and messaging services. Progress to deploying microservices on Kubernetes with Istio. Explore persistence, resilience, reactive microservices, and API documentation with OpenAPI. Learn service discovery with Netflix Eureka, edge servers with Spring Cloud Gateway, and monitoring with Prometheus, Grafana, and the EFK stack. By the end, you'll build scalable microservices using Spring Boot and Spring Cloud.

Who is this book for?

If you're a Java or Spring Boot developer learning how to build microservice landscapes from scratch, then this book is for you. To get started, you need some prior experience in building apps with Java or Spring Boot.

What you will learn

  • Build reactive microservices using Spring Boot
  • Develop resilient and scalable microservices using Spring Cloud
  • Use OAuth 2.1/OIDC and Spring Security to protect public APIs
  • Implement Docker to bridge the gap between development, testing, and production
  • Deploy and manage microservices with Kubernetes
  • Apply Istio for improved security, observability, and traffic management
  • Write and run automated microservice tests with JUnit, test containers, Gradle, and bash
  • Use Spring AOT and GraalVM to native compile the microservices
  • Use Micrometer Tracing for distributed tracing

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 31, 2023
Length: 706 pages
Edition : 3rd
Language : English
ISBN-13 : 9781805128694
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 31, 2023
Length: 706 pages
Edition : 3rd
Language : English
ISBN-13 : 9781805128694
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
R$50 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
R$500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts
R$800 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 763.97
Full Stack Development with Spring Boot 3 and React
R$261.99
Microservices with Spring Boot 3 and Spring Cloud, Third Edition
R$250.99
Modern API Development with Spring 6 and Spring Boot 3
R$250.99
Total R$ 763.97 Stars icon

Table of Contents

25 Chapters
Introduction to Microservices Chevron down icon Chevron up icon
Introduction to Spring Boot Chevron down icon Chevron up icon
Creating a Set of Cooperating Microservices Chevron down icon Chevron up icon
Deploying Our Microservices Using Docker Chevron down icon Chevron up icon
Adding an API Description Using OpenAPI Chevron down icon Chevron up icon
Adding Persistence Chevron down icon Chevron up icon
Developing Reactive Microservices Chevron down icon Chevron up icon
Introduction to Spring Cloud Chevron down icon Chevron up icon
Adding Service Discovery Using Netflix Eureka Chevron down icon Chevron up icon
Using Spring Cloud Gateway to Hide Microservices behind an Edge Server Chevron down icon Chevron up icon
Securing Access to APIs Chevron down icon Chevron up icon
Centralized Configuration Chevron down icon Chevron up icon
Improving Resilience Using Resilience4j Chevron down icon Chevron up icon
Understanding Distributed Tracing Chevron down icon Chevron up icon
Introduction to Kubernetes Chevron down icon Chevron up icon
Deploying Our Microservices to Kubernetes Chevron down icon Chevron up icon
Implementing Kubernetes Features to Simplify the System Landscape Chevron down icon Chevron up icon
Using a Service Mesh to Improve Observability and Management Chevron down icon Chevron up icon
Centralized Logging with the EFK Stack Chevron down icon Chevron up icon
Monitoring Microservices Chevron down icon Chevron up icon
Installation Instructions for macOS Chevron down icon Chevron up icon
Installation Instructions for Microsoft Windows with WSL 2 and Ubuntu Chevron down icon Chevron up icon
Native-Complied Java Microservices Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(23 Ratings)
5 star 65.2%
4 star 13%
3 star 0%
2 star 4.3%
1 star 17.4%
Filter icon Filter
Top Reviews

Filter reviews by




SeongHyeon Sep 22, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Greate contents.
Subscriber review Packt
taeksoo shin Feb 06, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
N/A Jul 19, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
These books Vedio part should also be available for mobile devices
Feefo Verified review Feefo
Dirk Wichmann Sep 05, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've waited that the book comes out, then I had a quick look at the content and a few chapters over the past few days and I'm thrilled.I like the mix of theory and practice and I've already found some new concepts and impulses that I can well imagine adopting in the future.As soon as there is a little more time, I am looking forward to working on the book from scratch and creating the demo project.I find the following areas great: (maybe the list grows because there was not enough time to view the entire book)- Extract API to own archive- Building a tool JAR- Documentation of the APICongratulations to the author, a great book that covers a lot of very useful stuff.
Amazon Verified review Amazon
joedayz Sep 02, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have been reading this book since its first edition. I have learned theory, tools, libraries, and frameworks and I have seen in a simple example how to go from zero to docker, Kubernetes, Istio, and apply observability.In this edition, there will be a migration to Spring Boot 3, and a new topic about Spting Native, which is a great contribution to keep up with the latest versions of the frameworks.Definitely, I will always be attentive to each new version of this microservices saga by Magnus Larsson who, as always, does an excellent job.You will not regret buying it, it is a good investment. It has helped me a lot in my consultancies and work.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.