Monitoring the Host Machine

What does it mean to monitor the host machine and why do we even need to do that? We have learned that we can spin up containers in seconds, so why not just monitor them?

What happens if for some reason the host machine goes down, as in the case of a scale-in, or it cannot accept requests anymore? Those scenarios do happen, so we need to be ready to respond to them. Another reason for monitoring the host machine is to find out if we are running into resource constraints of any kind. We have learned that we can spin up n number of containers quickly, but of course, the number we can really spin up on one host VM depends on resources, such as memory and CPU available on the host system. By monitoring the host machine, we can also find out if we need to spin up a new host machine for new containers, or even if we need to move a container from one host to another. In order to be able to make those decisions we need to monitor the following components at the very least:

CPU

RAM

Network

Disk

CPU: It is obvious why we need to monitor the CPU of the host system. As we will learn, we can monitor the CPU usage of each container, but we do not have an aggregate CPU usage of all containers. This is a crucial metric to identify whether or not bigger instances of the underlying host are needed or if we should spin up another host instance.

RAM: Similar to CPU, we also want to monitor the aggregate RAM usage of all containers to determine whether we can spin up another container on that host or add another VM to the cluster.

Network: This might not be obvious, but the container endpoints map to endpoints on the host system, so if we have many network applications running, we can find our network interface cards becoming a bottleneck.

Disk: Disk I/O is one of the most neglected metrics we should really be watching. The service performance can highly degrade if many I/O operations are being executed but the disk attached to the host system does not offer high enough IOPs. Containers that contain data storage solutions such as databases are a good example for I/O heavy services.

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

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