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
- Instrumentation libraries:
- Coda Hale/Yammer Java Metrics Library
- Prometheus client libraries
- Metrics aggregation services
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
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper