About Microservices.io

Microservices.io is brought to you by Chris Richardson. Experienced software architect, author of POJOs in Action and the creator of the original CloudFoundry.com. His latest startup is eventuate.io, a microservices application platform.

Learn more about microservices

Chris offers a comprehensive set of resources for learning about microservices including articles, an O'Reilly training video, and example code. Learn more

Microservices consulting and training

Chris offers a comprehensive consulting services, workshops and hands on training classes to help you use microservices effectively. Get advice

Need training in London?

I'll be there in May!

Contact me

Example microservices applications

Want to see an example? Check out Chris Richardson's example applications. See code

Get the book: Microservice patternsnew


Signup for the newsletter

A new microservices application platform that solves distributed data management problems.

Join the microservices google group

Pattern: Application metrics

Context

You have applied the Microservice architecture pattern.

Problem

How to understand the behavior of an application and troubleshoot problems?

Forces

  • Any solution should have minimal runtime overhead

Solution

Instrument a service to gather statistics about individual operations. Aggregate metrics in centralized metrics service, which provides reporting and alerting. There are two models for aggregating metrics:

  • push - the service pushes metrics to the metrics service
  • pull - the metrics services pulls metrics from the service

Examples

Resulting context

This pattern has the following benefits:

  • It provides deep insight into application behavior

This pattern has the following drawbacks:

  • Metrics code is intertwined with business logic making it more complicated

This pattern has the following issues:

  • Aggregating metrics can require significant infrastructure

Copyright © 2017 Chris Richardson • All rights reserved • Supported by Kong.