7. Monitoring

In the last couple of chapters, we have learned how to design and develop a containerized microservice-based application. If we recall some of the core concepts about microservices, we know that the services should communicate with each other through APIs so that we have a loosely coupled and flexible architecture. An environment like this introduces a set of challenges when it comes to monitoring and operational management. Questions like the following arise: how does the system know that it needs to start another instance of a service as one cannot handle the load anymore, or how does the system know that it needs to spin up another host VM as the ones that in use are running into resource constraints? To answer all those questions we need to have effective monitoring in place. In fact monitoring is one of the most important aspects of microservices architectures. In this chapter, we will have a closer look at what monitoring means for each component, what the challenges and best practices for each component are, and we will look at some of the Microsoft monitoring solutions available.

To illustrate that monitoring all components of a typical microservice-based application can be quite a challenge it is worth looking at conceptual view of an environment hosting such an application again. Figure 7.1 shows such an environment that we already know from Chapter 5.

Image

FIGURE 7.1: Microservices-based application

As we learned in Chapter 5, “Service Orchestration and Connectivity,” the components of such an environment range from virtual machines that host system services like cluster management or service registries all the way to application services that run in Docker containers. Many of the services are set up in a failover mode, so in the case of a failure of the host VM or service, they can failover to another host VM. From a monitoring perspective, we can break it down into three big components that need to be monitored:

The host machine

The containers

The services hosted in the containers

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.192.183