10 Cloud-native application patterns

 

This chapter covers

  • Introducing the MicroProfile set of specifications for cloud-native Java applications
  • Monitoring the status and health of applications
  • Collecting and visualizing application metrics
  • Tracing requests within and across services
  • Adding fault tolerance capabilities to applications

We’ve repeated multiple times that Quarkus is a framework for building cloud-native applications. But what does it mean exactly? What are the characteristics of cloud-native applications? What are the patterns that are commonly used to build them?

In this chapter, we’ll answer these questions and show you how to implement these patterns in Quarkus applications. We also look into the related tools Quarkus offers to make these integrations easier. In the next chapter, we will expand on what we learn here by actually deploying the full Acme Car Rental in the cloud and seeing how all these functionalities neatly work together.

The main characteristics that we discuss in this chapter are

10.1 MicroProfile, SmallRye, and Quarkus

10.1.1 What is SmallRye?

10.2 Monitoring application health

10.2.1 Monitoring the health of car rental

10.3 Application metrics

10.3.1 Micrometer

10.3.2 Metric types

10.3.3 Metric dimensionality

10.3.4 The programming model

10.3.5 Prometheus and Grafana

10.3.6 Monitoring metrics of car rental

10.4 Tracing

10.4.1 OpenTelemetry

10.4.2 Adding tracing capabilities to car rental

10.5 Fault tolerance

10.5.1 Adding fault tolerance to car rental

10.5.2 Alternative fault tolerance approaches

10.6 Service discovery

10.7 Next steps

Summary