Five Principles of Effective Microservices Monitoring

The growing use of microservices in modern software architectures increases their complexity, making monitoring a key consideration in microservice control systems. In a recent article for The New Stack, Apurva Dave and Loris Degioanni discuss five principles for establishing more efficient and effective monitoring of microservices from technological and organisational perspectives.

1. Monitor Containers and What’s Running Inside Them
Containers’ speed, portability, and isolation make them great building blocks for microservices. But, as black boxes to most systems, they can increase the challenges of operating, monitoring and troubleshooting a service. At scale, this could result in running thousands of monitoring agents at severe resource expense. One possible solution to this issue is to ask developers to instrument their code directly. Alternatively, use a common kernel-level instrumentation approach so you can see all application and container activity on your hosts.

2. Leverage Orchestration Systems to Alert on Service Performance
Understanding operational data of how a service is performing is a new kind of challenge. This applies to both application-level data such as which queries have the slowest response times, and infrastructure-level monitoring of, say, which service’s containers are exceeding their allocated CPU share. Orchestration services are becoming increasingly important for defining microservices, as well as understanding the state of each service in deployment. DevOps teams should employ a container-native solution to dynamically aggregate container and application data to determine each service’s monitoring metrics to understand if something is impacting that service.

3. Be Prepared for Services that are Elastic and Multi-Location
Container-native environments experience a far greater rate of change in elastic services than virtualised environments, which can be an issue for monitoring systems. DevOps teams will struggle to manually define what service a container is included in if your orchestration service continuously spins up new containers as needed throughout the day. So, implement a monitoring system capable of spanning different locations, such as your AWS CloudWatch and your private data centre, to operate in dynamic, container-native environments.

4. Monitor APIs
Since APIs are the only element exposed to external teams, comprehensive API monitoring becomes vital to ensuring the delivery of the service. Make sure your monitoring allows you to understand things like the most frequently used endpoints as a function of time to expose noticeable changes in usage. Furthermore, tracing service calls through the system allows you to understand the overall user experience with infrastructure- and application-based views of the environment.

5. Map Monitoring to Your Organizational Structure
It is important not to overlook the human element of microservices and how system design is defined by the organisational structure of the underlying teams. For a microservice architecture to benefit an organisation, the teams must mirror microservices themselves by being smaller and loosely coupled so they can choose and adjust their direction to meet organisational needs in a way that suits them. Set up your monitoring platform to allow each microservices team to isolate their alerts, metrics and dashboards while still providing operations with a view into the overall system.

Original Article

The Five Principles of Monitoring Microservices

Martin W Brennan Martin W Brennan is a co-founder of ViewPop, the social network that puts the creation of 3D photos and videos in the hands of anyone with a smartphone. For his day job, Martin is a copywriting consultant at We Write Words, learning about the world as he writes about it.

Comments