Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Jorge Salamero Sanz
@bencerillo @sysdig
How to
Monitor Microservices
How to Monitor Microservices?
Apps
Infra
Health
Checks
JVM/JMX
Custom
metrics
Metrics Processing Unicorns, rainbows
And cu...
% whoami
Jorge Salamero Sanz
<jorge.salamero@sysdig.com>
• Working on OSS last 12 years
• Working on monitoring last 3 yea...
Agenda
• Challenges of container infrastructures
• Traditional monitoring limitations
• Best practices monitoring Microser...
Breaking traditional model
Microservices and containers break traditional monitoring and
troubleshooting models
Traditional deployment
Full host OS
kernel
systemd
syslogd
App services
MySQL
Nginx
OpenSSL
Java
App A
App B
App C
Ops Devs
Application workflow
Database App Cache
backend middleware frontend
The Docker revolution
Servers Virtual Machines Containers
Unit: machine
Orchestration: no
Architecture:
monolithic
Unit: m...
Containerized deployment
Full host OS
kernel
+
Docker
MySQL App A
Ops DevOps
Nginx + OpenSSL App B
Java 8.0 build XXX App C
… but in reality
Database App Cache/Frontend
Computing node
Computing node Computing node
Computing node Computing node
Co...
… but in reality
Database App Cache/Frontend
Computing node
Computing node Computing node
Computing node Computing node
Co...
Application workflow
Database App Cache
backend middleware frontend
New organization structures
Container monitoring
New challenges:
1. How do we get the metrics?
2. How do we shape all this amount of metrics?
3. Analy...
Container monitoring
New challenges:
1. How do we get the metrics?
2. How do we shape all this amount of metrics?
3. Analy...
1. Metric collection
• We containers, because:
– are simple
– are small
– are isolated
– less dependencies
• … but they ar...
“Workarounds”
Agent in the
Docker container
Agent in the
Kubernetes pod
Export metrics through
an external agent
App Agent...
Kernel instrumentation
Kernel
Docker
Container
1
Container
2
Container
3
App App
rkt LXC
Sysdig
Docker
Why this is cool?
• Just one instrumentation per host:
– spawning or destroying a container is instrumentation-less
• Full...
Container monitoring
New challenges:
1. How do we get the metrics?
2. How do we shape all this amount of metrics?
3. Analy...
Remember... but in reality:
Database App Cache/Frontend
Computing node
Computing node Computing node
Computing node Comput...
2. Information aggregation
• Infrastructure monitoring should be transparent and
automatic (no instrumentation no configur...
Application workflow
Database App Cache
backend middleware frontend
Orchestration platforms knows already...
Demo!
Container monitoring
New challenges:
1. How do we get the metrics?
2. How do we shape all this amount of metrics?
3. Analy...
Real example
https://github.com/kubernetes/kubernetes/issues/1405
1
3. Analysis & troubleshooting
• Imagine:
strace + wireshark + htop + lsof + iostat + vmstat + *
• Not available on contain...
Demo!
Container monitoring
New challenges:
1. How do we get the metrics?
2. How do we shape all this amount of metrics?
3. Analy...
Teams on Microservices
Francesc Zacarias, SRE @ Spotify
4. Teams by service
• Tags/Metadata from the orchestration platform, eg
Kubernetes:
– namespaces (dev, prod)
– services, d...
Container monitoring
New challenges:
1. How do we get the metrics?
2. How do we shape all this amount of metrics?
3. Analy...
Sysdig
• 100% open-source
• 1M+ downloads
• Host analysis
• sysdig.org
• SaaS & on-prem
• 200+ customers
• Cluster analysi...
¡Danke
MicroXchg!
@bencerillo
@sysdig
www.sysdig.org
www.sysdig.com
How to Monitor Microservices
Próxima SlideShare
Cargando en…5
×

How to Monitor Microservices

2.838 visualizaciones

Publicado el

How to Monitor Microservices running in Docker, Kubernetes, Openshift, DC/OS Mesos or any other container orchestration platform.

Publicado en: Software
  • Sé el primero en comentar

How to Monitor Microservices

  1. 1. Jorge Salamero Sanz @bencerillo @sysdig How to Monitor Microservices
  2. 2. How to Monitor Microservices? Apps Infra Health Checks JVM/JMX Custom metrics Metrics Processing Unicorns, rainbows And cute dashboards
  3. 3. % whoami Jorge Salamero Sanz <jorge.salamero@sysdig.com> • Working on OSS last 12 years • Working on monitoring last 3 years • Containers gamer @sysdig @bencerillo @sysdig
  4. 4. Agenda • Challenges of container infrastructures • Traditional monitoring limitations • Best practices monitoring Microservices • Sysdig, container native monitoring & troubleshooting
  5. 5. Breaking traditional model Microservices and containers break traditional monitoring and troubleshooting models
  6. 6. Traditional deployment Full host OS kernel systemd syslogd App services MySQL Nginx OpenSSL Java App A App B App C Ops Devs
  7. 7. Application workflow Database App Cache backend middleware frontend
  8. 8. The Docker revolution Servers Virtual Machines Containers Unit: machine Orchestration: no Architecture: monolithic Unit: machine Orchestration: external Architecture: monolithic Unit: (micro)service Orchestration: native Architecture: distributed
  9. 9. Containerized deployment Full host OS kernel + Docker MySQL App A Ops DevOps Nginx + OpenSSL App B Java 8.0 build XXX App C
  10. 10. … but in reality Database App Cache/Frontend Computing node Computing node Computing node Computing node Computing node Computing node
  11. 11. … but in reality Database App Cache/Frontend Computing node Computing node Computing node Computing node Computing node Computing node
  12. 12. Application workflow Database App Cache backend middleware frontend
  13. 13. New organization structures
  14. 14. Container monitoring New challenges: 1. How do we get the metrics? 2. How do we shape all this amount of metrics? 3. Analysis and troubleshooting 4. Teams on Microservices infrastructure
  15. 15. Container monitoring New challenges: 1. How do we get the metrics? 2. How do we shape all this amount of metrics? 3. Analysis and troubleshooting 4. Teams on Microservices infrastructure
  16. 16. 1. Metric collection • We containers, because: – are simple – are small – are isolated – less dependencies • … but they are an opaque blackbox
  17. 17. “Workarounds” Agent in the Docker container Agent in the Kubernetes pod Export metrics through an external agent App Agent App Agent App Agent App App App 1. Complex instrumentation (x2 because just the monitoring) plus service monitoring configuration 2. Limited and pre-established metric collection (Docker API, etc)
  18. 18. Kernel instrumentation Kernel Docker Container 1 Container 2 Container 3 App App rkt LXC Sysdig Docker
  19. 19. Why this is cool? • Just one instrumentation per host: – spawning or destroying a container is instrumentation-less • Full visibility: all the system calls: – automatic service discovery – all metrics collection (no filtering) – application monitoring without instrumentation (magic of decoding protocols)
  20. 20. Container monitoring New challenges: 1. How do we get the metrics? 2. How do we shape all this amount of metrics? 3. Analysis and troubleshooting 4. Teams on Microservices infrastructure
  21. 21. Remember... but in reality: Database App Cache/Frontend Computing node Computing node Computing node Computing node Computing node Computing node
  22. 22. 2. Information aggregation • Infrastructure monitoring should be transparent and automatic (no instrumentation no configuration) • You should handle your custom/biz metrics • All metrics should be tagged automatically • All metrics should be aggregated and segmented on a service level basis
  23. 23. Application workflow Database App Cache backend middleware frontend
  24. 24. Orchestration platforms knows already...
  25. 25. Demo!
  26. 26. Container monitoring New challenges: 1. How do we get the metrics? 2. How do we shape all this amount of metrics? 3. Analysis and troubleshooting 4. Teams on Microservices infrastructure
  27. 27. Real example https://github.com/kubernetes/kubernetes/issues/1405 1
  28. 28. 3. Analysis & troubleshooting • Imagine: strace + wireshark + htop + lsof + iostat + vmstat + * • Not available on containers, don’t understand namespaces • Metrics and logs can bite your in the ass, system calls have all the truth • Infrastructure gets more complex and volatile
  29. 29. Demo!
  30. 30. Container monitoring New challenges: 1. How do we get the metrics? 2. How do we shape all this amount of metrics? 3. Analysis and troubleshooting 4. Teams on Microservices infrastructure
  31. 31. Teams on Microservices Francesc Zacarias, SRE @ Spotify
  32. 32. 4. Teams by service • Tags/Metadata from the orchestration platform, eg Kubernetes: – namespaces (dev, prod) – services, deployments, RCs, pods – custom tags • ACLs out of the box (dashboards, alerts, etc) on multi-tenant/PaaS scenarios
  33. 33. Container monitoring New challenges: 1. How do we get the metrics? 2. How do we shape all this amount of metrics? 3. Analysis and troubleshooting 4. Teams on Microservices infrastructure
  34. 34. Sysdig • 100% open-source • 1M+ downloads • Host analysis • sysdig.org • SaaS & on-prem • 200+ customers • Cluster analysis • Dashboards, alerts, events, teams • sysdig.com
  35. 35. ¡Danke MicroXchg! @bencerillo @sysdig www.sysdig.org www.sysdig.com

×