Leveraging infrastructure
In this section, we’ll explore Dapr for microservices. Dapr provides service discovery, component bindings, secret management, locking, state management, observability, and more building blocks helping developers to focus on application logic. We’ll focus on distributed tracing.
In our demo application, we’re going to handle all network calls with Dapr and enable tracing and metrics on it. We’ll also keep telemetry enabled on the microservices. Figure 3.6 shows the new application layout:
Figure 3.6 – Meme application with Dapr runtime
Dapr runs as a sidecar—a separate process wrapping each application instance. Frontend in our setup calls into storage via Dapr, which handles service discovery, error handling, encryption, load balancing, and more. Storage, in turn, uses Dapr output binding to communicate to Azure, AWS, or store memes locally.
Dapr integrates well with Kubernetes...